4 ms·
I'm tired of people asserting that TDD results in better X, while simultaneously stating that TDD does not guarantee good X. What does that even mean? It sounds
by gambler 13y ago
I'm tired of people asserting that TDD results in better X, while simultaneously stating that TDD does not guarantee good X. What does that even mean? It sounds like a non-falsifiable statement, that aims to blame the person whenever your methodology fails.
Another issues is that no one ever qualifies what exactly is TDD better than? Better than someone vomiting hundreds of lines of code into a single file with no systematic approach? Better than test-last development? Literate programming? Better than Design by Contract, advanced type systems and static verification?
In blogs, TDD proponents often completely ignore the difference between unit tests and integration tests, pretending that there is none, and that TDD will automagically produce both, even when their methodology does not provide any guidance for designing integration test. (The article does this too: "The test suite, that you grow along the way, will help get those features implemented, and bugs fixed, without breaking other features." Uh, not necessarily.)
And what I'm really, really tired of is the assertion that TDD produces not just more reliable, but better-designed and otherwise better code. What I've seen in real life is that TDD encourages developers to bulldoze through the problem by constantly spitting out code and tests without bothering to think at the higher level. That results in a lot of "enterprise Java" style abstractions and fractured code that is extremely hard to read and debug. (Yes, it's easy to understand what every particular unit does, but it's not at all clear how they interact and why we need all of them.)
Here is a simple example of deficiencies of TDD that uses the infamous prime factor Kata: http://insideofthebox.tumblr.com/post/52002125683/prime-factor-kata-my-way http://insideofthebox.tumblr.com/post/52002125683/prime-fact...
There is a great question in that article: which solution would you rather work with if you had to modify it?