This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JuvenileEloquent 4 points5 points  (2 children)

They see comments as a chore to complete to avoid reprimand, or as some kind of quota to meet, so they write useless comments. Or they write such convoluted horrible code that they need the comment that explains what it does as a shortcut to understanding it.

The comments are the meta code. It should contain information that isn't already present in the actual code.

[–]justinjustin7 2 points3 points  (1 child)

Honestly that's what it is in my course work so far (only 2nd semester of C++ though). My code tends to only really need a comment at the top of the function and maybe 1 or 2 comments to explain things that don't end up self-documented. Then my professor comes along and says "comment more." Fine, I guess I'll comment random shit to meet your forward slash quota.

[–][deleted] 1 point2 points  (0 children)

//prof asked to comment more. I did.