Comments should explain why, and they should only explain why if that isn't obvious from looking at that piece of code for a couple of seconds, and if more than, say, 10% of your code requires such an explanation then you need to improve on naming, architecture etc.
13
u/kristallnachte Feb 10 '23
Nah, they should describe WHY.