I received my copy of Code Complete 2nd Edition today and immediately started reading. I really have things to do, like my job, but I have been waiting for my copy and I wanted to read it.
I was paging through the table of contents and saw Chapter 22 – Developer Testing so I went to that chapter. In the chapter McConnell discusses various types of testing done by developers. I wanted to point out a few sections which I believe are pertinent to TDD.
In the Key Points at the end of the chapter (Page 533) McConnell states:
- Testing by the developer is a key part of a full testing strategy.
- Writing test cases before the code takes the same amount of time and effort as writing test cases after the code, but it shortens defect-detection-debug-correction cycles.
Lastly, in a quote from Page 504, “All in all, I think test-first programming is one of the most beneficial software practices to emerge during the past decade and is a good general approach. But it isn’t a testing panacea, because it is subject to the general limations of developer testing.“
As you might imagine, I happen to agree entirely.
I am enjoying what I have read so far and after I finish the book I will write up a review.