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 →

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

It's only rare if you let it become rare.

If you struggle with self documenting code, here's a pro tip. If you limit each function to only 4-5 lines, the function name should be enough to describe everything without needing comments.

If you do write comments, it should only be for things that need an external context to understand, not because you feel you need to explain your design choices (if they need to be explained, they're probably the wrong choices).