Hard and fast rules are for beginner, but their code is going to be crap anyway.
For everyone else, comments when it makes the most sense is all you need.
I will say that following a few simple principles, when appropriate, like “Don’t Repeat Yourself”, and the “Single Responsibility Principle” tend to lead to smaller methods with clear intent that give better opportunities to name things appropriately.
If I see well laid out code with one or two comments, I’m likely to actually read the comments. Otherwise I view comments as meaningless noise.
Hard and fast rules are for beginner, but their code is going to be crap anyway.
For everyone else, comments when it makes the most sense is all you need.
I will say that following a few simple principles, when appropriate, like “Don’t Repeat Yourself”, and the “Single Responsibility Principle” tend to lead to smaller methods with clear intent that give better opportunities to name things appropriately.
If I see well laid out code with one or two comments, I’m likely to actually read the comments. Otherwise I view comments as meaningless noise.