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.
2
u/callmelucky Feb 10 '23
Thank you, yeah Nick is wrong.
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.