this post was submitted on 16 Jul 2025
766 points (99.4% liked)

Programmer Humor

26014 readers
971 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 50 comments
sorted by: hot top controversial new old
[–] eager_eagle@lemmy.world 53 points 1 month ago (1 children)

If you write commit messages like this, at least have the decency of squashing them when merging. Thanks.

[–] callouscomic@lemmy.zip 19 points 1 month ago

A PR for every tiny commit. You got it.

[–] tetris11@lemmy.ml 42 points 1 month ago* (last edited 1 month ago) (3 children)

Pleasure by William Wallace

What is this life if, full of care,
We have no time to stand and stare.

No time to stand beneath the boughs
And stare as long as she allows.

No time to see, when woods we pass,
Where squirrels hide deez nuts in grass.

No time to see, in broad daylight,
Streams full of stars, get high at night.

No time to turn at Beauty's glance,
And watch her gangly feet like once.

No time to wait till her mouth can
Fit round that wide hog, whatup fam.

A poor life this if, full of care,
We have no time to stand and stare.

[–] zerofk@lemmy.zip 15 points 1 month ago* (last edited 1 month ago)

Shakespeare may have coined a lot of English words, but only Wallace can claim deez nuts.

[–] match@pawb.social 9 points 1 month ago (1 children)

cannot believe William Wallace gotem through time

[–] tetris11@lemmy.ml 4 points 1 month ago

he was fighting the english with his dope rhymes before he ever held the sword

[–] QuazarOmega@lemy.lol 5 points 1 month ago (1 children)

Really neat, but man, wasn't intending to get teary eyed in the meme community 🥹

[–] tetris11@lemmy.ml 9 points 1 month ago

Yeah me either, so I fixed it

[–] wise_pancake@lemmy.ca 22 points 1 month ago

At a former workplace I created a leaderboard or most swears in commit messages lol

[–] Redkey@programming.dev 21 points 1 month ago* (last edited 1 month ago) (3 children)

At the very least, please state which section you made small changes to, even if you are sure it's not worth mentioning what or why.

[–] InnerScientist@lemmy.world 8 points 1 month ago* (last edited 1 month ago)

"Small changes to everything"
98 files changed, 7568 insertions(+), 1022 deletions(-)

[–] runeko@programming.dev 6 points 1 month ago

"Small changes to a few sections." There. Happy?

[–] merc@sh.itjust.works 2 points 1 month ago

Also, what were you hoping to accomplish? At a minimum, are you fixing a bug? Adding a feature? Cleaning up ugly code? Trying to improve performance? Adding comments to something that wasn't obvious?

Did you change an interface that other people use in a way that might break something? Even if it's fixing a bug, is that a bug that other people might have been relying on?

I think the most problematic changes are the little fixes, because often the CL goes from something that looks like it should work, to something else that also looks like it should work. It's very helpful when the commit message describes how it was broken. Otherwise, if you have to roll back the changes you don't know what might get broken again.

[–] GissaMittJobb@lemmy.ml 20 points 1 month ago (2 children)

Curate your commits, friends. They should be structured for the benefit of the reviewer. This can be accomplished with liberal use of interactive rebasing.

[–] Whelks_chance@lemmy.world 12 points 1 month ago

It's fine, the reviewer doesn't have time to actually look at the code anyway. Lgtm, ship it.

[–] QuazarOmega@lemy.lol 4 points 1 month ago (2 children)

My best work happens between typing out random stuff and pulling my hair out in the squash and reordering

[–] GissaMittJobb@lemmy.ml 8 points 1 month ago (1 children)

When in doubt, soft reset everything and commit from the ground up.

[–] QuazarOmega@lemy.lol 2 points 1 month ago

That's also a good option

[–] Anafabula@discuss.tchncs.de 4 points 1 month ago (1 children)
[–] QuazarOmega@lemy.lol 3 points 1 month ago

I keep putting that off, but maybe I should really dive into that.
Thanks for telling me about the TUI btw, I didn't know we had that too now!

[–] eager_eagle@lemmy.world 17 points 1 month ago (1 children)

git commit -m 'a meaningful message'

[–] Matt 4 points 1 month ago

This is where I thought it was going as well.

[–] cannonship@lemmy.world 16 points 1 month ago (6 children)

thank god now we've AI to do this

[–] expr@programming.dev 9 points 1 month ago
load more comments (4 replies)
[–] limer@lemmy.dbzer0.com 14 points 1 month ago (3 children)

“Sometimes the best way to fix a bug is to introduce an unstable new feature that will later have many bug reports. But the code will now work. And was only written after email chain that har management involved.”

“This is a temporary fix only, and the feature flag it’s under should be turned off after pull request 203. Under no circumstances should bug reports 1923 and 2045 use this new feature to fix issues, even if hours of work can be saved using this ”

“I am blameless for any future issues caused by using this new feature. Here be dragons.”

[–] marcos@lemmy.world 5 points 1 month ago (1 children)

You should put this at the code, or at the flag documentation. The one place you it can't go at all is in a commit message.

[–] limer@lemmy.dbzer0.com 4 points 1 month ago

Have better docs in those places; but for a class A mess, like above, make sure the approvers see this front and center. Make them sign for it

[–] baines@lemmy.cafe 2 points 1 month ago

“this is temporary test code that should be removed before delivery to the customer”

this is real

load more comments (1 replies)
[–] NocturnalMorning@lemmy.world 10 points 1 month ago

I once found a commit message in our commit history that just said, "i hate git..." bcz they hadn't changed anything, and I think it took a new line character and decided that they'd actually changed like 5 lines of code twhen they hadn't.

It was the funniest shit, someone who was a senior lead for like 9 years that had left, and 5 years later I find that...

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

git commit -m "A spirit trapped within a tree, no mouth to scream or eyes to see. A cage of bark, a prison of wood. A thing of rage where nature stood."

[–] Ferk@programming.dev 6 points 1 month ago

git commit -m "$(fortune | cowsay)"

[–] PastelKeystone@lemmy.world 8 points 1 month ago (1 children)

Love it.

While folks are thinking about git commit messages I will offer this.

https://cbea.ms/git-commit/

My only criticism of the essay is that the most important bit is listed at number 7.

[–] merc@sh.itjust.works 2 points 1 month ago (2 children)

See also semantic commit messages where you tag every commit with the type of commit: feature, fix, docs, refactor, test, etc.

My only beef with it is that they chose "feat" as a way to shorten the word "feature" when "feat" is already a word that means something different. Not every feature is a feat, and a lot of the biggest feats are actually bug fixes.

load more comments (2 replies)
[–] rumba@lemmy.zip 7 points 1 month ago (1 children)

git commit -m "here is everything in this commit $(tar -czv . | base64)"

[–] InnerScientist@lemmy.world 2 points 1 month ago

Go for broke
git commit -m "It works on my machine $(tar -ca . -C / | base64)"

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

git commit -m "Boss makes a dollar, I make a dime so I comment meaningful on company time"

Always put a ticket number in the commit message. That can make it much easier later to find out what the context was for some weird solution.

[–] jjjalljs@ttrpg.network 2 points 1 month ago* (last edited 1 month ago) (1 children)

I've worked with a few people who are just incomprehensible. One refuses to write commit messages of any detail. Just "work in progress". Cast him into the pit.

There was another guy that refused to name his tests. His code was like

describe(''. () => {
  it('', () => {
     expect(someFunc()).toEqual(0);
  }
 it('', () => {
    expect(someFunc(1)).toEqual(0);
  }
 it('', () => {
   expect(someFunc("").toEqual(1);
 }
}

He was like, "Test names are like comments and they turn into lies! So I'm not going to do it."

I was like, a. what the fuck. b. do you also not name your files? projects? children?

He was working at a very big company last I heard.

edit: If you're unfamiliar, the convention is to put a human readable description where those empty strings are. This is used in the test output. If one fails, it'll typically tell include the name in the output.

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

I get the hesitation that things can turn into lies, but that's a sign that you're doing things wrong. That also tends to happen to comments that are far away from the relevant code, like the documentation of a 100 line function. The function can change while the comment is no longer visible on the screen, so it's easy to forget to also fix the comment.

But test strings like that are designed to avoid that problem. They're right there next to your tests for a reason. You should always be right next to them when you're changing the test.

Fundamentally, this is something that has to be addressed with code reviews. If someone can commit their changes to a group repository without anybody else seeing them, you're going to get stuff like this. As soon as you get decent code reviews, you can just reject a change where there are tests without documentation, the same way you can reject a change to a test where the documentation is now out of date.

[–] jjjalljs@ttrpg.network 2 points 1 month ago

Code reviews are important. Unfortunately, no-test-text guy convinced his whole team that he was right, and I wasn't able to block it. I'd scheduled a meeting to try to get the wider org to adopt a more sensible standard, but then there was a mass layoff 🤷

The other guy with the bad messages is at a tiny startup where they've laid off almost everyone, and the other 2 guys don't want to make waves. The CEO is big on "just ship it" (and also "why are there bugs in production? this is unacceptable!!")

[–] MTK@lemmy.world 2 points 1 month ago* (last edited 1 month ago)

For complex changes go with "self-explanatory" just to fuck with peoples' confidence

load more comments
view more: next ›