Attending a TDD workshop. Uncle Bob's Bowling game Kata is used to as TDD demonstration. This totally change my previous view about TDD.
TDD is not just simple as:
1. write a failed test
2. write production code
3. make test pass
or this Red-Green-Refactor pattern. Actually,
• TDD is design in front, a top down not bottom up approach
• When you practice TDD, you will guarantee have 100% code test coverage. No one line code more, no one line code less. One line code deleted and your test will fail
• Small change in TDD iteration could reduce cycle time
• Debugging no more. Practicing TDD you don't really need debug your code. So that's why average developers use Eclipse, good developers use IntelliJ, great developers use VI
• Copy & paste becomes a problem in TDD. As we all know average developers code code, good developers copy & paste code, great developers steal code. But TDD reduces duplicated code and prevent copy & paste programming
• Believe it or not, TDD can finish coding quicker than traditional write production code first, then write test development cycle
Reference: Bowling Game Kata, _http://butunclebob.com/files/downloads/Bowling%20Game%20Kata.ppt_
Google+: View post on Google+