r/TheMachineLearning • • 20d ago

Frontier LLMs stopped adding code comments

Post image
720 Upvotes

178 comments sorted by

View all comments

Show parent comments

1

u/FenrirBestDoggo 16d ago

Even claude needs context. Whether its a human or an LLM looking at a piece of code, the only way either will understand why you took a weird route is if you add context to it through a comment. There are genuinly times when the environment calls for some weird workaround, and an LLM that is trained on 'general best practices' will not understand why you did that and just change it to a broken version that might have already been used in the past and failed.

1

u/TheRealSeeThruHead 14d ago

comments are by far the worst context you can give an llm
give them readable code, and types

1

u/FenrirBestDoggo 14d ago

You are missing my point. Code is a means to an end, the comment I am refering to should explain that end if its not self explanatory/obvious.

1

u/tigerhuxley 14d ago

Yeah none of these devs have shipped real products or they wouldnt be saying this.