Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I don't get why the fact that TDD drives good design is a bad thing.

TDD does not in and of itself lead to good design.



That's also not what he said. It drives good design, but it doesn't do it alone. You are, in fact, saying the same thing in different ways.


> It drives good design

My point is that it does not necessarily drive good design at all. TDD can lead to crappy code just as easily as any other methodology, it is not a silver bullet that will 'in concert with other stuff' always lead to good design.

It may lead to software that performs correctly but that is not the same things as well designed software.

For instance, you might get software that performs terribly, but still correct.


Actually, I'll disagree. TDD revolves around 3 steps. Unfortunately, people forget the 3rd, which is refactoring. By it's very nature, the 3 step process leads to good code. The problem is when people start to skip that ever important 3rd step.

Countless times I've seen so called TDD evolve into merely writing a test, and then writing the code to pass the test, and then ignoring the 3rd step of the process.

Regardless, you are misrepresenting what is being said:

> it is not a silver bullet that will 'in concert with other stuff' always lead to good design.

And no one is suggesting that. You are inferring it. You are being religious in your dislike of TDD zealotry to the point that you are assuming that suggesting that TDD drives good design means using TDD "with other stuff" always leads to good design.

Rather, TDD drives good design means simply that by properly practicing TDD, you are more likely to result in good design precisely because of how TDD works. That doesn't mean you can't sabotage yourself along the way. However, what I've found is that bad design from TDD is generally more difficult to achieve. If you are finding tests difficult to write, your generally going to find your design is bad. I see this all the time, from programmers who are really smart. We'd prefer to believe in our own brilliance then admit we were proven wrong by a mere methodology.

Side note: Their is a lot of zealotry in this thread. It's mostly those against TDD (you'll notice they use the word religious a lot). I'll admit that some can make the troubling leap that TDD is a silver bullet. But, if your instinct is to argue against TDD by claiming it's not a silver bullet, you're not any better. More importantly, why does TDD need to be a silver bullet for it to be worth while? If their is no silver bullet, then no methodology is worth practicing?


You use a lot of expensive words, zealotry, religion and so on. I'd suggest a bit more moderation lest you come across as a zealot yourself.


The words were used precisely because of the topic and the word choices being made by others. They might be expensive, but I can afford it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: