DEV Community

Discussion on: I love to document my code. Am I doing it wrong?

Collapse
 
afuerstenau profile image
Alex Fürstenau

If the comment really helps you in this case, why don't you make the code more like the comment?


int age_of_user; or
int age_of_current_user;

That is the better way, in my opinion, since the comment is not necessary and therefore you cannot forget to change comment when the code changes.

"When you feel the need to write a comment, first try to refactor the code so that any comment becomes superflouus." - Martin Fowler

Thread Thread
 
alchermd profile image
John Alcher

That's a good quote!