← Back to context

Comment by BobbyTables2

6 days ago

Unfortunately high code coverage is misaligned with high quality code.

If one copy-pastes a routine to make a modified version (that’s used), code coverage goes UP. Sounds like a win win for many…

Later, someone consolidates the two near identical routines during a proper refactoring. They can even add unit tests. Guess what? Code coverage goes DOWN!

Sure, having untested un-executed code is a truly horrible thing. But focusing on coverage can be worse…

Didn't we quickly turn against TDD after it became unavoidably obvious that it doesn't work?

What is which this new paradigm where we act like everything is easily measurable and every measure is perfectly aligned with what we want to measure. We know these things aren't possible. It doesn't take much thought to verify this. Do you believe you are smart enough to test all possible issues? No one is. There'd be no CVEs if you could and we'd have solved all of physics centuries ago