|
|
|
|
|
by barakm
1669 days ago
|
|
Another “stupid senior” here and I say go for 75-80%. It’s almost exactly a classic Pareto situation in my book. Parent post is right that lower coverage degrades rapidly... the difference between 65% and 75% is huge. But the ancestor post is right that there’s large diminishing returns too. I’ll qualify this with recommending leaning hard into lints and type checkers and the like. Eliminating whole classes of errors gives the edge; rather than writing test cases in, say, Python to ensure that a string-mangling function raises the “correct” exception if passed an int… just enforce mypy checking instead. And then get your type coverage up to 75-80 percent. Fuzzers too. Get more overall coverage by letting the computer do the work. |
|
When I can't, I ponder.
I see how my design can be aided by coverage and ask "Hey, I don't have coverage for this, why did I write it?"
It's a worthwhile question. I wrote code, but it is hard to exercise easily... why did I write it?
Don't get me wrong, there is a bunch of stupid shit to contend with (I'm looking at you MessageDigest AlgorithmNotFound)