4 ms·
We received a bunch of code from another group in this Large Software Company. More than half the code consisted of extra do-nothing layers of abstraction; func
by kabdib 15y ago
We received a bunch of code from another group in this Large Software Company. More than half the code consisted of extra do-nothing layers of abstraction; functions that merely did checking and assertions on their arguments and passed them down to lower layers. There were many redundant assertions (e.g., checking that pointers weren't NULL, many times, and that assignments had "made it"). Working in this code was awful.
One day it dawned on me: This other group had a requirement that all code pass a seventy percent code coverage bar before checkin. This extra "safe" stuff was padding to make it easier for them to pass.
We took this code, ripped it to shreds and shrunk it by a factor of three or four. Sped it up a lot, too.
I don't believe in blind use of software metrics as a method for improving software.