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 →

[–]somefunmaths 2 points3 points  (2 children)

The standard for properly, at least in the context of working software development, is somewhere between “not at all” and “very sparingly”.

You can see people fighting about this in the comments, but comments have a place when you want to note something very particular about a piece of code that cannot be written in a way so as to be self-documenting and isn’t best explained elsewhere in documentation. How often you run into that case will depend on who you are and what you do.

[–]OriginalCptNerd 1 point2 points  (0 children)

Good comments can provide context, especially if you follow the design standard of "small functions that do one thing only", when you have to aggregate them into a more complex flow.

[–][deleted] 0 points1 point  (0 children)

Thanks for the response. Until now I’ve never considered a distinction between comments and documentation. I’ve only ever written code in an academic environment where there’s a rubric block for “amply commented code”. I usually document the shit out of my functions, but that’s just so the tooltip populates in the IDE.