I'm the world's biggest fan of unit tests, but one minor drawback I've noticed is they encourage some sort of intellectual sloppiness with bugs... it's too easy to fix bugs by just meander around and patch things until tests pass, without a deeper understanding of why.
14
1
61
Feels like another variant, of Goodhart's law.
Unit tests become our success metric, and human nature being what it is we then optimize to that metric. As opposed to some abstract 'code quality'.
en.wikipedia.org/wiki/Goodha…
1
4
I feel like this would happen without the unit tests in place, though, right? The reporting case essentially becomes a unit test (regression test) when it is confirmed that it represents a bug, and ppl who would flail around at unit tests will just flail around at the reprex...
1



