Re:Ask HN: What's the largest amount of bad code you have ev...
by pmarreck on Tuesday November 13, 2018 @11:24PM
(#18447466)
TDD doesn't think for you, it merely validates your own existing understanding/mental model and forces you to come up with it upfront. This is hardly a thing to be mistrustful about, unless you work with idiots.
[ Parent
| on HN ]
Re:Ask HN: What's the largest amount of bad code you have ev...
by mannykannot on Wednesday November 14, 2018 @07:01AM
(#18449220)
You are right about that, but having code that passes a given test suite doesn't say anything about its secondary qualities, such as whether it can be understood. In theory, a failing test could improve your understanding of the situation, allowing you to refactor your initial pass at a solution, but I would bet that on this particular code base, the comprehension-raising doesn't go far enough, in most cases, for this to be feasible.
Re:Ask HN: What's the largest amount of bad code you have ev...
by Huggernaut on Thursday November 15, 2018 @03:19AM
(#18457707)
That seems orthogonal to testing though. Implementation code can be hard to understand with or without a test suite, at least with test, as you point out, you may be able to understand the behaviour at some higher abstraction.
Re:Ask HN: What's the largest amount of bad code you have ev...
by bryanrasmussen on Wednesday November 14, 2018 @03:01AM
(#18448311)
ok but from reading a lot of the comments on HN it sounds like many posters here think that they do work with idiots.
Re:Ask HN: What's the largest amount of bad code you have ev...
by YeGoblynQueenne on Wednesday November 14, 2018 @09:47AM
(#18450160)
Those idiots probably also think the same, though.
Re:Ask HN: What's the largest amount of bad code you have ev...
by setr on Wednesday November 14, 2018 @12:11PM
(#18451493)
If everyone’s an idiot tbinking they’re surrounded by idiots, then TDD has no hope to ever succeed !