Earlier this week Scott Bellware wrote a great entry about meaningful tests in a TDD process. I highly suggest you read it. Go. Now. Then come back. I'll wait. OK, ready? Good.
In his post Scott makes the following statement about using the debugger with regards to TDD:
“Debugging code is a slow, time consuming process. Time spent in a debugger is sloth time. You might be thinking that you're perfectly effective in a debugger and that you don't have any objections to doing code validation in a debugger rather than in a well-factored unit test. This is merely an assumption fed by how habituated you are to using a debugger. Without having a TDD practice, you have no basis of comparison for how ineffective debugging is compared to writing well-factored unit tests for well-factored code.“
Now, I'm sure Scott isn't advising to stop using the debugger completely when writing code, but that paragraph does comes close to crossing that line. In fact, I think some people would be lead to believe that he is in fact saying just that. I bring this up because this isn't the first time I've heard statements similar to this.
Having read Scott's blog for some time, I'm completely in agreement that a skilled TDD practitioner is more effective writing higher quality software than a non-TDD person. However, that does not mean the skilled TDD practitioner completely abandons using the debugger. The skilled TDD practitioner just happens to NOT use the debugger to drive his tests. That's the key point to take away. Just because you practice TDD does not mean you should forget your knowledge of how to use the debugger.
Print | posted on Thursday, November 24, 2005 7:02 AM