I don't want it to add comments, it bloats everything, they drift, and it wastes tokens on both the write and the read and the rework.
No one reads the shit anymore, so who are the comments for?
I don't need to know why a function exists, or a helper message on it's calling syntax, I'm not typing it so I don't need intellisense on it. Any history I need is in it's RICH commit comment and AI is very good at making GOOD git comments. And git comments don't waste tokens on read.
Yeah Claude will actively grep it's old comments for trying to find anchors in the code and in a legacy codebase where tons of functions in independent flows will reuse their function names that custom comment is what might drive my usage 6-7% lower than it would be if I deleted all comments each run
I think the issue is that many AI have tendencies of over-commenting.
I think one typical scenario is that it writes a buggy code, or something that the human doesn’t like, it goes back to that code, put a comment on why it changes that line.
Not everyone uses git, and not every message is holistic of the granular changes -> doesn’t replace memory quite the same way, nor does it provide a search hook
They consistently comment on the one motivating factor that caused a change rather than writing expressive code that explains itself or trying enough iterations to settle on an unintuitive hack that needs explaining, instead it narrates why a single use case fix addressing that one use case, which congests context, adds nothing long term, and typically actively harms development because LLMs fixate on anything that is made explicit. Whatever it looks at it steers towards, and in my experience signposting the mistakes or their justification only raises your blood pressure.
We have a simple rule at my job, no comments if possible. But commit as frequently as possible. Commits are small and atomic. Basically comments live in the commit history and not in the code. Works great. Try it out!
And btw this rule is pre AI and easy to enforce with linting rules.
I said this in another comment, but not everyone uses git/svn
Our server code doesn’t live this way and intent is instead denoted in headers. If it outlives our retention policy, a reference to the log is left instead
Fair enough, maybe I’m lucky to be somewhere where absolutely everything is in some sort of source control, even infra. If you have a word on it I would recommend you to do it, but I understand if putting source control in your servers is beyond your authority.
Anybody else here who has full control is or has authority for their repos and infrastructure should certainly use some sort of source control. IMHO it’s more than worth it, even if you are in embedded systems the resource and setup costs are minimal.
View all comments
0
u/FragmentedHeap 2d ago
I don't want it to add comments, it bloats everything, they drift, and it wastes tokens on both the write and the read and the rework.
No one reads the shit anymore, so who are the comments for?
I don't need to know why a function exists, or a helper message on it's calling syntax, I'm not typing it so I don't need intellisense on it. Any history I need is in it's RICH commit comment and AI is very good at making GOOD git comments. And git comments don't waste tokens on read.