TDD Is Dead? Let’s Kill The Messenger Instead!

David H. Hansson (@DHH) sparked the “TDD being dead”  latest twitter storm. DHH is no stranger to controversy, and he certainly picked the right title for it. Of course, the responses followed immediately. and most of them fell directly into his trap.

Most people were defending TDD. How? By saying that Ruby on Rails (originally authored by DHH) was built so badly that TDD was bound to fail on it. Others said DHH simply doesn’t understand TDD, and he’s a bad influence on software newbies. And some cited their excellent record in TDD and how it all made sense and created exquisite code.  They were worried of the impact the article will have on people who don’t understand enough about the topic.

There was a very small minority saying DHH is right, and that TDD was a fad that didn’t live to its promise. They also mentioned failed experiences. Too few voices.

Since I like TDD and  promote it wherever I go, you might think I’d join the pro-TDDists.

Not this time.

TDD doesn’t always work

Anyone who says differently is selling something. So, let’s just ignore the fact that many of the TDD supporters live off TDD in some way (coaches, trainers, yours truly as well). They have an interest in TDD promoted as good, (much like SAFe), and this kind of publicity is bad publicity. But let’s put that aside.

The TDD proponents actually believe that TDD is the best tool for the job. And it many times is.

But surely not all of the time, and for all people. There is no silver bullet, remember?

It may be that with enough experience and acquired skill, we can apply TDD to many problems, with ease and success. Not always.

When I started doing TDD, I dismissed it quickly as good in theory, but  not likely to work in real life. It didn’t work for me then.

Many people in the beginning think the same. Some of them keep working in TDD and see the value, again in some cases. Some drop it off completely.

It’s ok to experience bad TDD.

DHH was right about one more thing, though

Did you notice how quickly (minutes!!) the discussion became about DHH the person, his understanding and skills? Rather than making the discussions about where TDD helps, and where it doesn’t.

We’re really good at religious wars in the software world, aren’t we? Isn’t it ironic that agile always happen in context, but if someone decides to against the stream, and he’s suddenly and obviously he’s wrong?

From contextual ideas to instant dogma in minutes!

As Uncle Bob Martin said in his response (in the more important 2nd half, of the article), TDD is a good tool, and many have found it worked for them.  And as he said, if other tools provide the benefits of TDD, go ahead with them.

I second that. Let me quote one of my favorite sentences in software (somehow related to Bob):

“We are uncovering better ways of developing software by doing it and helping others do it.”

We’re not done uncovering yet. TDD is one item we found on our journey, there are others.

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

JPA Mini Book

Learn how to leverage the power of JPA in order to create robust and flexible Java applications. With this Mini Book, you will get introduced to JPA and smoothly transition to more advanced concepts.

JVM Troubleshooting Guide

The Java virtual machine is really the foundation of any Java EE platform. Learn how to master it with this advanced guide!

Given email address is already subscribed, thank you!
Oops. Something went wrong. Please try again later.
Please provide a valid email address.
Thank you, your sign-up request was successful! Please check your e-mail inbox.
Please complete the CAPTCHA.
Please fill in the required fields.

One Response to "TDD Is Dead? Let’s Kill The Messenger Instead!"

  1. Alexander Volkov says:

    TDD is not for everyone…

    TDD is not for me. As many of us I have tried TDD by letter and dismissed it in its purest form. Why I have tried it and why should everyone try it? TDD provides very powerful message in the form of mantra, i.e. Red-Green-Refactor. Although I do not follow TDD I always keep it in mind as a reminder to (1) write as minimum amount of code as possible before testing it; (2) always test your code; (3) and the most important, after your small piece of code works DO NOT forget to refactor. I love TDD for reminding me to refactor my code right after tests pass. My real mantra is Minimum of Code-Red/Green-Refactor. When you try TDD, whether you succeed or not, you will really appreciate the produced clean code. The simple mantra in your head helps you to be more disciplined and will make sure the basic steps are followed. You can incorporate three TDD steps in your own process any way you want as long as you produce clean code. It is worth it.

Leave a Reply


eight − = 7



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy | Contact
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
Do you want to know how to develop your skillset and become a ...
Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

Get ready to Rock!
You can download the complementary eBooks using the links below:
Close