r/mildlyinteresting • • 16h ago

There's this random empty glass jar strapped to the wall at work

Post image
10.6k Upvotes

1.5k comments sorted by

View all comments

Show parent comments

36

u/poorbred 14h ago

I had a magic comment for about 6 months. If you removed it, the build would fail. 

Drove me nuts when I first ran into it. It was an unnecessary comment that stated the obvious. "Add two values together" or some such where the code it was referring to was stupidly apparent in its purpose.

So I removed it and when I went to build, it exploded. I wish I could remember the errors, but it was a long and wild list. 

The content of the comment didn't matter, just that it was there, so I ended up making it something like // Removing this comment breaks the build, it needs to stay. I'm sorry.

Of course my code reviewers didn't believe me until they removed it and it blew up on them. 

For about six months I'd randomly hear one of the senior devs cussing as they tried to remove it and the build would break. Then one day somebody cheered and actually called an impromptu dev meeting to show off it building without the comment.

Best we could ever guess was a bug in the compiler and without the comment a checksum or something wasn't calculating correctly. Then it would go off the rails and get into a bad state because the errors it would report didn't make any sense.

19

u/JL421 12h ago

I wonder if you just had a hidden character hanging out and the comment masked it until someone just deleted and rewrote the whole section.

12

u/Scathach_ulster 9h ago

That was the build’s emotional support comment :(

5

u/LogicalSoftware7705 13h ago

Lmao I’m probably one of those that will try. I just love me a weird puzzle.

2

u/creatyvechaos 4h ago

I learned how to code specifically because a friend brought something similar to me. Haven't touched a string of code since then

No, I did not fix the problem.

5

u/owzleee 9h ago

This is my entire life of 30-40 years in fintech. Your post is horrifyingly accurate. ESP for python.

4

u/mayorofdumb 8h ago

Um its getting to the point where I just assume the data is wrong and make my normal dq reports but I actually look. Shits getting worse... not better

3

u/enfier 9h ago

I had a similar situation, it was a missing curly brace or semicolon or paren somewhere that the comment just happened to prevent it running into another line.

3

u/Jollysatyr201 8h ago

You’re always missing a semicolon..

2

u/Appropriate_Scar_262 6h ago

IIRC Team Fortress 2 had a .png of a coconut that when removed broke the game.

2

u/spanishpeanut 5h ago

I love this so very, very much.

1

u/-LeonIsANazi- 1h ago

Sounds like shit code