As the topic states, sometimes these issues conflict. For example...
In this case, the nominal case is first, but the expression is negative.
if ( !foo.IsDead() ) {
DoThis();
} else {
DoThat();
}
In this case, the expression is positive, but the nominal case is last.
if ( foo.IsDead() ) {
DoThat();
} else {
DoThis();
}
Of course, a third option would be to flip around the IsDead function to be IsAlive(). I'd like to hear others' thoughts on these 3 choices when they encounter them in coding. Do you go with nominal, positive, or fix the whole thing by flipping the boolean itself.