How I Learned to Stop Worrying and Live Without Version Control

Although I've worked out how to version Codea projects with Git, I can only do so when the iPad is hooked up by USB to my Linux laptop. This means I have no version control when writing Codea code on the go. Until recently, Codea didn't even have undo/redo!

The kind of thing I write with Codea involves lots of experimenting and tweaking. I'm continually adjusting algorithms and parameters to improve the program's aesthetics or gameplay. At first, I found the lack of version control very frustrating. If I experimented with some algorithm and made it worse, it wasn't very easy to get back to what was there before I messed it up. If I'd had version control, I'd have been able to easily roll back to an earlier revision or create a temporary branches to compare and contrast different experiments.

Without version control, I've found myself modularising my code to make it easier to experiment. If I want to experiment with a different animation algorithm, for example, I'll extract just the behaviour I want to tweak into a separate function, write an alternative implementation as another function, and make it easy to switch between the two alternatives in the rest of the code. "Modularise by feature" rather than "branch by feature" as Continuous Delivery folks would say.

The code has turned out to be far more modular and compositional, and easier to read and change because it is composed of higher-level constructs instead of implemented in terms of variables, conditionals, loops, null checks, and other low-level procedural language features. It's as if not having version control may actually be beneficial!

Copyright © 2012 Nat Pryce. Posted 2012-08-24. Share it.

Comments powered by Disqus