this post was submitted on 15 Jan 2024
423 points (97.7% liked)

Programmer Humor

18958 readers
1140 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
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 67 points 7 months ago (1 children)
[–] [email protected] 11 points 7 months ago

Meanwhile I'm like

[–] [email protected] 54 points 7 months ago (1 children)

I've seen a changelog that said "Introduced some bugs, so we can fix them later".

It was a joke, but true nonetheless.

[–] [email protected] 7 points 7 months ago

It was a joke

Narrator: Of course, it wasn't.

[–] [email protected] 52 points 7 months ago (4 children)

Good opportunity to say how annoying are update notes like “We are continuing to improve our application. We fixed a couple more issues to make it more stable”. Corporate style, uselessness and the fact that this update can contain some stupid redesign is disgusting.

[–] [email protected] 11 points 7 months ago

"We are constantly improving our application. Please keep updates turned on."

[–] [email protected] 7 points 7 months ago (1 children)

I've reached a point where I avoid these types of updates. An update post like that either means nothing important changed or they're up to something.

A while ago I saw that style of patch notes, updated an app, and suddenly I can't use it anymore because it got limited to a maximum of 2 devices. Another time I updated an app putting a harmless "we improved the user experience" message, they put dark mode behind a paywall. This isn't counting the number of times an app got redesigned to make the user experience worse for no reason. Maybe they wanted to justify hiring 5 UI/UX interns in that quarter or something.

The patch notes look harmless, but my god, they are usually up to something.

load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 45 points 7 months ago* (last edited 7 months ago) (2 children)

Yep, we also got one of these:

and pretty sure the "y" was typo.

[–] [email protected] 32 points 7 months ago (3 children)
[–] [email protected] 7 points 7 months ago

We have the best commit log in the world, because of jail.

[–] [email protected] 6 points 7 months ago

Could be worse. I've got a repo where 30 commits after eachother are just ".". Nothing else.

load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 30 points 7 months ago (1 children)

The people that do this are either inept or experts, no inbetween

[–] funkless_eck 3 points 7 months ago (2 children)

just a hobbyist here, but wouldn't this actually be a good use for AI? Just copy the code and "provide a git committ title for this code"?

[–] [email protected] 7 points 7 months ago

AI might be able to write what you did but not why you did it

load more comments (1 replies)
[–] [email protected] 30 points 7 months ago* (last edited 7 months ago) (2 children)

My personal favorite used to be "Long time no commit"

[–] Croquette 9 points 7 months ago

I call that a checkpoint when I do it. But I do that on my branch that will eventually be squash merged.

[–] [email protected] 6 points 7 months ago

I like to go for dark jam poetry, in those commits.

'why is anything? can it be? desolation - oh wait, that variable is mistyped!'

[–] [email protected] 29 points 7 months ago (3 children)

Every one is using AI to make funny pictures. This is what they should be using it for. Look at my diff, generate a commit message.

[–] [email protected] 14 points 7 months ago (2 children)

If you don't know what you've done within a commit, it probably shouldn't be a single commit, with or without AI Although if you're talking about using AI to make funny commit-messages...

load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 25 points 7 months ago (1 children)

My commits when merged into main generally read like

[Ticket-123] Summary of what was done. Eg: Return user foo property in bar endpoint

  • update bar view to return new foo key
  • update foobrinator to determine foo property
  • update tests

It takes an extra minute or two but it's more informative for the team / future me.

[–] [email protected] 3 points 7 months ago (1 children)

Mine look similar except the body is mostly "the X was doing Y, but it should've been doing Z" or "the docs say bla, $link". I try to separate the individual "update A to do B" in separate commits, but sometimes it just isn't possible.

CC BY-NC-SA 4.0

[–] [email protected] 3 points 7 months ago (1 children)

We squash everything (and rebase rather than merge) so I don't worry much about the individual commits. I like that main is pretty concise and doesn't have a ton of work-in-progess stuff in the log.

[–] [email protected] 4 points 7 months ago (1 children)

We are mortal enemies you and I 😄 I'd much rather have a descriptive commit history than huge commits which make git blame meaningless. Function over beauty for me.

CC BY-NC-SA 4.0

[–] [email protected] 3 points 7 months ago (1 children)

A nemesis! I'm pretty lucky I guess that no one at my workplace has strong git opinions that differ

Do you have multiple people's commits being squashed together? Or how is blame being made useless for you? I'm at a rather small company where generally it's just one person working on a thing at a time. The blame will point to their squashed commit that, if they wrote a good message like the top of this thread, will give you a lot of context.

[–] [email protected] 5 points 7 months ago (1 children)

Imagine finding a bug in angularjs, doing a git blame and finding this commit

feat(module): new module loader

211 changed files with 1,051 additions and 1,242 deletions.

AngularJS isn't even the worst offender. I've seen backports of multiple fixes getting squashed into one commit for "a clean history" with all the useful commit messages ending up in one commit.

Many user stories I've seen implemented in a sprint take multiple days to write. Sometimes they have 5+ commits with a multitude of files changed and (if done right) each commit has an explanation why something was done or at least what was done. Having a granular view of changes also allows finding related changes quickly with less code to read.
If someone changes the implementation of a function call in one commit and it introduces a bug, it's nice to have only that change instead of the entire class with it and changes in other files too. Additional changes mean now you have to read through more code to be sure that the function implementation change was not done due to a modification of the class or whatever else was changed which might be the actual source of the problem.

IMO squashing commits has its uses. It's a tool in a toolbox, but it's not the only tool.

CC BY-NC-SA 4.0

load more comments (1 replies)
[–] catlover 23 points 7 months ago* (last edited 7 months ago) (1 children)

git commit -m 'initial commit'

git commit --amend

git commit --amend

git commit --amend

git commit --amend

....

git commit --amend

[–] [email protected] 3 points 7 months ago (1 children)

It's all fun and games until a git push slides in between...

[–] [email protected] 4 points 7 months ago (1 children)

Always use --force, far fewer errors that way.

I also use git reset instead of merge. It keeps history more linear.

load more comments (1 replies)
[–] [email protected] 22 points 7 months ago

kinda like on google play how it says "what's new: no information from the developer" or "what's new: we regularly update our app to fix bugs, improve performance and add new features".

[–] [email protected] 22 points 7 months ago

Could be worse:

git commit --allow-empty-message -m ""
[–] [email protected] 20 points 7 months ago* (last edited 7 months ago) (2 children)

All praise our lord and saviour git rebase -i!

[–] [email protected] 2 points 7 months ago (1 children)
[–] [email protected] 3 points 7 months ago
load more comments (1 replies)
[–] [email protected] 9 points 7 months ago (1 children)

And I'd bet stuff is still broken!

[–] [email protected] 7 points 7 months ago

Yeah. Definitely. If it was fixed there would be a commit with log 'works now. WTF?!'

[–] [email protected] 7 points 7 months ago (3 children)

At least none of it is WIP...

[–] [email protected] 6 points 7 months ago (1 children)

Meh. At least you know "WIP" means you shouldn't expect that particular commit to work.

[–] [email protected] 3 points 7 months ago

It just has to work enough.

[–] [email protected] 3 points 7 months ago

There are some, but not in the picture 🙃

[–] [email protected] 2 points 7 months ago

Perhaps, but there will a bunch of TODO comments so pick your poison

[–] [email protected] 7 points 7 months ago (1 children)

Maybe they tastefully squash merge when they pr/merge into main.

load more comments (1 replies)
[–] Justas 4 points 7 months ago (5 children)

I remember making a bunch of fixes and calling them after Star Wars movies with the thing I'm fixing or what was broken as the noun.

load more comments (5 replies)
[–] [email protected] 3 points 7 months ago (3 children)

Why user standard version and conventional commits in the first place? When this is only a fraction of purposeful commit messages

load more comments (3 replies)
[–] [email protected] 2 points 7 months ago

Commit messages of my personal projects are filled with just "fix". Life is too short to write a proper commit message

load more comments
view more: next ›