logoalt Hacker News

skeledrewtoday at 8:41 PM5 repliesview on HN

Those verbose comments provide context for why something is there way it is, so it can take those decisions in account when making changes in the future.


Replies

rplnttoday at 8:53 PM

> why something is there way it is

It writes out stories describing what isn't there or what used to be there. It's usually not helpful, just noise. It also likes to write it in very verbose AI-styled prose.

show 3 replies
amdsntoday at 8:54 PM

If they have in mind what I think of when I think of claude comments then frequently they are only relevant to the back and forth that produced the code and are exaggerated to the point of being misleading. A very common example is to land on something that isn't quite right or doesn't quite work, prompt an adjustment, and then the adjustment will have some grandiose prose about "preventing the critical bug that shipped once." People just need to clean up such litter manually but it would be nice if the models generated less of it.

hamandcheesetoday at 9:20 PM

The story of how the code got to a certain state belongs primarily in git commit messages, not in comments. Comments should serve to aid in understanding of the code, highlight footguns or hidden dependencies, etc.

Claude very often litters code with comments about decisions that were made within a single session/pull request, its just noise.

fpolingtoday at 8:56 PM

If one needs to dig history, then git log -p and similar are way more useful and reflect the real history rather than LLM inference about it. Comments reflecting the goal are more useful as neither history nor code itself covers it.

bryanlarsentoday at 8:55 PM

Those massive comments generally refer to intermediate states that never shipped, making them utterly useless, noisy and confusing as a permanent artifact. They're sometimes useful to reviewers, so a commit message or pull request comment is much more appropriate.

show 1 reply