Neatness and Source Control

I may well have the messiest desk in this building, my tie is on crooked, and my beard is generally fairly untidy. However I have a perverse compulsion to keep my source code neat and tidy – in particular I am obsessive about keeping as little as possible in my list of modified/new files. I’m particularly bad when
working with CVS and the Eclipse CVS integration that shows the list of outgoing changes. The longer I go with a list of outgoing changes the more uncomfortable I become. It’s obvious where this comes from – with concurrent versioning I’m compelled to merge my changes with the current head or branch as regularly as possible, to save myself pain. I also want to see the code that I’ve written build and test cleanly on the continuous integration server.

This has an interesting effect on the way I approach major refactoring/rewrite tasks – obviously it’s a good idea to do these jobs in a staged way. When working in a larger team working concurrently on a single code base this becomes so important – perform a refactoring step, check into the head, see it build cleanly, help the team merge into their current work, everyone build cleanly. Then onto the next step.

It absolutely freaks me out to work with a developer and find 200 modified files and 200 ‘test scripts’ that are not part of the production code base. It’s just not right – the repository should only contain clean code. Move scripts and test classes out to a scratch project, and undo modifications that you did ‘just for testing’ and have held onto. What you are risking is very important – that you’ll miss files that you should check in amongst the forest of modified files. That you’ll accidentally check in a testing hack. Or you’ll spend hours chasing bugs that you can’t reproduce because of something that you’ve changed in your local source.
Now I say it out loud it sounds a bit silly, but it’s just one of my little perversions – hopefully they add up to make me a good developer, not that scary bearded guy.

Irrational Clearcase makes this sooo much worse – I have many a rant to make about that product. It’s also to do with the implementation here at my current project where they are using the traditional ‘checkout-lock/checkin-unlock’ pessimistic locking. This causes so much contention here that people take ‘unreserved checkouts’ meaning you can change your file but must merge later. The Clearcase merge tools are so very poor that it’s an excruciating process – even I don’t like to merge changes from the repository (VOB) a task that I would happily tackle with CVS (using Eclipse anyway).

My ‘shitlist’ for Clearcase is long and unhappy – no atomic commits, ridiculous user interface, how the heck do you restore a deleted file? You can’t get a simple single view of files in your project that you’ve added, so I constantly make the goof of not adding a file and breaking the CI build. The default environment here is also to work with ‘dynamic views’ stored on a remote network location – can you spell S-L-O-W? (Yes I’ve moved to snapshot views). I could go on.
Large organisations pay money to IBM for this garbage. Give it to me instead!

Leave a Reply

Your email address will not be published. Required fields are marked *