This post originated from an RSS feed registered with Agile Buzz
by Keith Ray.
Original Post: Test-Driven is Faster
Feed Title: MemoRanda
Feed URL: http://homepage.mac.com/1/homepage404ErrorPage.html
Feed Description: Keith Ray's notes to be remembered on agile software development, project management, oo programming, and other topics.
One point I forgot to make in my previous posting: TDD is faster than test-after and code-n-fix. In Test-Driven Development, testing is part of the design process, it doesn't take much time to write a small test that represents a part of your thinking about a problem. Test-after is slower because the traditional design/code process -- without tests -- takes about the same amount of time as the TDD design/code process, and then the traditional coding time is followed by writing tests that take even more time.
Also, test-driven code is less buggy than the usual results the from code-n-fix approach. Since bug-fixing by itself is a lot longer than the TDD process, code-n-fix with no automated tests is actually slower when you take coding-time + bug-fixing-time into account.
Unfortunately, there is an attitude in this industry that bugs are inevitable, so not much attention is paid to techniques that reduce the creation of bugs -- automated tests, code-reviews, or pair programming. Those of us interested in TDD are still the early-adopters.