3 ms·
In my experience, TDD has a bit of a similar effect on your perception on a problem. By first designing the test that would make the code fail, then making sur
by bsaul 5y ago
In my experience, TDD has a bit of a similar effect on your perception on a problem.
By first designing the test that would make the code fail, then making sure it fails, then create the code to have the test pass, you kind of change the way you think about the original problem, and it sometimes helps.
- named-user 5y agoUnit tests only catch known failure modes. TDD only catches assumed known failure modes.
- jerf 5y agoThat's not a particularly relevant criticism here. The point is that TDD teaches you to think adversarially about your code all the time. The fact that you are not always successful isn't a very interesting criticism; if you don't think adversarially about your code at all you're even less successful. "Testing can't catch all bugs!" is an objection for another discussion.
- rileymat2 5y agoThat’s not true, tests also cover happy path, so you can catch failures you had no idea about for instance when running them in a different environment, with a different os, with a different compiler.