June, 26th, 2014
In the movie "Starship Troopers" the arch foe of mankind are "the Bugs". Interestingly, in our world "the Bugs" are the arch enemy of every programmer.
The most vicious attack of "the Bugs" comes when you are reworking (aka. refactoring) your program—suddenly they creep in, wrecking your valuable work, which formerly worked fine.
The answer is obvious: send out Rico and his Troopers to find and extinguish "the Bugs". However, Rico might not be available, and anyway, those highly qualified resources aren't cheap—somehow there must be a better solution.
Let's hear Martin Fowler:
People also underestimate the time they spend debugging. They underestimate how much time they can spend chasing a long bug. With testing, I know straight away when I added a bug. That lets me fix the bug immediately, before it can crawl off and hide. There are few things more frustrating or time wasting than debugging. Wouldn't it be a hell of a lot quicker if we just didn't create the bugs in the first place?
How could I dare to disagree? Isn't thorough automated testing the only viable way to keep "the Bugs" away, especially when there is the need to refactor the software?