this post was submitted on 04 Apr 2024
1110 points (98.2% liked)

Programmer Humor

19623 readers
507 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
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 7 months ago (1 children)
[โ€“] [email protected] 1 points 7 months ago (1 children)

https://gitmoji.dev/

Quasi parallel reply to your other post, this would kind of echo the want for a capital letter at the start of the commit message. Icon indicates overall topic nature of commits.

Lets say I am adding a database migration and my commit is the migration file and the schema. My commit message might be:

     ๐Ÿ—ƒ๏ธ Add notes to Users table

So anyone looking at the eventual pr will see the icon and know that this bunch of work will affect db without all that tedious "reading the code" part of the review, or for team members who didn't participate in reviews.

I was initially hesitant to adopt it but I have very reasonable, younger team mates for whom emojis are part of the standard vocabulary. I gradually came to appreciate and value the ability to convey more context in my commits this way. I'm still guilty of the occasionally overusing:

   โ™ป๏ธ Fix the thing

type messages when I'm lazy; doesn't fix that bad habit, but I'm generally much happier reading mine or someone else's PR commit summary with this extra bit of context added.

[โ€“] [email protected] 1 points 7 months ago (1 children)

I looked at it and there's a lot of them!

I see things like adding dependencies but I would add the dependency along with the code that's using it so I have that context. Is the Gitmoji way to break your commits up so that it matches a single category?

[โ€“] [email protected] 2 points 7 months ago (1 children)

Yes, that is another benefit, once you start getting muscle memory with the library. You start to parcel things by context a bit more. It's upped my habit of discrete commit-by-hunks, which also serves as a nice self-review of the work.

[โ€“] [email protected] 1 points 7 months ago* (last edited 7 months ago)

I don't see that as a benefit tbh - if I have a dependency, I want to see why it's there as part of the commit. I'm imagining running blame on Cargo.toml and seeing "Add feature x" vs "Add dependency". I guess the idea is it's "โž• Add dep y for feature x" but I'd still rather be able to see the related code in the same commit instead of having to find the useful commit in the log.

I suppose you could squash them together later, but then why bother splitting it out in the first place?

I see that some use a subset of Gitmoji and that does make sense to me - after all, you wouldn't use all of them in every project anyway, e.g. ๐Ÿท๏ธ types is only relevant for a few languages.