16Sep/060
TDD devs can fool themselves
This post by Eric Sink at the Daily WTF is a perfect example of one of the things I think is wrong with TDD.
I was ashamed of myself when I wrote this, but the fact is that it allowed me to move forward and all of my unit tests pass.
Granted, it wouldn’t be hard to create a unit test which causes this code to fail.
I’ve said all along that if “Red – Green – Refactor” is your goal, you’ll find ways to make sure that bar stays green, even if it means fudging your tests a little. You’ll “get to that later”. This coupled with the fact that you can’t always think of EVERY possibe failing scenario means that TDD is usually just extra work.


