TDD Can Be Horseshit?

InfoQ has published a very insightful discussion between Jim Coplien and Bob Martin about some advanced aspects of test-driven-development, unit-testing and software architecture. It's been a while since I have listened to a wise discussion about software architecture like this one.

Check it out: http://www.infoq.com/interviews/coplien-martin-tdd

In case you are wondering, I definitely agree with Jim. Bob is taking TDD way too far, for the sake of "code-purity", rather than business need and I have no interest in that kind of nerdiness :)

To give one example, Bob claims that writing a production code without a unit-test, in 2007, is irresponsible and unprofessional. Too radical! Most of Linux is written without unit-tests, most of Drupal is written without unit-tests. Both of them are awesome examples of quality code that "just works". And the reference to "2007" is just lame. Whatever worked 10 years ago, still does.

Yes, we may have learned some new things and there is definitely some merit to unit-testing, but no production code without a unit-test? Whatever, dude!

Did you watch the video???

Jim never said that TDD was Horseshit. They had a discussion around whether architecture could evolve from "nothing" but tests or whether some a priori domain understanding should be used. Jim Coplien is a brilliant guy and if you're at his level, then god bless you. Everything he said is true. But the majority of programmers I meet aren't anywhere near that level. For those guys, there's no doubt that TDD makes them better.

Sure, I watched it.

I never claimed Jim said TDD was horseshit :) That's something my provocative blog title is asking. :) What Jim said was: "... Agile community since about '99 that architecture is irrelevant, we don't need to do architecture, all we need to do is write a lots of tests and do lots of stories and do quick iterations and the code will assemble itself magically, and this has always been horse shit."

And that is exactly what I agree to, but there're more than disturbing number of books/speakers that claim architecture should "simply" evolve off of unit-tests to be glad that somebody like Jim raises voice against such claims.