Tuesday, December 16, 2008
"We need to do TDD" said the client.
"Our team is not producing quality code, and aren't performing up to our expectations."
"So, we need to introduce TDD to make sure we get what we need."

Uh-huh I thought. Thinking to myself... so, why aren't your developers producing quality code? What are they doing instead? Are they even unit testing at all now? Do they know how to test or are unit tests just an afterthought? oh yeah, and are there any other methodologies you need to add for your team to be buzzword-compliant!?

TDD is not just a buzzword. TDD is not just a methodology a team can adopt if they are in trouble. Not hardly. TDD is the top of the pyramid. It requires a mind-shift that is not tremendously difficult, but at the same time is very difficult to accomplish without discipline. Not every team is ready for this step. I would hope to have a cohesive, collaborative, and performant team, teach them how to write good tests (first or last), show them how acceptance criteria can be automated into tests that guide the team toward completion. After going through all of these pieces, I would then introduce TDD as a small thing, and the discipline required would probably already be there at that point.

While it may be in vogue to say a team is "agile" and uses "tdd" (note: here in lower case) it's much more important that a team is producing quality software - buzzwords or not. I am not exactly advocating non-tdd practices, but on the other hand we need to be practical about delivery also. If a team can truly do test-driven development, then congratulations I say, they are well positioned to be at the top of the heap. If not, I would try to lead the team in the direction to be ready for TDD, whether or not it gets used. Strong unit testing along with other kinds of testing will deliver the quality that customers need. So, evolve. Learn, Test well. And, if you can, use TDD.. it's great!

TDD
Tuesday, December 16, 2008 6:33:12 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Tuesday, December 09, 2008
"TDD makes code development take longer."
Yes, it does. 15-30% longer.

"TDD *may* reduce bug counts..."
Real TDD WILL reduce bug counts. Expect about an order of magnitude. 60-90% comparably.

"I don't want to pay up front for testing or make the code take longer to be feature complete."
That is one choice - but it will be a costly one... Defects will not only be more frequent, but they will probably take longer to fix and be more complex as well.

From a financial perspective, (aside from the customer satisfaction) TDD just makes fiscal sense. I think we would need a compelling reason to give management and shareholders why we are NOT using it.

There is a new video posted on Channel 9 of an interview of one of the Microsoft researchers who contributed to a set of case studies published earlier this year. The case studies were done on 4 teams (3 Microsoft and 1 IBM), and they seem to agree with the statistics and team performance numbers I have been citing for years.

These numbers are motivators for me, and some of the primary reasons I practice TDD, support it, and try to spread the word.

Please take a look at the report and see for yourself if you agree...

TDD
Tuesday, December 09, 2008 12:17:56 PM (Pacific Standard Time, UTC-08:00)  #    Comments [2]  | 
© Copyright 2010, John E. Boal