770
Unexplained Phenomena (s3.us-east-005.backblazeb2.com)

Source: https://musicians.today/@barnetboy/113475747574177779

Mastodon: @barnetboy@musicians.today

you are viewing a single comment's thread
view the rest of the comments
[-] GarlicToast@programming.dev 67 points 2 days ago

// This line does nothing, however removing it causes production to crash. DO NOT REMOVE

[-] troyunrau@lemmy.ca 39 points 2 days ago

I love hitting these things in the real world. Not the big, but the comment. You just know someone spent a fortune in time and company resources to never solve the problem and their frustration level was ragequit. But then something stupid like adding

while (0){};

Suddenly made it work and they were like, fuckit.

Usually it's a bug somewhere in a compiler trying to over optimize or something and putting the line in there caused the optimization not to happen or something. Black magic.

The downside is that the compiler bug probably gets fixed, and then decades later the comment and line are still there...

[-] zea_64@lemmy.blahaj.zone 11 points 2 days ago

And then the compiler updates to get better at spotting optimization opportunities and it blows up again

load more comments (3 replies)
load more comments (4 replies)
this post was submitted on 13 Nov 2024
770 points (99.5% liked)

Programmer Humor

19551 readers
658 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

founded 1 year ago
MODERATORS