afongen
Sam Buchanan's weblog.

TortoiseSVN

I recently started using Subversion for version control instead of CVS, and when I'm on Windows I like to use TortoiseSVN, a Subversion client that integrates with Windows Explorer and makes it very easy to get into the habit of regular commits and updates. Almost too easy.

Mac users are familiar with how when you drag a file into the trash, the can bulges a bit and looks overfull (it no longer bulges in OS X, but it still looks overfull). In User Interface Design for Programmers, Joel Spolsky writes about how this carries the trash can metaphor to a point where it backfires:

The trouble is that neat freaks were distracted by the full trash can. It looks messy. When they wanted to clean up, they would empty the trash. Over time, many people got in the habit of dragging things to the trash can and then mechanically emptying the trash so that the trash can wouldn't look messy, thus defeating its original purpose: to provide a way to get things back!

I am one of those neat freaks. It takes conscious effort not to empty the trash every chance I get.

One of the really cool things about TortoiseSVN is its icon overlays. You can tell at a glance which files have been edited or added to the repository since the last update:

TortoiseSVN's icon overlays

It didn't take long to discover that it bugs me to have anything but little green checkmarks on all the files, so I commit at every opportunity. Since TortoiseSVN makes the "commit" command easily accessible on the context menu, this takes practically no time at all. Now, I'm a believer in the principle of continuous integration, but it can be carried to an extreme, especially since I usually work alone. As with the trash can, I require conscious effort not to commit every time a new unit test passes. Committing that frequently is not only unnecessary, it breaks the rhythm of test-driven development (red, green, refactor) so I find it harder to get into the groove. I don't want to close the Explorer window, so reluctantly I have turned off icon overlays for the time being.

At least until I get used to my new toy.