3 ms·
> Reading code for correctness takes only a moment It absolutely does not, especially when you take a step outside the simplest code. Even if I know how to ve
by lawn 2y ago
> Reading code for correctness takes only a moment
It absolutely does not, especially when you take a step outside the simplest code.
Even if I know how to verify it, that can take longer than writing it myself because there might be many different ways to solve the problem, with different logic, trade-offs and failure states.
> Furthermore, code which is meant to be depended upon should come with tests, and if those tests pass with bad code, the tests are wrong.
You can't "fix" bad code with tests. Even if you could get a perfect test coverage for bugs (you can't), there's no test that capturers soft attributes like readibility and maintainability.