3 ms·
I find test-first most useful when debugging a hairy problem, and I think that's somewhere it's not used enough. Reproducing the bug consistently* is the first
by vitus 5y ago
I find test-first most useful when debugging a hairy problem, and I think that's somewhere it's not used enough.
Reproducing the bug consistently* is the first step to understanding how it works, and how to fix it. And then you get the thrill of trying to turn that test green as you tinker.
...
* Okay, sometimes "consistently" is "fails about 1/100 executions", but that's not so bad if you can run your unit test 1000 times in the span of 30s.
- kragen 5y agoOh, yeah, that's a good point; even people who don't do test-first most of the time will often do it for bug fixes. I think the importance of performance to software quality via automated testing is profoundly underestimated.