2 ms·
People who write bad code also write bad tests. People who write good code write good tests, but you can argue that their code quality would be more or less the
by iamleppert 8y ago
People who write bad code also write bad tests. People who write good code write good tests, but you can argue that their code quality would be more or less the same without the tests.
A far better use of time is to write better code and spend time improving the actual code along with human readable documentation about what said code is doing. I've removed and reduced 1000's of lines of code and their accompanying technical debt (tests) to reduce the system down into a manageable and fully readable system that is far superior to the old system with the exhaustive test suite and spent the rest of the time writing documentation on how the code works.
- RandallBrown 8y agoHow did you know that the code still worked after you refactored it? At the very least, the tests are a list of things the code should do.
- jazoom 8y agoTry it and see if it works?
- posixplz 8y agoWhat could possibly go wrong? If a refactor is sufficiently canonical that "try it" is acceptable, and you have little/no edge cases, then it should be trivial to write a good test for the same code. After all, what does a test do, besides "try it"?