r/TheMachineLearning • • 26d ago

Frontier LLMs stopped adding code comments

Post image
720 Upvotes

178 comments sorted by

View all comments

0

u/FragmentedHeap 26d 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.

4

u/xvillifyx 26d ago

YOU don’t need to, but AI memory systems are garbage and concise code comments help preserve context in place of memory

1

u/BlurredSight 26d ago

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

1

u/AdKitchen1897 26d ago

It will also poison the repo with outdated or contradictory comments. And it will make out of an offhand comment for context a permanent rule.

1

u/xvillifyx 26d ago

This isn’t true as a default. The rule for comments has always been:

Is the logic likely to change -> keep comments to a minimum

Is the logic unlikely to change -> comments okay

Make your agents follow this same convention