See for example
https://github.com/OpenHands/software-agent-sdk/pull/3497/changes#diff-11cea73f79bdd101b3b9fd57ce0a795426d1548e602e51d3bf84be4e55abe82d
In that PR, suggested fix is 3 lines, for that it creates 19 lines of comments. Those 19 lines are noise, they are okay as a PR description, but should not live in code. Reasons:
- they are redundant, repeating things that can be noticed in the code.
- they are redundant, repeating things that can be notice in the PR description or with git blame.
- they describe non local part of the system without any mechanism to be up to date, so they can drift with time.
Over all comments should be used strategically for unintuitive things, for anything else code should be structured in such a way that meaning is clear.
See for example
https://github.com/OpenHands/software-agent-sdk/pull/3497/changes#diff-11cea73f79bdd101b3b9fd57ce0a795426d1548e602e51d3bf84be4e55abe82d
In that PR, suggested fix is 3 lines, for that it creates 19 lines of comments. Those 19 lines are noise, they are okay as a PR description, but should not live in code. Reasons:
Over all comments should be used strategically for unintuitive things, for anything else code should be structured in such a way that meaning is clear.