5 ms·
DHH largely creates a straw man: the fanatical, religious TDD devotee who blindly worships at the Altar of Unit Tests. For an enormous majority of the wider dev
by mbillie1 12y ago
DHH largely creates a straw man: the fanatical, religious TDD devotee who blindly worships at the Altar of Unit Tests. For an enormous majority of the wider development community (who do no testing whatsoever outside of click-the-thing-and-see-if-it-works), TDD is an easy to understand, easy to get started way to improve the quality of your code. I haven't met any of these supposed religious zealots DHH is railing about, and I worked for an "Agile Consultancy".
Also, DHH argues against plenty of other best practices / design patterns and is considered incorrect in many of these cases (his "only use the Rails classes" objections to having a service layer most famously). It just so happens that when he bashes something that a lot of developers don't like to do already (write unit tests), the pitchforks rally behind him.
It's the same sort of thing when people post articles on HN bashing pair programming, or open workspaces. We get it. Some of you really don't like change, or anything "agile". Now please stop beating the dead horse already.
- SoftwareMaven 12y agoI think you mis-characterize people's concern for pair programming and open workspaces. That alone makes me wonder how objectively you can look at this topic. TDD has become a foundational tenet of agile, so any criticisms of it naturally get seen as a criticism of agile (similar to open spaces and pair programming). There's more than one way to skin a cat, and it isn't always fear of change that keeps people from changing.
- bowlofpetunias 12y ago> TDD has become a foundational tenet of agile Dear god, please take the straw man out back and shoot him already. There really is no way to have an intellectually honest discussion about these subjects, is there?
- Jtsummers 12y ago> TDD has become a foundational tenet of agile When I see "agile" and "tenet" in the same sentence, I think "government shop". An explicitly flexible premise (Agile) does not have "one true way" to do anything.
- spamizbad 12y ago> DHH largely creates a straw man: the fanatical, religious TDD devotee who blindly worships at the Altar of Unit Tests. That's not a straw man: That's real life. I've worked with people like this. They're fairly common in TDD shops. You even see them on Hacker News making spurious claims like how TDD would have prevented the <security hole> in <framework> (nevermind the fact that that <framework>'s dev teams is heavily invested in TDD)
- kasey_junk 12y agoAnd I've worked in TDD shops for years and never seen the fanatical TDD devotee. I have seen lots of developers that will use any excuse they can find not to provide automated tests for their code.
- mbillie1 12y agoI've worked for one of the biggest agile consultancies around, and while most of the developers write unit tests, I never met anyone who started frothing at the mouth if we wrote code before tests. I just don't buy the pervasiveness of these TDD-devotees to the degree that justifies all of this backlash, DHH articles, HN comments, etc.
- raverbashing 12y agoYou probably got lucky. But yeah, they exist
- deleted 12y ago[deleted]
- agentultra 12y agoI've seen code bases designed from the tests first and they were pleasant to work with. I've worked jobs where it was my responsibility to salvage undocumented, untested legacy code and extend it with new features while keeping it running. The truth is rarely in the extremes being characterized in these blog posts and discussion threads. The only kind of test code I've seen that required far too many mocks and dependency injections tend to result from poor design choices and writing the tests after the functionality. If TDD as a practice doesn't work for you, that's fine -- but I think it's disingenuous to offer no alternatives. Integration testing isn't an alternative; I use them in concert with a well tested code base. And I use whole-system tests too. DHH works in a small corner of the field. TDD may not work well for Rails applications is all I've been able to glean from his posts. I think that's a battle for the Ruby/Rails community to have. It doesn't discredit TDD one bit.
- scrozier 12y agoI've met plenty of these devotees. I'm not sure that they practice what they preach, but I have felt the wrath of their judgment, to the point that I hate "admitting" that I don't believe in TDD. I, for one, am pleased that DHH has made my world a little brighter.
- mbillie1 12y ago> I have felt the wrath of their judgment, to the point that I hate "admitting" that I don't believe in TDD I'm not sure if you're exaggerating a little, but I think that having colleagues whose wrath makes you hesitant to express yourself is an entirely different issue from that of test-driven development or not. Development is a fairly easy field in which to demonstrate that you're at least as correct in your methodologies as another developer: just produce quality code. This feels (as these arguments very often feel to me) like a personality issue more than a methodological one.
- _random_ 12y ago"For an enormous majority of the wider development community" => noise generated does not equal the size of the community.