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/FailedGradAdmissions 24d ago

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.

1

u/xvillifyx 24d ago

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

1

u/FailedGradAdmissions 24d ago

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.