Monday, September 25, 2006

Double Negatives

This beauty was submitted by the amazing and fast rEx.

The culprit was none other than fellow CSOD hunter-gatherer* J-Ra.
if ( IsBadSSN() == false )
{
Result = stBadPersonSSN;
}

Without knowing what IsBadSSN does, one would assume (based on what it sounds like it would do) that this is an error any person with a basic understanding of the English language should be able to catch.

Moral of the story?

Double Negatives in if statements are hard to read.

This would have been better written
if ( ValidSSN() == false )
{
Result = stBadPersonSSN;
}

* hunting and gathering CSOD's for your enjoyment.

0 Comments:

Post a Comment

<< Home