DEV Community

Discussion on: The Importance of Quality Comments

Collapse
 
mlapierre profile image
Mark Lapierre

Overall I liked this article. It only touches points I've come across before (I would have liked to see at least one reference to one of the many existing articles on the topic), but the specific examples offer an opportunity for re-evaluating my understanding.

But this bothered me:

It’s always better to have too many comments than none at all.

Be careful with absolutes. This is certainly not true. Comments add nothing to simple, straight-forward, self-documenting code.

E.g., Christian Dohnert's example:

// returns name of person
public String getName(){return this.name}
Enter fullscreen mode Exit fullscreen mode