There is, for those of you not geeky enough to know, a new fad sweeping the world of software development. It’s called “Extreme Programming” or “XP” for short. One of the core concepts of XP is testing, specifically test first design or test driven development (TDD). So, all this is well and good for new projects, but what about me? I’m stuck with thousands of lines of code written by the previous developer. Not a test in site. Most of it desperately needs to be refactored. Now, your typical XP fanatic would say “So, write the tests before you refactor” and I’m sure that’s the “right” thing to do. But I don’t. Instead, I just dive in, refactor away and then think “Hey, this is the big money maker. I need to test!” And then I remember (in addition to all the TDD hype I’ve been hearing) that you should never do something twice when you can write a program. So, today I wrote a bunch of tests. And found a bunch of bugs. And saved myself a bunch of grief. And, quite possibly, save the firm some money. I should do this more often!