I don’t do TDD

It’s time to be honest. Hands up who truly writes tests before code all the time? I know I don’t and I bet you don’t either. Has the sky fallen? Nope. So why have I spent so many years attempting to live up to the expectations and ideals of community voices who make me feel somehow inadequate because I can’t quite achieve the standards they strongly advocate and appear to live by themselves? I don’t have an answer as to why, other than me falsely believing that “they” know it all whilst I’m a mere mortal who knows sweet F.A. Well, that time is gone. Anyone who preaches a point of view to the exclusion of all others is as of now deleted from my twitter and RSS feeds because I don’t want their dogmatic mantra negatively impacting my self belief. The job is hard enough without trying to live up to some meaningless ideal.

So, I don’t do TDD, but I do write tests when they add value for me. I also write integration tests, again, because they add value. I use my many years of experience to make a judgement call as to when I test and what I test and it hasn’t let me down yet. In fact, these last couple of years I’m happier than I’ve ever been with the code I’ve been writing and the architectural styles I’ve adopted and yet that has coincided with me backing off from the dogmatic TDD mantra. On the other hand, I gladly acknowledge the part that the TDD movement has played in my ability to write good clean, naturally testable code over the pre-TDD years that I was a developer. It certainly has value in as far as teaching people to think about the design of their code (and I know people who could certainly benefit from it in that way) but then, so do other principles and heuristics such as SOLID and design patterns but we only use these when appropriate and do not try and stuff them in wherever we can.

Although it looks like I’m attacking TDD here, what I’m really saying isn’t about TDD as such and whether or not it’s good or bad. It could apply to many other aspects of software development where certain “authorities” try and make us feel like we’re somehow inadequate if we don’t do it their way. I’d have more respect if they didn’t then try to sell us hours worth of video footage, milking all they can from their expertise. If it (whatever it happens to be) works for you then great. We all have favourite techniques that we’re more inclined to adopt but don’t become one of the religious zealots trying to shove it down everyone else’s throat. It leaves a bad taste and turns people into old cynics like me. More pragmatism, less dogma please.

I don’t do TDD

2 thoughts on “I don’t do TDD

  1. Den says:

    That’s because you don’t make your living by selling TDD books/courses. And you haven’t been brain-washed by those who do.

  2. RalfW says:


    TDD is just a tool. And TDD has a historic context.

    So TDD needs interpretation, not blind application.
    It has its merits. It´s useful. Rather try to follow it than don´t do automatic tests ;-)
    But slavishly checking off each and every rule set up by many world renowned advocates is too much, I´d say.

    There is a TDD echo chamber – and we should try to keep out of it. Like any echo chamber. But sometimes it´s hard to knwo, you´re in one ;-)

Comments are closed.