this post was submitted on 11 Sep 2025
816 points (99.6% liked)

Programmer Humor

26332 readers
930 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 26 comments
sorted by: hot top controversial new old
[–] four@lemmy.zip 98 points 4 days ago (2 children)

Senior Dev, 5 years ago, writing that code: "this is going to be a problem in a few years"

[–] KingOfTheCouch@lemmy.ca 37 points 3 days ago

Depending on how many fucks I had to give that day, might have even written that in the comments!

[–] Dagnet@lemmy.world 25 points 3 days ago (1 children)

I even comment that it will be an issue in the future so I don't have to look for it later

[–] AmbiguousProps@lemmy.today 6 points 3 days ago

I just did this today! The good news is that the deployment worked ^for now^

[–] smeg@feddit.uk 35 points 4 days ago (1 children)
[–] Aurenkin@sh.itjust.works 18 points 4 days ago

Uhh, I mean this pragmatic workaround

[–] BartyDeCanter@lemmy.sdf.org 30 points 4 days ago (5 children)

How old was the oldest bug that you discovered that you also wrote? Mine was six years old, a null pointer dereference that worked fine on the original architecture but caused a reset when moving to Cortex-M.

[–] hperrin@lemmy.ca 21 points 4 days ago

Mine was about three years old. I missed an “&” in a query constructor. The way the constructor worked, this was no issue. But that was because of another bug that assumed it was there. One day I fixed that bug. Then the query to get the user’s account didn’t have the whole “& username=“ part and now just returned the first user… admin. So everyone who logged in was admin for about twenty minutes. Had to immediately take the whole system down.

[–] spongebue@lemmy.world 9 points 3 days ago* (last edited 3 days ago)

If it counts, I encountered a Java file that, unbeknownst to me at the time, was duplicated across two different places. The project was essentially abandoned for years, and the file was one that didn't change much so I left it alone for a year or so.

Eventually I had to add a method to it. Compiled just fine, runtime threw a no such method error. Turned out Eclipse was using one, but when Maven did its build it used the old duplicate I didn't know existed.

Took me a while to find that one!

[–] A_norny_mousse@feddit.org 6 points 3 days ago (1 children)

I sometimes look at code I wrote years ago and I'm horrified.

[–] BartyDeCanter@lemmy.sdf.org 2 points 1 day ago

I figure that’s a good thing. It means you’re learning.

[–] Buckshot@programming.dev 4 points 3 days ago

Had a 3 year old one this week. A loop that builds a list of messages to send to a queue for another service to consume then it calls BatchPublish.

Only Batch Publish was inside the loop so instead of sending n messages, it sends 1+2+3... +n

We never noticed before because n was never more then 100 and the consuming service is idempotent so the duplicate messages don't cause issues. I think it's (n(n-1))/2. So n=100 is 4950. That's only 4 minutes work. Also that code only runs at 1am.

Recently n has been hitting 1000 which produces 499500 messages and it takes a few hours to clear and triggers an alarm for delayed processing.

[–] SaharaMaleikuhm@feddit.org 1 points 3 days ago

2 years maybe. Nothing special, just some silly mistake. I can't even remember was it was. I make those all the time.

[–] aeharding@vger.social 21 points 3 days ago (2 children)

There when it was written, but completely forgot 🫠

[–] jol@discuss.tchncs.de 14 points 3 days ago* (last edited 3 days ago) (1 children)

Actually there was a comment in the ancient JIRA scripture:

there's just a small bug, will fix in a follow-up ticket.

But historians never found the fabled follow-up ticket.

Follow up ticket still in the backlog with a comment tagging the PM and PO that says "This needs to be fixed ASAP or we're gonna have a bad time."

Created Date: Four years ago.

[–] Endymion_Mallorn@kbin.melroy.org 18 points 4 days ago (1 children)

That's better than the one "bug" I found. Obviously it was in a spreadsheet that was being touched by too many hands without any level of guidance. Problem is, it was a truly ancient error that the "end users" weren't seeing in their fancy tables or charts. But when I looked at it, it was from when the file was converted from .123 to .xls.

[–] raman_klogius@ani.social 3 points 2 days ago (1 children)

A communal spreadsheet that hadn't had a break for 40 years. She's tired. Let her retire. 🥀

I mean, i could confirm her going back to 123r3, so more than just 20 when I touched the grand lady.

[–] jubilationtcornpone@sh.itjust.works 12 points 3 days ago (1 children)

Reads ticket

...

"Hmmm. Why does this sound really familiar?"

[–] A_norny_mousse@feddit.org 11 points 3 days ago (1 children)

Reminds of "all your future selves" from this Unix koan

[–] CanadaPlus@lemmy.sdf.org 1 points 3 days ago

Man, these pretty much need historical annotations at this point.

[–] SpatchyIsOnline@lemmy.world 3 points 2 days ago

Do you know who wrote the buggy code?

Of course I know him. He's me