Cram your test driven development up your ass....

Sam Hart

2008-04-03 14:57:09

I vow today that I will never allow some blinkard, narrow-visioned, elitist Test-Driven-Development (TDD), Agile or XP (EXTREEEM PROGRAMMING!!!11one1eleventeen) cock-sucker push me around again. I also vow that I will fight these religious zealots with their pigheaded belief that TDD is the end-all, be-all solution to everything, until my last dying breath.

Seriously, not since... well... never.. have I felt so strongly about a particular technical methodology. I may rant about the cults of elitism surrounding git or vi, but they can't even remotely approach the level of elitism and self-assuredness of correctness in spite of ample contradictory evidence as the TDD crowd. For those practitioners and proselytizers of TDD, you're either with them or you're some sort of mentally retarded misanthrope who writes shitty code and probably eats babies.

What is TDD, and why do I hate it so? Well, let's explore the subject a bit deeper, shall we?

TDD, or test driven development, is the process by which you solve programmatic problems by first developing test code that tests for an expected condition, and then write your code towards the test. When the test succeeds, you're done. Generally speaking, the process runs like this:

On paper and in theory, this sounds very appealing. You have a verifiable measurement of success (the new test succeeding without breaking the old ones), you have to think about the problem up front and form a solution before even starting to hack on the code (in order to write a test), and you are forced to break larger tasks into smaller, more manageable ones. Wonderful, no? Just looking at it makes one all wet and creamy, don't it?

Well, like a lot of things, the method breaks down in practice, and breaks down in ways that the vast majority of TDD practitioners are blind to. Furthermore, the process becomes a crutch by which mediocre developers can "get by" without really having to strive very hard at bettering themselves.

The Problems of TDD

So let's take a look at just a few of the specific problems of TDD. This wont be a complete list by any means, rather some of the important ones, in my view, that TDD-zealots often overlook.

I could go on, but I grow weary of it. If you think about the above, you should be able to see plenty of other problems with TDD.

Richard Dawkins once described himself as militantly atheistic. As loath as I am to honestly claim to be militantly anything, I feel I must proclaim that I am militantly anti-TDD. The TDD movement has entirely too much momentum when you consider its flaws and shortcomings, and it simply must be knocked down a peg.