Well, there are some situation where you NEED to use affirmative variable names for boolean variables.
BOOL isOK; // YES/NO is clear BOOL isNotOK; // YES/NO?
In the case of isOK, it’s very clear if it is set to YES or NO.
But for isNotOK, if set to YES, does it mean ‘is not OK’ or ‘is OK’?
If you think more in ‘computer language’, you will be affirmative to the variable.
So, if isNotOK is YES, it is ‘is not OK’, while NO is ‘is not not OK’ ( thus ‘is OK’ ).
However, if you are more ‘human language’ oriented, assigning YES to isNotOK means ‘is OK’, while NO means ‘is not OK’.
Most computer languages are modeled after English.
But people from Germany and Korea would think it differently for negative ones.
YES to negative question is to affirmative to negative question itself.
So, YES to isNotOK is ‘is not OK’ and No to isNotOK is ‘is OK’.
So, let’s use affirmative variable names to reduce confusion. :)