4 ms·
Y'know, I don't like IDEs or C++ much myself, but I have never, ever regretted the time I took to write tests. I'm not a devoted TDD advocate though; sometimes
by DannoHung 17y ago
Y'know, I don't like IDEs or C++ much myself, but I have never, ever regretted the time I took to write tests. I'm not a devoted TDD advocate though; sometimes I'll think of tests to write first, sometimes I'll write some code first, but I sure like having those tests there pretty soon after I'm done touching the code for the first time.
I'm gonna keep plugging away at tests until they don't make sense to me any longer no matter who tells me they're not needed.
- wglb 17y agoWell, few of my tests are regretted, but then I have done lots of stuff without tests and it goes fine. The system I am working on has undergone several major wrenching changes, and would have required discarding a more complete set of tests had they been done. I am still of two minds on the subject, and look forward to more discussion.
- tptacek 17y agoI've definitely regretted tests. Badly written or ill-conceived tests couple test code to implementation details. On several projects, I've found myself stuck in places where trivial (and necessary) implementation changes necessitated 45+ minutes of test grooming. Testing is good. Long live tests. But be careful not to let the cart drag the horse.
- barrkel 17y agoMy painful experience also. The principle of test-first also sounds appealing, the idea being to write the test code, and thus end up with an easier to use API. It depends on the kind of project, how firm the design is, how much rework will be needed, how prototype-y it is, where the architectural divisions will lie => what's the most testable APIs, etc.