Re:Notes on rolling out Cursor and Claude Code
by manojlds on Thursday May 08, 2025 @04:05PM
(#43930729)
Yeah that's what I do, remove the comments as I read through.
Re:Notes on rolling out Cursor and Claude Code
by ellieh on Thursday May 08, 2025 @04:37PM
(#43931049)
You can literally just ask it to not write too many comments, describe the kind of comments you want, and give a couple of examples. Save that in rules or whatever. And it's solved for the future :)
Re:Notes on rolling out Cursor and Claude Code
by dockercompost on Thursday May 08, 2025 @04:58PM
(#43931280)
I tell them to write self-documenting code and to only leave comments when its essential for understanding, and that's worked out pretty well
Re:Notes on rolling out Cursor and Claude Code
by meander_water on Thursday May 08, 2025 @05:52PM
(#43931741)
I've noticed Gemini 2.5 pro does this a lot in Cursor. I'm not sure if it's because it doesn't work well with the system prompt or tools, but it's very annoying. There are comments for nearly every line and it's like it's thinking out loud in comments with lots of TODOS and placeholders.
Re:Notes on rolling out Cursor and Claude Code
by felipeerias on Thursday May 08, 2025 @10:01PM
(#43933160)
That is because it is thinking out loud. Producing tokens is how it thinks.
Re:Notes on rolling out Cursor and Claude Code
by eschaton on Thursday May 08, 2025 @11:41PM
(#43933604)
Producing tokens is all it does, it’s not thinking.
Re:Notes on rolling out Cursor and Claude Code
by NitpickLawyer on Thursday May 08, 2025 @11:57PM
(#43933675)
Eh, you really have to take the "thinking" in quotes, in the LLM context "thinking" out loud is what makes the results better. I think (hah) their point stands.
Re:Notes on rolling out Cursor and Claude Code
by what on Thursday May 08, 2025 @06:25PM
(#43931981)
They tend to add really bad comments though. I was looking at an LLM generated codebase recently and the comments are along the lines of “use our newly created Foo model”, which is pretty useless.
Re:Notes on rolling out Cursor and Claude Code
by duxup on Thursday May 08, 2025 @07:53PM
(#43932511)
I agree. I don’t always keep the comments, but I’m 100% ok with them.
Re:Notes on rolling out Cursor and Claude Code
by robben1234 on Thursday May 08, 2025 @09:57PM
(#43933149)
I work with python codebases and consider comments that answer "what?" instead of "why?" bad.
LLMs tend to write comments answering "what?", sometimes to a silly extent. What I found helping for using Claude 3.7 was to add this rule in cursor. The fake xml tag helped to decrease the number of times it strays from my instructions.
<mandatory_code_instruction>
YOU ARE FORBIDDEN FROM ADDING ANY COMMENTS OR DOCSTRINGS. The only code accepted will be self-documenting code.
</mandatory_code_instruction>
If there's a section of code where a comment answering "why?" is needed this rule doesn't seem to interfere when I explicitly ask it to add it there.
I've seen this complaint a lot, and I honestly don't get it. I have a feeling it helps LLMs write better code. And removing comments can be done in the reading pass, somewhat forcing you to go through the code line by line and "accept" the code that way. In the grand scheme of things, if this were the only downside to using LLM-based coding agents, I think we've come a long way.