Moving counties is almost infinitely easier than moving countries, or replacing the entire federal bureaucracy to your liking (instead of the liking of that other guy).
What's interesting is you may reply, "hey, how are you?", and lots of people may be satisfied with that. Neither party actually answers how they are, yet the handshake is complete.
The code can only convey what is being done (and then, in some cases, only superficially). It can't convey what decisions were made, what alternatives were discarded, what business motivations may have led to that code.
And for old enough code, the author may not be available, or more likely doesn't remember.
You'll at least need the discipline to include the ticket ID in the message. Links to documentation are ok, but they will likely rot and even if they don't the content may change such that it no longer accurately reflects the commit changes.
Yes, we are on our third ticketing system on our team with dead refs to old issues. PR without a commit documenting why you need a change does not normally get approved and helps a lot also at present and future review time. Lots of value for new devs to see how thinking went and why something exist and not something else etc.
Documenting it also forces people to think why they are adding a change in the first place. Code added without purpose becomes dead weight and tech debt.
Look, I'll make this easy to understand. The parent comment that this stems from said:
> It can't convey what decisions were made, what alternatives were discarded, what business motivations may have led to that code.
If you're advocating this should all go in commit messages then I don't know what to say that I haven't already, it objectively doesn't belong there. The end.
I think we’re advocating for is that it contains a sufficient amount of context. Ideally it’s like “XYZ-123: Enable multi-foo support for Bar”
Links to ticket IDs are good, and good leaders don’t let old ticket links break on bugtracker migration.
A sentence or so to let future devs know what this change meant to do or at least what initiative it was intended to support, is also good. If future devs (even future YOU) don’t know what you were trying to do, they might revert a change which, without context, looks like a mistake.
Doing both ticket link + text is ideal because someone might screw up the ticket system, and a sentence on its own can be ambiguous.
Doing neither, on purpose, is just willful stupidity. Don’t even bother with Git if you want your commits, the ones that end up in “dev” I mean, to all just say “wip,” “asdf,” and “hope it works now.”
Sure but code can't capture everything. Maybe with enough comments I guess, but not code alone. For example, code won't tell you that this feature was timeboxed hence this edgecase was not supported
Having dumb or nonexistent commitment messages has 0% chance of communicating anything. If someone has at least made an effort, a future someone will be able to identify some of the following:
1. What project in general the change was associated with (it may not be obvious from the files changed in this single commit) which can indeed tell you how well it was spec’d- maybe you’ll even find the technical plan.
2. Possibly a hint of how the author intended it to work, or a clue about their misunderstanding. For example, the commit may have changed a function to accept a null argument to “solve” some other problem, but now you know that null passing through here is harmful, well thanks to the commit info, you know that you have to account for the problem that dev was “solving” if you don’t allow the null here. Without that you’d just revert the change and cause the other bug to regress.
Unless something has changed (or I'm simply clueless), it's not quite so trivial to ask where my phone was on January 30th. Camera surveillance is not time-limited.
It’s quite common for cell phone carriers to provide law enforcement with historical records of which towers a phone was connected to at specific times. Also the phone itself stores detailed location history, including which wifi networks it connected to, allowing police to get someone’s movements if their phone is seized as evidence. Police can even use battery temperature history to get an idea of whether the phone was on someone’s body, outside in the heat/cold, etc.
On shared use trails, I suspect your voice might give out (especially given the headphone status of most pedestrians) and a bicycle bell is less ambiguous than a voice, which could be a fast walker, a runner, or a bicyclist.
reply