this post was submitted on 08 Oct 2024
191 points (91.7% liked)

Programming

17417 readers
81 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

Linus Torvalds expressed frustration over the use of passive voice in merge commit messages, preferring active and imperative language instead.

He provided an example of how commit messages should be rewritten for clarity and consistency across the project.

Torvalds noted that while it's not a major issue, it does add extra work when he has to rewrite messages to match his preference.

you are viewing a single comment's thread
view the rest of the comments
[–] mox@lemmy.sdf.org 149 points 1 month ago (4 children)

I read his message. He didn't seem grumpy or frustrated to me; just encouraging folks to use a certain style that's already in wide use, for reduced noise and better consistency.

[–] otter@lemmy.ca 71 points 1 month ago* (last edited 1 month ago) (4 children)

The message:

"I try to make my merge commit messages be somewhat "cohesive", and so I often edit the pull request language to match a more standard layout and language. It's not a big deal, and often it's literally just about whitespace so that we don't have fifteen different indentation models and bullet syntaxes. I generally do it as I read through the text anyway, so it's not like it makes extra work for me.

But what does make extra work is when some maintainers use passive voice, and then I try to actively rewrite the explanation (or, admittedly, sometimes I just decide I don't care quite enough about trying to make the messages sound the same).

So I would ask maintainers to please use active voice, and preferably just imperative."

Giving an example of a bad commit message, Torvalds provided this example: "In this pull request, the Xyzzy driver error handling was fixed to avoid a NULL pointer dereference." He believes this should have been written as follows: "This fixes a NULL pointer dereference in ..."

[–] Hazzard@lemm.ee 52 points 1 month ago

Honestly, makes sense, the active voice version is just... more efficient and easier to parse quickly.

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

Weird the example he gave isn't imperative, which I think would be "Fix a null pointer dereference in ..."

[–] undefined@links.hackliberty.org 17 points 1 month ago

This is the language I use, once I started I never looked back.

[–] Serinus@lemmy.world 8 points 1 month ago

Usually just start with the verb.

"fix a NULL pointer dereference in ..."

[–] TeoTwawki@lemmy.world 3 points 1 month ago

It's not a big deal, and often it's literally just about whitespace so that we don't have fifteen different indentation models and bullet syntaxes.

[–] xoggy@programming.dev 41 points 1 month ago (1 children)

But it's Linus so everybody likes to think everything he says is blunt and crass.

[–] remotelove@lemmy.ca 23 points 1 month ago (1 children)

Any in many ways, that is the way engineers should speak to other engineers when analyzing a problem.

If two or more people can actually share a common goal of finding the best solution, everyone involved should be making sure that no time is wasted chasing poor solutions. This not only takes the ability to be direct to someone else, but it also requires that you can parse what others are telling you.

If someone makes something personal or takes something personal, they need a break. Go take a short walk or something. (Linus is a different sort of creature though. I get it.)

TBH, this is part of the reason I chose my doctor (GP). She is extremely direct when problem solving and has no problems theory-crafting out loud. Sure, we are social to a degree, but we share many of the same professional mannerisms. (We had a short discussion on that topic the other day, actually. I just made her job easier because I give zero fucks about being judged for any of my personal health issues.)

[–] 0x0@programming.dev 7 points 1 month ago (1 children)

You still should use condoms.

[–] remotelove@lemmy.ca 1 points 1 month ago (1 children)

When I see my Dr. or when I talk to other engineers?

[–] 0x0@programming.dev 1 points 1 month ago

Both, just us'em on your ears when talking to engineers.

[–] thingsiplay@beehaw.org 29 points 1 month ago

"Torvalds complains" makes people click.

[–] horse_battery_staple@lemmy.world 20 points 1 month ago

Agreed this is essentially a style guide.