this post was submitted on 27 Jun 2024
254 points (100.0% liked)

Programmer Humor

421 readers
2 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 21 comments
sorted by: hot top controversial new old
[–] snugglebutt@lemmy.blahaj.zone 66 points 4 months ago (5 children)
[–] CodeMonkey@programming.dev 49 points 4 months ago (3 children)

Senior developer tip: squash the evidence.

[–] grrgyle@slrpnk.net 18 points 4 months ago (2 children)

Principle developer tip: rewrite history to make yourself seem smarter.

Soft reset the whole branch and commit a series of atomic and semantic patches (eg separating code, test, and refactor changes) that tell a clean narrative of the changeset to reviewers, future blamers.

[–] JackbyDev@programming.dev 3 points 4 months ago (1 children)

And then my team squashes those commits 😩

[–] grrgyle@slrpnk.net 1 points 4 months ago

Yeah it sucks. If the commits are really helpful, you can just paste the git log into the PR/MR/CR body after it's been merged

[–] xilliah 2 points 4 months ago (1 children)

Do you put effort into your commit messages before the rewrite, or just write something quick for yourself and then put in the effort later?

[–] grrgyle@slrpnk.net 2 points 4 months ago

Depends, but usually I will put in the effort up front and maybe tweak them in an in[eractive rebase, or just manually copy+paste.

If they're worth saving. Sometimes you have to kill your darlings though

[–] sorter_plainview@lemmy.today 6 points 4 months ago

git commit --amend --no-edit

This helped me countless times...

[–] SatouKazuma@programming.dev 3 points 4 months ago

Senior developer tip: Squash ~~the evidence~~ management

[–] RonSijm@programming.dev 7 points 4 months ago
git reset head~9
git add -A
git commit -am 'Rebased lol'
git push -f
[–] xilliah 2 points 4 months ago
[–] mariusafa@lemmy.sdf.org 31 points 4 months ago (1 children)

Please use Conventional Commits. Simple and easy to use. Plus it is very easy so combine with Versioning techniques like Semantic Versioning.

[–] JackbyDev@programming.dev 3 points 4 months ago (1 children)

Any standard that wastes valuable space in the first line of the commit is a hard sell. I don't see the point in including fix/feat/feat! just for the sake of "easy" semantic versioning because generally you know if the next release is going to be major or minor and patches are generally only only after specific bugs. Scanning the commits like this also puts way too much trust in people writing good commit messages which nobody ever seems to do.

Also, I fucking hate standards that use generic names like this. It's like they're declaring themselves the correct choice. Like "git flow".

[–] mariusafa@lemmy.sdf.org 1 points 4 months ago (1 children)

You can always adapt to your how repo. But yeah, that's the point. If you can trust people to make changes on a repo then you should be able to trust them in using some kind of commit structure.

Generic names are probably used in order to crate a familiar, easy to remember, structurized commit format.

[–] JackbyDev@programming.dev 1 points 4 months ago

The generic name I'm complaining about is "conventional commits", not "fix" and "feat"

[–] onlinepersona@programming.dev 13 points 4 months ago* (last edited 4 months ago) (1 children)

Sometimes I'm in awe at the effort people put into these memes. Well done 😄

P.S Now make one about people who squash 100 commits into one without cleaning up the message and have a single commit with 1k added / 2k removed in it for the sake of "clean" history.

Anti Commercial-AI license

[–] JackbyDev@programming.dev 2 points 4 months ago

Yesssss, so true. Anytime people say they want history to be "clean" I insist they explain what they mean because more often than not they're going to suggest something that makes the history way less useful.

[–] eskuero@lemmy.fromshado.ws 8 points 4 months ago

My ass who was sending patches to cyanogenmod gerrit ten years ago would never.

device: msm8916-common: BoardConfig: Build libril from source

[–] datavoid@lemmy.ml 2 points 4 months ago

To real, it hurts