Only comment things that have business logic complexity
to
Comment non obvious decisions
Because there may be cases where
you have (mathematical) knowledge which the future reader of your code might not have
your code isn't correct but a smart approximation which is good for now
your code isn't correct and no approximation to anything but for reasons outside the code it is written like that. I actually did this where data was sometimes deliberately overwritten with null which was wanted behaviour. So I commented this as
//Customer decision: do this and that else null the value
And when a furture reader stumbles over this line of code he saves time not discussing this point any further
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Absolutely this.
I would rephrase
to
Because there may be cases where
you have (mathematical) knowledge which the future reader of your code might not have
your code isn't correct but a smart approximation which is good for now
your code isn't correct and no approximation to anything but for reasons outside the code it is written like that. I actually did this where data was sometimes deliberately overwritten with null which was wanted behaviour. So I commented this as
//Customer decision: do this and that else null the value
And when a furture reader stumbles over this line of code he saves time not discussing this point any further