Thursday, February 16, 2006

As if I needed another post on my blog proving that I'm the world's biggest dweeb.

Although I'm back in software development, after a couple years of being in Software CM, I'm getting sucked into build / source-control stuff again. Which isn't bad. Not every developer likes worrying about builds, or finds version control interesting. But, once you've seen the difference between 'good' builds and 'bad' builds... Oh, lordy, do bad builds suck.

At work, we're doing Java. Which means using Ant, simply because nearly all IDEs support it. Ant isn't necessarily horrible... But, trying to create a build for a complex system can be very, very annoying. I've been able to whip our builds into shape using my new best friend, the import task. In particular, the nugget of gold buried deep in the manual's example for the subant task.

There's very little unique information required for a Java build -- especially if you're a nazi and insist everyone in the group organize their source similarly. Being able to use to share a common template among 10 (and soon 30+) components of our production system is going to save a lot of time and maintenance headaches in the long run.

That being said, Ant is horrible to work with. It's not just that the build script is written in XML... ugh. Creating a flexible build scripts with Ant is a pain in the ass, particularly when you have a large set of interrelated components that needs to be collaborated on, and dependencies to be tracked among the components (and thirdparty applications).

There are a lot of Ant extensions, but little in the way of cohesion among them, or a good howto or round-up describing them. Ivy looks very cool, but it also seems like it could be a bootstrapping headache... particularly if the network is unreliable..

Ultimately, I want a build tool that provides:
  • Global dependency tracking for all components
  • Ability to build individual components easily. Without forcing you to repeat yourself everywhere; and not force you to put dependency information in a single file, which would quickly become a merge nightmare
  • Easy extension of basic functionality via scripting language
  • Not force you to learn a _new_ tool-specific scripting language
  • Not force you to use 3-4 scripting languages to do reasonably complex things. e.g. the horrible M4 + Perl + Unix Shell / MS Batch spaghetti mess that soon develops in order to do anything reasonably complex with Make.
Boost Build (based on Jam) is reportedly good. But, IMHO, the best thing since sliced bread is SCons. It is so nice to be able to use a single language, Python, to both define your build and extend the basic functionality of the tool. Having a fully functional scripting language as part of your build script is so nice.

When you only have to worry about a single application, it may seem like overkill. But, if you've ever had to build a large system of applications, shared libraries, manipulate text files, increment build numbers, etc for 5 different target OSes... Builds aren't simple and using the right tools makes a huge difference.

Speaking of development tools, a decent version control system is also invaluable. My new favorite is Bazaar-NG. The ability to work offline and safely rename/move files and directories is sweet. Another huge bonus is that you don't have to manually track previous merges between branches (unlike CVS/Subversion). And, it doesn't leave version-control turds spread throughout my tree.

Even if bzr isn't ready to provide version control for my whole organization, it is very easy to setup a single user repository. At the moment, I'm responsible for integrating the work done by our internal developers using PVCS, and an external consulting firm that uses Subversion. It may seem like overkill to throw a third version control system into the mix, but it works. It stays out of the way (no VC turds) and allows me to have 4-5 branches of development -- one for my work, one to merge from Subversion, one to merge from PVCS, and another two or three to experiment in. And, I can merge between the branches w/out the tool forcing me to manually remember what had been merged.

Books-I'm-Reading-News:
  • Finished the Steven Erickson books I'd ordered last month. From England. Because I have no patience.
Where-I'm-Going-News:
  • I'll be taking some training classes at our NYC office in early March. I plan to eat a lot of food from carts.