Tags

, ,

One of my favorite comics depicts the learning curve for various editors. Though a dying breed, I am probably considered by most to be a vi1 zealot.

In many ways, git has a similar learning curve to vi. It also affords one with a similar level of god-like power over their respective domains. Yet, as much as I try, I cannot muster the same zealous love for git as I have for vi. Why exactly might this be? Without losing too much sleep, I’ve narrowed it down to the behaviour of a different curve, that of the damage curve.

One can argue that as a basic editor, you can get by with vi by knowing three commands: <i> to insert, <esc> to get into command mode, and <ZZ> to save and quit. Is the same true with git? Well, yes and no. Certainly you can get started easily enough, but the moment you have collaboration (which is arguably the raison d’etre of VCS), complexity is introduced rather quickly. Couple this with a PERL-like “there’s more than one way to skin a cat” ethos, and you have quite a potent mix of confusion and missteps. This is fine in vi. If I make a mistake, I learn one command — <u> and keep hitting it until I revert to a known state. With git? Well, depending on your setup and whether you have a bare repository as central, how many branches, detached heads, etc. you may or may not be able to retrieve your old state.

Why does any of this matter? Why not “git” with the program and “git” on with writing code? Because a mistake in git means an afternoon of lecturing (by git) while trying to recover your source code. Git makes me think about VCS more than I ought to. At the end of the day git is a tool and should complement, not interfere with my development. In contrast, vi operates happily with whatever amount of vi juju you may have. No difference, no worries. Git on the other hand forces you to think about VCS in ways that certainly CVS or SVN didn’t. Clearly git is far more powerful than either of those systems, but guess what? I still have to manually merge branches and also deal with the additional complexity of the system.

This rant ultimately leads back to the universal jig and whether software needs to be reinvented. In this post, I’m partially waving the white flag of capitulation and saying enough is enough. Is the innovation worth the headache? After understanding way more of git than I want, I’m not so sure. In a future post, I’ll discuss a counter example, just for the sake of arguing with myself.

1. In reality, the zealotry is attached to vim, which  is far more powerful than vi. These days, though, vim is synonymous with the original.

About these ads