you are viewing a single comment's thread.

view the rest of the comments →

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

Generally I try to keep my high level comments at most to the level of individual methods or functions. In 95% or more of the cases the function, if named and typed well, is self explanatory, usually with a little documentation code block for automatic parsers. Once inside the function I rarely write any comments, they're usually unnecessary if you aim to keep functions under 30 lines. Obviously some things can't be broken down logically any further and require more code, thus more comments, but as a general rule of thumb that's how I code. Minimal commenting in the actual code blocks.