this post was submitted on 02 Aug 2024
612 points (97.8% liked)
Programmer Humor
19817 readers
1282 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Ive heard of stories where people would have an imposed test coverage percentage requirement... and they would just have a single dummy method that printed "." to the console thousands of times. They then have a single test for that one method, and whenever their codebase grows to big, they add more lines to it so that the dummy method has enough lines to meet the test coverage requirement.
Percentage of lines covered by tests is such a terrible metric.
All metrics are terrible when used for anything other than objective analysis
Yeah, every metric that can be applied automatically ends up becoming useless if people are incentivized to break it
Relevant xkcd
There's always one. Thanks for finding it ❤️