Avoid unnecessary comments

Clear and concise code is crucial for readability and maintainability. While comments can be helpful for explaining complex logic or providing context, excessive or unnecessary comments can indeed clutter the code and make it harder to understand.

It's important to strike a balance between using comments where they're truly needed and writing self-explanatory code that speaks for itself.

  • Comments should not duplicate the code.
  • Good comments do not excuse unclear code.

Bad Code

i = i + 1;         // Add one to i
//Validates the json input.
function validate(json input) returns boolean|error {
}

See Also: