3 ms·
It's like design patterns, scrum etc.. When the tool is used correctly it is awesome. When it's mis-used it becomes a cargo cult style liability. With TDD
by lgleason 10y ago
It's like design patterns, scrum etc.. When the tool is used correctly it is awesome. When it's mis-used it becomes a cargo cult style liability.
With TDD a large part of the religion thing comes from people like Uncle Bob. It's not that his style is bad, but the biggest problem I've seen with his style is when people who are already passionate with their craft and maybe practicing TDD go crazy with his advice while missing the context of his message.
That context is his focus towards systematically sloppy corporate shops that have picked up really bad habits and won't touch the tool.....often the same ones that still use a waterfall development process (now with a thin scrum veneer). When you have these kinds of shops it is probably better to to a bit to the other extreme first, and to then find a happy medium after you develop better habits and understand the tool
.
- BeetleB 10y ago>With TDD a large part of the religion thing comes from people like Uncle Bob. It's not that his style is bad, but the biggest problem I've seen with his style is when people who are already passionate with their craft and maybe practicing TDD go crazy with his advice while missing the context of his message. I honestly don't know what Bob should do. I know he occasionally says stuff that gets people upset. However, the majority of the stuff that is attributed to him is just outright false. It doesn't matter how many times he publicly corrects the record. Uncle Bob does not believe in unit testing every function. Uncle Bob does not believe in a 1:1 mapping of function with unit test (or even close). Uncle Bob is fine if a unit test spans/covers multiple functions. Uncle Bob is not against unit tests that touch the database or disk. The list goes on and on. I watched many of his Clean Coder videos, and was surprised to see how nuanced he is. He does not speak in absolutes. His blog posts are much less polished, and often get him into trouble. But even there I see a fair amount of nuance.
- Silhouette 10y agoHe does not speak in absolutes. Not as often as some of his critics might suggest, perhaps, but he really does speak in absolutes at times and some of those absolutes really are as foolish as his critics say. He also frequently adopts a style that presents his personal opinions and experiences as if they were more than that, despite a lack of other evidence to support his positions or even the existence of other evidence that seems to undermine those positions. While he may hide a small disclaimer somewhere, many of his readers aren't going to see it, and I don't believe for a moment that he isn't fully aware of that when he chooses to present his material as he does.
- prance 10y agoI agree, but even Uncle Bob advocated TDD not as a religion of itself, but as a means to achieve the underlying goal - test your code. In one of his articles he mentioned that there are very few cases where he deems it acceptable to not write unit tests immediately, but one such scenario is where you develop your code interactively using a REPL. Of course it's still better to then create the unit tests for regression testing, refactoring etc. But the point is that the most important thing is simply that the code is tested somehow. Basically what agentultra said above.