The joy of hacking

Today I had a day which I knew from the start would be broken up due to pre-arranged calls and meetings out of the office, and so I decided to deal with a few low importance items on my “todo” list. One of them was to do a proof of concept for a new tool that I might work on. I had a thoroughly enjoyable time hacking an old tool into shape so that I could use some of the technology in the new tool. This was good old fashioned ’no tests’, ’no rules’, cut’n’paste and force it to do what you want programming… Wonderful stuff.

The tool is to speed up my build servers by distributing the work across my spare machines without me needing to go around and configure them all to be build machines. Something a bit like Incredibuild, but better ;) Given that The Server Framework gives me the basis of the grid that I need that’s a low risk element and so I ignored it for now. The bigger risk is the ‘zero installation’ distributed build system. Step 0 was to repurpose one of my deadlock detection tools so that I could intercept file and registry access from a local build and then virtualise it onto my grid. The code that I wrote 5 years ago for the deadlock detection tools gave me the injection, hooking and debugger code that I needed and it was a matter of hours to put together something that can take the devenv command line that I use to build one of my libraries and convert it into a trace of all 50 processes that run and all the files that they access locally… The trick will be to work out how to package and ship these requirements to an arbitrary box on my grid and then run the build step there rather than here… Ideally with zero config required and with some smarts so that it can do more than simply cache the files that it needs on the grid machine; after all, many of these files don’t change, ever and lots of the library output could be used as input to other (currently unrelated) build tasks if there was something clever sitting behind the curtain.

Of course, actually doing the work will take forever, but it was nice to be able to throw together a robust proof of concept in a few hours.