this post was submitted on 12 Jul 2025
428 points (100.0% liked)

Programmer Humor

26132 readers
1305 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 2 years ago
MODERATORS
 
top 22 comments
sorted by: hot top controversial new old
[–] Drekaridill@feddit.is 68 points 1 month ago (1 children)

I inherited code that contained files that were last updated in 1997

[–] bleistift2@sopuli.xyz 45 points 1 month ago (3 children)

That isn’t a bad thing. On the contrary, according to the open-closed principle, you should strive for writing code you never have to touch again.

[–] magic_lobster_party@fedia.io 55 points 1 month ago (1 children)

There’s a difference between ” it hasn’t changed because it doesn’t need to be changed” and ” it hasn’t changed because it’s impossible to predict the impact of any change, and no one wants to be responsible for things breaking”.

[–] rothaine@lemmy.zip 36 points 1 month ago

I was once spelunking a file that hadn't been touched in like 7 years, and there was a weird line where it was adding 2 to the index for seemingly no reason. The comment was like // Sam: not sure why this is off by 2 here. See ticket #12345 for discussion

Whatever issue tracking software it was referencing was no longer used, so that ticket was gone, and who TF is Sam?

[–] otacon239@lemmy.world 20 points 1 month ago

And that’s why so many core Linux utilities have worked almost exactly as they did from the very beginning. If your input and output demand no changes, the only improvements left to make are performance.

[–] Drekaridill@feddit.is 4 points 1 month ago

I haven't touched those files. The code works, I don't need to change it. I've mostly been working on the later additions.

[–] hakunawazo@lemmy.world 45 points 1 month ago

Even if it was my code, after 6 years:

[–] baggachipz@sh.itjust.works 32 points 1 month ago (1 children)

“Who the fuck wrote this garbage?! …..oh.”

[–] bleistift2@sopuli.xyz 23 points 1 month ago (2 children)

Ah yes, the “fuck it, no-one is going to use this” code.

[–] Drewmeister@lemmy.world 13 points 1 month ago

I've written semi-personal tools that other team members sometimes use that will break in 2100. The comments note this and really hope they aren't still using these by then

[–] colournoun@beehaw.org 4 points 1 month ago

Or the “too critical and poorly documented so nobody dares change it” code. Good Luck!

[–] Jankatarch@lemmy.world 23 points 1 month ago (2 children)
[–] affiliate@lemmy.world 18 points 1 month ago

don’t do this to me

[–] lessthanluigi@lemmy.sdf.org 8 points 1 month ago* (last edited 1 month ago)

I keep forgetting 2019 is not 1 year ago

[–] traches@sh.itjust.works 20 points 1 month ago

I mean if it’s worked without modification for 6 years….

[–] frezik@lemmy.blahaj.zone 13 points 1 month ago

I get to say that I've truly made it as a programmer. The reason is that I wrote around 75 lines of Rust, came back a year later, and I could see exactly how it works.

In case you're wondering, it's a command line Slack client for sending notifications. Colored highlights and everything.

[–] Gullible@sh.itjust.works 12 points 1 month ago

“Lmao, who runs mathematically optimized assembly? Let’s get this objective-c rewrite going.”

[–] MonkderVierte@lemmy.zip 5 points 1 month ago (1 children)

One title would have been enough.

[–] Zachariah@lemmy.world 3 points 1 month ago

When you're working on a file that was last updated six years ago

[–] JasonDJ@lemmy.zip 4 points 1 month ago
[–] axEl7fB5@lemmy.cafe 1 points 1 month ago

Can't relate, unless you're editing .gitignore or LICENSE files for some reason.