3 ms·
How is it even proper engineering if code is not tested? Granted one can go overboard with testing, but isn't it common sense to ensure code is adequately teste
by sherdil2022 2y ago
How is it even proper engineering if code is not tested? Granted one can go overboard with testing, but isn't it common sense to ensure code is adequately tested?
- deleted 2y ago[deleted]
- Analemma_ 2y agoThe strongest steelman I can make of not testing is that if your system architecture is a mess, then tests accomplish very little except wasting devs' time. If your data flow and module hierarchy is sufficiently bad, then you end up having no choice but writing tests with "mocks that mock mocks that mock mocks", and those are almost never actually useful - at that point you're testing the mocks, not the system. The rebuttal, of course, is that even in this case the tests are still providing value - they're telling you that you badly need a major ground-up refactoring. As a rule of thumb, I've found that mocks are OK, but if I ever see or write a mock which returns another mock, that's a sign all the modules involved need a rewrite. It's not true literally 100% of the time but it has served me well.
- AnimalMuppet 2y agoUsing the difficulty of writing tests as a probe to measure your architecture. Interesting.