Red, green, refactor. Red, green, refactor

Posted by Tom on 2006-11-23

That title is pinched blatantly from the excellent Test Driven Development course by fellow Skills Matter instructor and agile programming luminary Craig Larman. Can you still say red/green when you run your tests on the command line? [grin] (Correction: when you run them from Emacs – a very big thanks to this chap).

Yes it’s test-driven-development week here at Hobo central (the above banner, btw, is the tranquil view from Hobo HQ).

After lots of little projects where I’ve been, shall we say, relaxed about my approach to testing, I’m getting back into the swing of a strict test-first approach. My initial reaction – boy does it slow you down! I know without a doubt though, that the perceived slow-down is a temporary thing. The double-whammy of keeping bugs at bay, and giving me the confidence to refactor properly, means the quality-bar stays way-up. Without that it wouldn’t be long before development would simply grind to halt - collapsing under the weight of it’s own unchecked complexity.

So patience is the order of the day – slow but steady wins the race :-)

All this is a rather long-winded way of saying that I haven’t yet put together a simple ajax demo to blog about. I tend to get kinda single-minded when development isn’t going as fast as I’d like it to (it never is!). Fortunately there’s a small rodent with sharp teeth reminding me that there’s more to a project than just coding :-).

Let’s see how things go today. I’m working on the standard tag-library which needs to be as generic as it possibly can be. It turns out I’m not so much building it out (adding tags) as building it “in” (getting the basic set of tags just right). If I make good progress today I’ll see if I can’t knock up that ajax demo for you.