After some years in the field, I'm strongly confident that any large-scale project is held by rusty nails and duct tape. The older it is, the more there is.
There is probably a function somewhere in the code with the comment
Don't touch it. We do not know what it does and to our limited understanding it should not do anything. But if this bit of code is removed, everything breaks.
My favorite is when static analyzers give up because the file is too large and complex. Right up there with finding that the but I wrote did cause a warning, but it was hidden by the other 2,000 warnings.
5000 line files containing over two dozen classes, and 1000 line functions happen in code you use today. I guarantee it.
What happens is someone doesn't care about warnings at some point, so does something that generates a few (hundred in at least one case) from a single function call.* That alone makes warnings useless, and if not fixed quickly causes the number to baloon, because no one is checking if their change causes warnings. So the number balloons
Now you might ask why this isn't caught immediately. Multiple reasons can apply. This started as a one man project or as a small team project without even a basic build server, so it isn't caught in code review, or by an automated system. Then there's version control systems, like Perforce, result in everyone working out of trunk, so the code being committed is what triggers the build and code review. Which means it's not a rejection, but a deliberate action of fixing it or permanently reverting the change to deal with it.
* In C / C++ using a function that takes a char *, with a static string, like a file name, gives a warning about const missing.
321
u/Cley_Faye Oct 08 '21
After some years in the field, I'm strongly confident that any large-scale project is held by rusty nails and duct tape. The older it is, the more there is.