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.
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Twitter account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
Connecting to %s
Notify me of follow-up comments via email.
Notify me of new posts via email.
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Join 7 other followers
Get every new post delivered to your Inbox.