| ▲ | mattacular 4 days ago | |||||||
Explain "why not what" is good general advice. My further advice for comments is: even bad comments can be useful (unless they're from LLM output maybe...) therefore when in doubt, write a comment. Write it in your own words. Had to add the last sentence for the circa 2020s developer experience. LLM comments are almost never useful since they're supposed to convey meaningful information to another human coder, anything your human brain can think of will probably be more helpful context. | ||||||||
| ▲ | falcor84 4 days ago | parent | next [-] | |||||||
I strongly disagree. If you're using something like Claude Code to generate the code, it has significant context about the task, which from my experience provides very useful (albeit overly verbose) comments. I sometimes edit/rewrite its comments (as I might with the code itself), but I would never ask it to generate uncommented code. | ||||||||
| ▲ | 3371 4 days ago | parent | prev | next [-] | |||||||
I always think LLM comments are more about helping themselves to stay on track. | ||||||||
| ||||||||
| ▲ | CuriouslyC 4 days ago | parent | prev | next [-] | |||||||
AI comments are fine for high level summaries of the what/how. They fail at the why, which is where we come in. | ||||||||
| ▲ | bonesss 3 days ago | parent | prev [-] | |||||||
> even bad comments can be useful Bad comments aren’t just less helpful than possible, they’re often harmful. Once you’ve hit a couple misleading comments in a code base (ie not updated, flatly wrong, or deeply confusing due to term misuse), the calculus swings to actively ignoring those lying lies and reading the code directly. And the kind of mind resorting to prose when struggling to clarify programming frequently struggles with both maintenance and clarity of prose. | ||||||||
| ||||||||