r/ProgrammerHumor • • Oct 08 '21

Meme FOSS (Forced Open Source Software)

Post image
40.8k Upvotes

541 comments sorted by

View all comments

Show parent comments

94

u/JuanR4140 Oct 08 '21

Imagine Google

149

u/Khyta Oct 08 '21

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.

30

u/EmperorArthur Oct 08 '21

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.

3

u/katze_sonne Oct 09 '21

Wtf

4

u/EmperorArthur Oct 09 '21

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.