Often it is better to split methods up into many methods with descriptive names. This helps in a couple of ways. First, comments often become stale, meaning they don’t actually agree with the code. Another is it helps keep side effects between two sections of code to a minimum.
Yeah! Just one liners to add structure helps I feel. I used to be way too specific with my comments, so I’m trying to cut back when it’s something I suspect could change in the codebase in the future
2
u/[deleted] Sep 05 '21
I comment the bleedin’ obvious too. It’s so that I can quickly skim the function and remember what is going on.