« What's Post the PIR? | Main | "Someday this project's gonna end..." »
May 07, 2006
Is TDD really so different?
Recently, in a conversation to an experienced client collegue, I was explaining the benefits of using coded functional tests as a good form of unambiguous requirements and the conversation finished (due to time constraints) with a comment to me along the lines of "but you cannot code against a test, can you?" Unfortunately, I had to delay the conversation that would have ensued about TDD, but whilst doing so I had a bit of an personal epithany about one aspect of TDD and it's seemingly "wacky" approach to development as seen by many people. In essence, it's really very similar to the "classic" cycle of iterative development...
| Classic Development | TDD | |
|---|---|---|
| Step 1 | Ellicit a requirement from the source | |
| Step 2 | Record the requirement as text in a document | Record the requirement as a test |
| Step 3 | Code until the requirement has been satisfied | |
| Step 4 | N/a | Remove duplication |
| Step 5 | Lather, rinse, repeat | |
Fundamentally, the only differences is the medium used to capture the requirements and the "Remove Duplication" step at the end of the TDD cycle, which whilst not proprietary, is hardly groundbreaking.
The key hurdle that people seem to stumble over is the use of a non-documentation form of requirements capture. Their assumption is that a test in a failing state serves no purpose, which is somehow unlike a requirements' document without any backing implementation. But both are examples of requirements yet to be implemented.
If you can get used to the benefits that using a coded test brings you in this area (think lack of ambiguity, guaranteed synchronicity assuming tests are frequently run), then everything else between the two cycles is remarkably similar.
Given this, is TDD really that hard to grok?
Posted by Andy Marks at May 7, 2006 02:08 AM
Comments
yes it is and in fact you too hasn't grok it! TDD is mainly a design technique, NOT a requirement specification tool!
Posted by: Grubs at May 8, 2006 04:21 AM
Post a comment
Thanks for signing in, . Now you can comment. (sign out)
(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)