The Artima Developer Community
Sponsored Link

Let's Reconsider That
Regenerative Build Tools
by Michael Feathers
May 15, 2007
Summary
Dust off an old computer and put it to work.

Advertisement

I think that when people look back at the way we program today, one of the things that they'll be amazed at is the fact that we have so much computing power but we don't do much with it.

Seriously, how many computers do you have?  If you're like me you have a least a couple of stray ones sitting around the office, and they aren't doing anything.  What a waste.  And, it's only going to get worse as multicore processors become more prevalent.

When I first heard of continuous integration, way back in the day, I misunderstood it.  I thought that some computer someplace was going to build my project continuously.  That is, regardless of whether I or anyone else had checked in.  Silly?  Perhaps. But, wasteful?  I don't think so, the computer is running anyway.  It might as well work.

A while back, I visited a C++ team that had found a wonderful use for a spare computer.   They set it up to build continuously.  Then they  did something  fascinating. They created a script that went into their code and commented out  a single #include.  Then it built their project.  If the build and the tests passed, the script deleted the include.  If it didn't, the script uncommented the include and went on to the next one.  Yes, it took quite a while to march through the code, but with that build running continuously in the background, they were able to eliminate a large number of superfluous dependencies.  Their build got better.

That script that they wrote is an example of something I call a regenerative build tool.  There are others.  Jester is a regenerative build tool which uses mutation testing to find problems.  It changes your code in subtle ways and runs your tests to see whether they still pass.  If they do, you either don't have the tests you need to have, or you could have code which is really doesn't contribute to your results at all -- zombie code.  Guantanamo is another regenerative build tool, a rather severe one.  It deletes all code that isn't covered by a set of tests.

I'm sure there are plenty of regenerative build tools that we haven't thought of yet.  And, that's a shame.  Our spare computing resources can offer us a great deal.  We just have to find creative ways to use them.

Talk Back!

Have an opinion? Readers have already posted 6 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Michael Feathers adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Michael has been active in the XP community for the past five years, balancing his time between working with, training, and coaching various teams around the world. Prior to joining Object Mentor, Michael designed a proprietary programming language and wrote a compiler for it, he also designed a large multi-platform class library and a framework for instrumentation control. When he isn't engaged with a team, he spends most of this time investigating ways of altering design over time in codebases.

This weblog entry is Copyright © 2007 Michael Feathers. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use