Stephen Freeman Rotating Header Image

Test-Driven Development is not an elite technique.

This “Darwinian” post that TDD Is Not For the Weak says that not everyone can cope with TDD, it’s for “the Alpha, the strong, the experienced”. I don’t want to believe this, because I think that developers who can’t cope with any level of TDD shouldn’t be coding at all, so I won’t.

This claim has been made for every technical innovation I’ve seen so far (objects, event-driven programming, etc, etc). Sometimes it’s true, but most of the time it’s about what people are used to. Michael Feathers pointed out a while ago that the Ruby community is happily exploiting techniques such as meta-programming that were traditionally regarded as needing a safe pair of hands. What’s changed is that a generation has grown up with meta-programming and doesn’t regard it as problematic. Of course, there will be a degradation in understanding as an idea rolls out beyond its originators, but there’s still some value that gets through.

Sure there’s a role for people to help the generation that is struggling to pick up a new technique, but that doesn’t mean that TDD itself will always be beyond the range of mortal developers.


  1. Martin Cron says:

    If I were really elite, strong, and experienced, I wouldn’t need tests, because I would be able to hold all of this stuff in my brain at once, write everything perfectly the first time, and never make changes that would break stuff that was previously working.

    I just finished a pretty big refactoring project (pure refactoring, the external interfaces and behavior are the same but the underlying implementation was different) of an existing working system. Every time I got an edge case behavior wrong, introduced a bad side-effect, or removed a necessary side-effect (yuck) the tests went from green to red. This saved me at least a day of development and testing time, and reduced the chances that I would introduce any bugs to the product.

  2. @Martin So, you’re saying that TDD is only for the weak? 🙂

  3. Social comments and analytics for this post…

    This post was mentioned on Twitter by emeraldimp: RT @virtualgenius Thank you @sf105! “Test-Driven Development is not an elite technique”

  4. toni says:

    I actually think IT is for an elite of people and there are way too many mediocre developers around the world…

    You need commitment, will to learn and improve, sometimes looking at some IT departments I think what if all these people were working in an hospital or in any mission critical field?

    The fact that they’re not able to do TDD doesn’t surprise me, it’s a consequence not a root cause.

  5. I’ve worked with a varied range of developers, from the elite to the fresh graduate. Trying to get a talented programmer who has never experienced TDD to write tests first is much harder than teaching a new programmer how to write tests. Bad habits are hard to break, but when you have no habits, it’s much easier to learn how to do things ‘properly’.

    I support your statement that people who don’t TDD shouldn’t write code. You may write perfect code and make it clean, well factored and all other great habits, but after 2 years in production and 10s of changes, that code will be totally unrecognisable. If it isn’t TDD, it isn’t maintainable.

  6. Mat Roberts says:

    Well, recently I’ve been trying to test some of my jQuery code, and get the tests integrated with the build.

    Now, while I’m sure it’s technically possible, and some guys out there will say “that’s easy you just blah blah blah…..” The reality of it, is it’s taken a lot of perseverance, and I still haven’t adequately solved the problem.

    My experience is you have to make a real effort to get started with TDD – getting going is not for the weak willed. Once you’ve got started and you have a few tests in place it’s much easier.

  7. @Mat Agreed. The most important thing is to get started. It does take time and effort to learn TDD, just as any for any skill. And, as @chris points out, it’s even harder to unlearn old habits.

Leave a Reply

Your email address will not be published. Required fields are marked *