Refactoring contributed by Bill Murphy and Martin Fowler
if ( !isSummer( date ) ) charge = winterCharge( quantity ); else charge = summerCharge( quantity );
if ( isSummer( date ) ) charge = summerCharge( quantity ); else charge = winterCharge( quantity );
Often conditionals can be phrased in way that makes them hard to read. This is particularly the case when they have a not in front of them. If the conditional only has a "then" clause and no "else" clause, this is reasonable. However if the conditional has both clauses, then you might as well reverse the conditional.