Remix.run Logo
▲ preg_match 2 hours ago

I agree 100%. Most people use comments wrong, and LLMs use the comments the most wrong. Comments should explain some context you can’t get by just reading the code. Some weirdo business decision or why you’re choosing to use the strategy you’re using.

▲intorio an hour ago | parent | next [-]

That's not my experience with LLMs, at least not Opus. They love inserting comments that describe context I provided when I saw it making a code decision I disagreed with and asked for a change, sometimes it can be excessive.

▲LadyCailin 30 minutes ago | parent [-]

It’s so obnoxious. I’ve put something in my md file telling it not to leak irrelevant conversation history or unnecessary reassurance into comments. “This method does X, not Y”. No one expected it to do Y, until you said that, and now everyone is going to be confused as to why Y was apparently on the table at all!

▲nunez an hour ago | parent | prev [-]

Glad I'm not alone in thinking this. AI adds comments for EVERYTHING by default. It's unnecessary.

▲close04 10 minutes ago | parent [-]

In the past code was written almost exclusively for other coders’ eyes. These days the LLM is right to assume “by default” that the person asking for the code is doing so because they have basic proficiency at best and couldn’t write it themselves. LLMs made this accessible at scale.

So the comments are educational, they explain the code itself. They can’t explain some weirdness because implementing weirdness comes from experience and LLMs have none per se.