Skip to main content

Dear John…er...I Mean Debugger

Posted by sspielman on October 1, 2003 at 6:09 PM PDT

Dear John…er...I mean Debugger:

We’ve had a really good time together over the past 20 years. There’s never been just one of you of course. My debuggers have changed languages many times. First, it was Pascal, then C, then C++, and now, naturally, Java. But throughout our relationship, your purpose in my life has always remained the same. You helped me weed out those nasty bugs and make my code shine like the sun. Now the time has come to reevaluate the time we spend together.

We’ve spent hours and hours frolicking at breakpoints, contemplating the meaning of the stack, and chatting into the wee hours of the morning. We’ve danced, stepped into, and stepped over who knows how many methods and lines of code. As I look back, there is no development tool that could ever take your place in my heart. However, it seems over the last year or two we are spending less and less time with each other. How should I tell you this? My time is now spent with my test cases.

Test driven development has reduced the need, or requirement, for me to be in the debugger. While maybe not eliminating the need for you altogether, it recently dawned on me that I rarely have to fire up the debugger at all. After all, if you are writing test cases before you are writing code there’s nothing to debug. As you start writing the code, the test cases will validate your code for you. By doing frequent, short iterations and running your tests after each and every change, you find many bugs immediately. If you don’t find these bugs early, they can turn into hard to track down problems later on in the development cycle. With tools such as JUnit and the whole JUnit family (Cactus, HTTPUnit, etc) available, unit test cases have become automated and repeatable. The more I’ve gotten into the TDD habit; the less and less I’ve actually been in the debugger. Which is just fine by me. Because however much I loved my debugger, seeing the green bar is much more of a joy.

While I can’t tell you, my dear debugger, when we’ll meet again, I can tell you that you definitely served your purpose and your keystroke commands are ingrained in my brain for all eternity.

Related Topics >>