r/TheMachineLearning • • 24d ago

Frontier LLMs stopped adding code comments

Post image
720 Upvotes

178 comments sorted by

View all comments

Show parent comments

4

u/xvillifyx 24d 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 24d 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 24d 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 23d 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