4 ms·
But with tests you can only prevent those future bugs you managed to think of. Anything you didn't anticipate will not be covered by tests. TDD is useful to bu
by fainpul 1y ago
But with tests you can only prevent those future bugs you managed to think of. Anything you didn't anticipate will not be covered by tests.
TDD is useful to build some initial "guard rails" when writing new code and it's useful to prevent regressions (by adding more guard rails when you notice the program went off the road). You can't just add "all the guard rails ever needed" in advance.
- Retric 1y agoSome classes of bugs need specific tests to find, but I can catch a spelling error without specifically looking for a spelling error. Similarly, bugs often crop up because of interactions which aren’t obvious at the time. Thus the reason a test is failing can be wildly different than the intended use case of a test. Perhaps the test failed because the continuous integration environment has some bad RAM, you’ll need to investigate to discover why a test fails.
- XorNot 1y agoHonestly the way I use testing these days is as a more persistent version of a Jupyter notebook. Some piece of code is just complex enough I don't fully understand it, so hopefully the test framework in language of choice will make it easy enough to isolate it and right a bunch of quick to execute explorations of things I expect and do not expect about it.