this post was submitted on 20 May 2026
1423 points (99.8% liked)

Programmer Humor

31683 readers
1417 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 3 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] rockSlayer@lemmy.blahaj.zone 239 points 2 weeks ago (17 children)

god, this code is awful. Who wrote this?

git blame

Oh

[–] hdsrob@lemmy.world 116 points 2 weeks ago (2 children)

Been writing the same software for 20+ years now, don't even need git blame to figure out what asshole wrote this shit.

[–] SystemDisc@lemmy.dbzer0.com 19 points 2 weeks ago

Why is it always me? Haha

[–] Feathercrown@lemmy.world 8 points 2 weeks ago

Yup there are certain patterns that I can just tell

[–] Feathercrown@lemmy.world 75 points 2 weeks ago (3 children)

I love that they called it "blame" lol. They knew what it would be used for.

[–] affenlehrer@feddit.org 23 points 2 weeks ago

Not sure if was there from the beginning but it was originally developed by Linus Torvalds and he can be quite harsh to the Linux contributors.

[–] myotheraccount@lemmy.world 21 points 2 weeks ago

Subversion tried to call it "annotate", but that didn't stick ;)

load more comments (1 replies)
[–] NotSteve_@lemmy.ca 28 points 2 weeks ago (1 children)

That exact chain of events happened to me at my last job and I audibly laughed realising it was my own code. To my own credit though, it was a file I had written four years prior which at that point was more than half my whole career in the past

[–] some_designer_dude@lemmy.world 28 points 2 weeks ago

If you aren’t ashamed of your work a year ago, you’re stagnating!

Sometimes you don't even recognize your own trash, 6 weeks later.

[–] dan@upvote.au 13 points 2 weeks ago

These days I see so much AI slop that my reaction when I see code I hand-wrote myself is "hey, that's pretty good".

My team's code is great, but we use a lot of shared code written by other teams, with varying levels of quality.

[–] Hettyc_Tracyn@lemmy.zip 9 points 2 weeks ago (2 children)

I mean, admitting you have a problem is the first step to a solution…

[–] marcos@lemmy.world 8 points 2 weeks ago (1 children)

Oh, man. Can you tell what the second step is? I'd really like to learn that.

load more comments (1 replies)
load more comments (1 replies)
load more comments (11 replies)
[–] Ensign_Crab@lemmy.world 120 points 2 weeks ago* (last edited 2 weeks ago) (3 children)

especially your own code.

"This is obvious" I said. "Surely I won't need to comment this," I said.

[–] ipkpjersi@lemmy.ml 26 points 2 weeks ago (1 children)

The worst part is when I leave comments and still wonder wtf I was thinking.

load more comments (1 replies)
load more comments (1 replies)
[–] Feathercrown@lemmy.world 97 points 2 weeks ago (3 children)
load more comments (3 replies)
[–] WesternInfidels@feddit.online 67 points 2 weeks ago* (last edited 2 weeks ago) (15 children)

I go back and look at my old code and find it clear and beautiful, easy to understand, a pleasure to read. "Ah yes," I'll say to myself, "that approach was clever and elegant. Gosh, past me was pretty smart!"

I like to appreciate it in this manner. Because that way, for a moment at least, I can forget about how it doesn't actually work.

[–] MonkderVierte@lemmy.zip 25 points 2 weeks ago

But it would work beautifully, if it would work.

load more comments (14 replies)
[–] thirstyhyena@lemmy.world 52 points 2 weeks ago (2 children)

As the sole programmer of a certain project, I often leave rant comment on what the previous programmer was thinking.

[–] ScriptSage@lemmy.zip 24 points 2 weeks ago

I was complaining to my friends about how bad the programming was on a project I was wrapping up and then they asked, "Isn't this a personal hobby project?" yes it is.

load more comments (1 replies)
[–] aeronmelon@lemmy.world 29 points 2 weeks ago (3 children)

Electrical engineer: “what was that other guy thinking?”

Software engineer: “What was I thinking?” (It’s code from last night)

[–] rumba@lemmy.zip 11 points 2 weeks ago (1 children)

We went out for drinks one night after work. Upon stumbling back to the office, I remembered I had forgotten that I signed up to make a tool page to mange some data ingest. It was due first AM. I was three sheets to the wind. Fired up LAMP stack, took the samples and made an ingest function. Wired up a textbox, tested it and went home.

Next AM, I turned it in, there was a minor bug. No problem, I'll just find the issue and they'll be good to go.

cracked the scripts open...

I could read it. I could see what a lot of it did. I could NOT figure out what some of it was there for. I spent 30m trying to figure out what I was doing. it was only a couple hundred lines. It wasn't even a copy/paste job. Eventually I ran out of time and just leaned into phpdump, and breakpoints to find the exact error. One function hit a bonefied php bug that caused the debug to go silent. large swaths of the code were unreachable due to essentially a couple of typos. The only reason it worked as well as it did was because their sample data was as simple as imaginable. I put on some Nine Inch Nails and just remade it in about 30 minutes (10m before it was absolutely needed)

load more comments (1 replies)
load more comments (2 replies)
[–] rumba@lemmy.zip 20 points 2 weeks ago (4 children)

I watched a team invent a new language to get around updating some eccentric code.

They could have sat down and commented it and made their changes

They could have refactored what was there.

They could have scrapped it and wrote fresh

Instead, they designed an entire natural language system so that non-programmers who were writing in XML could just write in English.

They ended up making so many required keywords as helpers that the non-programmers kept using the old system because the XML was easier for them work with.

Note: wasn't my code, wasn't my dept, when I heard the plan I went to check it out, the old system was functional but like C- work at best. At some point, they wrote a compiler for the new system.

[–] lime@feddit.nu 8 points 2 weeks ago* (last edited 2 weeks ago) (2 children)
load more comments (2 replies)
load more comments (3 replies)
[–] NigelFrobisher@aussie.zone 19 points 2 weeks ago

Also, the previous engineer was me.

[–] Aceticon@lemmy.dbzer0.com 19 points 2 weeks ago (1 children)

I'll bitch and moan about my own work from a few months ago "before I knew better".

load more comments (1 replies)
[–] AllHailTheSheep@sh.itjust.works 16 points 2 weeks ago

I wrote code today I know I will have to touch in 2 weeks. I'm already dreading it. that shits a mess.

[–] WhyDoYouThinkThat@lemmy.world 16 points 2 weeks ago (2 children)

i hate when it's not one person's fault but like, ten years of bloat. who do i hate for that

[–] explodicle@sh.itjust.works 10 points 2 weeks ago (1 children)
load more comments (1 replies)
load more comments (1 replies)
[–] kamen@lemmy.world 13 points 2 weeks ago (2 children)

"Which idiot would do that?"

* looks at git blame for the section and promptly shuts up *

load more comments (2 replies)
[–] TrickDacy@lemmy.world 12 points 2 weeks ago

I don't think you have to be a software engineer to understand that people do shit half-assed.

[–] lime@feddit.nu 10 points 2 weeks ago

i did some fun metaprogramming today. i can practically hear my future self screaming.

[–] A_Union_of_Kobolds@lemmy.world 9 points 2 weeks ago* (last edited 2 weeks ago) (3 children)

Am electrician can confirm

If I dont do it the homeowner tries to and I have to awkwardly nod instead of fixing the problem and that just takes so much longer

load more comments (3 replies)
[–] bedwyr@piefed.ca 8 points 2 weeks ago (1 children)

Electricians are a rather self-impressed bunch in my experience, like I would rather drink with a couple plumbers than electricians.

[–] SirSamuel@lemmy.world 8 points 2 weeks ago (1 children)

Electricians think their way is the only way. Get three electricians together and you'll get four ways of running the conduit, and a six hour argument. Electricians are constantly upset because "those bastards in HVAC put the ductwork in my way". There are three types of screw an electrician will run into in the field, which is why the average electrician owns forty-seven screwdrivers.

Plumbers only need to know three things:

  1. Poop rolls downhill
  2. Payday is Friday
  3. Don't chew your fingernails

Oh, and if you want to piss off a pipe fitter, call them a plumber

load more comments (1 replies)
load more comments
view more: next ›