I just read another great post on Daily WTF (“Boolean Illogic“). Question: Does validation occur when the status is valid?
if (statusIsNotValid.compareTo( Boolean.FALSE ) != 0) skipValidation = false;
Another great example why you should prefer positive logic.
This entry was posted on Friday, August 20th, 2010 at 10:52 and is filed under Software. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Δ
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Email Address:
Sign me up!