Skip to content

Instantly share code, notes, and snippets.

@dsosby
Created July 16, 2012 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsosby/3123580 to your computer and use it in GitHub Desktop.
Save dsosby/3123580 to your computer and use it in GitHub Desktop.
boolean isFoo() {
int status = this.getStatus();
return (status != STATUS_BAR &&
status != STATUS_BAZ);
}
vs.
boolean isFoo() {
int status = this.getStatus();
return (status == STATUS_BLAH ||
status == STATUS_BLEE ||
...continues for several more);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment