Commit description as a thinking tool
Thread
Loading the complete thread in the background. This saved snapshot is available now. Refresh
Unofficial Hacker News client; not affiliated with Y Combinator.
Commit description as a thinking tool
Loading the complete thread in the background. This saved snapshot is available now. Refresh
Unofficial Hacker News client; not affiliated with Y Combinator.
tombert · · focus · HN ↗
I did this for months without anyone noticing, and eventually my manager schedules a very awkward meeting asking me why I wrote saying “cfquery fucking blows sometimes”. I had to sheepishly explain that I thought it was funny and then I stopped doing that and my commits became much more utilitarian and much less fun.
blmarket · · focus · HN ↗
tombert · · focus · HN ↗
FLeXMurphy · · focus · HN ↗
kccqzy · · focus · HN ↗
Tangent: I once worried about things breaking when commit messages got too long. I tried really long commit messages and nothing broke: <a href="https://github.com/kccqzy/long-commit-messages/commit/ccfda400ebe0248ca4a37d1a087507c7dd455a3b" rel="nofollow">https://github.com/kccqzy/long-commit-messages/commit/ccfda4...
sublinear · · focus · HN ↗
Top level groups high-level concerns (optional). Below that (required) are short distillations of those concerns answering "why". Below that are descriptions of "what" was/wasn't done. A final optional level digs into deeper implementation detail.
The vast majority of my bullet trees are just those two required levels. Each commit message is rarely more than 10 or 15 lines long, and people really appreciate them. I appreciate them too since I'm the most likely to read them.
tommica · · focus · HN ↗
sublinear · · focus · HN ↗
tommica · · focus · HN ↗
nsingh2 · · focus · HN ↗
cerved · · focus · HN ↗
lokar · · focus · HN ↗
zahrevsky · · focus · HN ↗
I guess the main advantages of Git history are that it’s (1) uneditable and (2) directly linked to a specific commit.
mopsi · · focus · HN ↗
tux404 · · focus · HN ↗
The caveat is that docs can go stale while commit messages can't, it forces you to be extra careful so to be sure that the files are being correctly updated, I took care of that with a simple script that checks all the notes.
beybol · · focus · HN ↗
helloimgkeep · · focus · HN ↗
[dead]
sublinear · · focus · HN ↗
The journaling of any iterative process requires clear notes that answer "why?" for each step. This is what will guide future maintenance.
Writing code faster than you can digest and explain it is at odds with this. You will incur runaway technical debt. This was already a problem long before the LLM era.
It is nice that more people are finally realizing this, but I'm still waiting for when we start speaking in generalities again and get over all the hype. Nothing ages writing faster than bringing up the specific tools.
seunosewa · · focus · HN ↗
_verandaguy · · focus · HN ↗
dennisy · · focus · HN ↗
seunosewa · · focus · HN ↗
loopmonster · · focus · HN ↗
seunosewa · · focus · HN ↗
GrinningFool · · focus · HN ↗
cerved · · focus · HN ↗
seunosewa · · focus · HN ↗
bigmadshoe · · focus · HN ↗
sigbottle · · focus · HN ↗
seunosewa · · focus · HN ↗
I believe they can do this due to having millions of public pull requests and github issues in their training data.
cerved · · focus · HN ↗
bigmadshoe · · focus · HN ↗
* business objectives,
* the result of experimentation,
* the result of an offline conversation
etc.
This cannot be captured in code alone. This is why we write commit messages.
seunosewa · · focus · HN ↗
1. I work in small features. I know what I want before the code exists, and I prompt for it. 2. A model from a different family then reads the code cold, without my prompt or the first model's chat, and writes a message explaining what changed and why. 3. I read that message against what I intended. If it states the wrong reason, I see the mismatch. If it misses something only I know, like a business reason or "temporary until X," I add it. The final why always comes from me, either confirmed or written.
dmtry · · focus · HN ↗
Being able to stick a bit of directive text somewhere durable at any point in time has been surprisingly convenient for steering LLMs, as well.
cerved · · focus · HN ↗
WD-42 · · focus · HN ↗
fasterik · · focus · HN ↗
msdz · · focus · HN ↗
And I’ll just say, after this exercise I can definitely concur that writing exposes gaps in your thinking very fast.
ModernMech · · focus · HN ↗
WD-42 · · focus · HN ↗
ModernMech · · focus · HN ↗
WD-42 · · focus · HN ↗
ModernMech · · focus · HN ↗
bunderbunder · · focus · HN ↗
If you do disagree with the idea, though, I would love to hear why because that could indeed be thought provoking. But I don't really feel like the above comment fits the bill. I believe we can safely assume that basic regurgitation is not what they meant by writing, which, if true, makes the above objection something of a nonsequitur.
bgun · · focus · HN ↗
ModernMech · · focus · HN ↗
customguy · · focus · HN ↗
bunderbunder · · focus · HN ↗
The memeing accusation wasn't technically an ad hominem, but it does at least live on that side of town.
ModernMech · · focus · HN ↗
I stated this in an earlier post: "Probably what matters more is the specific process."
> Is the idea that getting enough sleep is healthy also a "meme"?
Yes actually.
> That Alzheimer and cancer suck and have no upsides?
Maybe? I don't think that qualifies, It's more like an emotional response to a disease.
> What is "memeing" in this context?
Repeating memes. In this case "writing is thinking" is a meme in the culturally transmitted idea sense. I don't think it qualifies as thinking because it's just the mechanical propagation of those memes through the culture. So if we're going to classify that and all other stuff one writes down as thought and elevate it, I don't see why prompting an AI isn't among that.
customguy · · focus · HN ↗
I mean sure, "writing is thinking" is shortening something, like "sharing is caring" does. Of course different things are not the same things. But it's not something people just "repeat", and when you ask them why they say it, they can't give you anything. Maybe that's why you're neither asking (why they say that, what they mean etc.) nor telling (in what way you disagree, what you think instead etc.).
> So if we're going to classify that and all other stuff one writes down as thought and elevate it, I don't see why prompting an AI isn't among that.
(IMO) of course it is, who said otherwise? Just the output isn't.
JambalayaJimbo · · focus · HN ↗
[dead]
1718627440 · · focus · HN ↗
customguy · · focus · HN ↗
> If people cannot write well, they cannot think well, and if they cannot think well, others will do their thinking for them.
- George Orwell
customguy · · focus · HN ↗
I still think there is some truth in it, just but it could be expressed less crudely and less arrogantly. For me trying to think honestly is way more important than how "sophisticated" it is.
bunderbunder · · focus · HN ↗
I don't mind farming out the more monotonous bits to AI. When I was letting an agent handle the whole implementation for me, though, I found that I was rediscovering all the pitfalls of waterfall-style development. Because I was doing waterfall-style development. I was trying to pin down all the details in a plan document up front, which is inevitably the point in time where I know the absolute least about the best way to accomplish the task. And then I let the agent do the rest for me, which undermines my opportunity to learn and understand more.
The result was continual accumulation of bad decisions and unnecessary technical debt. The only difference between now and back in the bad old days of 20 years ago is this time instead of being the put-upon code monkey I had become the boneheaded engineering manager who isn't paying attention to the code and doesn't realize what a brittle mess it's become.
gexla · · focus · HN ↗
arialdomartini · · focus · HN ↗
<a href="https://arialdomartini.github.io/pre-emptive-commit-comments" rel="nofollow">https://arialdomartini.github.io/pre-emptive-commit-comments
drdaeman · · focus · HN ↗
xixixao · · focus · HN ↗
sbuttgereit · · focus · HN ↗
SAI_Peregrinus · · focus · HN ↗
TeMPOraL · · focus · HN ↗
arialdomartini · · focus · HN ↗
<a href="https://arialdo.codeberg.page/ju-ju-tsu/tutorial/moving/squash-workflow.html" rel="nofollow">https://arialdo.codeberg.page/ju-ju-tsu/tutorial/moving/squa...
1718627440 · · focus · HN ↗
Sarkie · · focus · HN ↗
Garlef · · focus · HN ↗
(the language... I, for the love of it, can't remember which is which)
tommica · · focus · HN ↗
kayashaolu2 · · focus · HN ↗
[dead]
einpoklum · · focus · HN ↗
No, we are not. Sure, there is a lot of slop-coding/vibe-coding going on, but not much of it in serious code. In my experience and to my knowledge.
Of course, I encounter the opposite problem with humans: They often don't bother to write proper commit messages; and many tend to squash them in favor of giant single-commits which just say "Implemented feature #123".
cerved · · focus · HN ↗
So I've been instructing Claude to commit like Jeff King.
At first, Claude would mainly just cosplay Peff. Emulate the prose and not the process. Over the last few months I've been iterating on it and now Claude writes vastly better commit message than by default.
Initially, Claude would produce A LOT of plausible sounding reasons the LLM "thought" made sense. Instruct an LLM to give reason and it'll give you reasons -- whether they are real or not. After trying to instruct it not to lie, make shit up etc (which did not work) I instead started forcing it to articulate the source of the rationales. Especially which claims where unsubstantiated, and this seems to have helped a lot.
Then I instructed it to do some thorough investigation before it commits.
Start by writing a brief that gathers different "evidence" that underpins a change. The diff itself. The surrounding context. A bit short git log. A blame on the touched lines to see what previous commits touched this code and for what reasons.
Once it's done the agent has to tag each claim according to a category. I.e. what claims are attributed to the change itself (the diff), the inciting incident (gathered from session or if missing, by follow-up questions), what's inferred by the model (unsubstantiated claims.)
Only after this supersize is it tasked with writing a commit message given this brief. Or to ask follow-up questions if there's only unsubstantiated claims or gaps in the brief. Furthermore, it is tasked with writing a note to detail assumptions it has made and, or other relevant bits of information that are not commit message worthy, but possibly still interested in noting down. Decisions made. Options not taken. Possible rationales for the change that didn't make the cut.
All of this tends to make pretty good commit messages. Not perfect, but a good starting point.
Right now my biggest challenge is finding instructions to write the Goldilocks message. Not too brief and not too long. Instruct it to be clear and concise and relevant information gets left out. Say nothing and get a Dostoevsky novel. At least when it writes too long messages it's easy enough to go in afterwards with a `git history reword` and take out the axe.
One of the biggest upsides has been, just as when you read a human that writes commit messages like this, is spotting misunderstandings. Several times I've spotted gaps in the reasoning of the message that doesn't match reality, and caught mistakes. A bit like when you use plan mode.
fg137 · · focus · HN ↗
cerved · · focus · HN ↗
JaumeGar · · focus · HN ↗
[dead]
evnp · · focus · HN ↗
Even more dangerous: when the text _does_ make sense, despite being detached from reality.
fphilipe · · focus · HN ↗
> When writing a commit message, briefly explain at a high level what was done (the details are in the code). Explain the why of the commit; if you don't know that, ask me.
It works quite well. When it doesn't have it in context, it does ask.
ajuc · · focus · HN ↗
dkarl · · focus · HN ↗
At least then the squashed messages were usually pretty decent. But then people started using AI (or AI started using people) to create absolutely massive commit messages that are impossible to skim in git blame and overall very bad for human consumption.
AI has made massive strides in virtually every other way. Why do they continue to write in a wasteful, human-hostile way?
I think we'd have to be be very naive not to suspect that this is intentional. AI companies have a stated goal of replacing humans in the software development process, and they're actively making the process itself inhospitable for humans.
They are injecting massive amounts of text into their customers' development process, which becomes tokens that their customers will then pay them to process over and over again.
luipugs · · focus · HN ↗
flopsamjetsam · · focus · HN ↗
I suppose it's very similar to drafting a letter or an email to someone.
jamietanna · · focus · HN ↗
When AI writes the code for me, I then end up still writing the commit message so I can take ownership of the change myself, make sure I can explain why the change was made and see if there's any missing context that may lead to a different result
pnt12 · · focus · HN ↗
To people who don't like to write a ticket or PR description, the AI text is better than nothing.
kecupochren · · focus · HN ↗
dishantsethi · · focus · HN ↗
[dead]
fowlhowl · · focus · HN ↗
Otterly99 · · focus · HN ↗
First, I have very small implementation steps and each represent a commit. Second, I write the commits myself because it forces me to read the implementation and understand it.
_superposition_ · · focus · HN ↗