Skip to content

Instantly share code, notes, and snippets.

@amlcurran
Last active July 31, 2016 18:42
Show Gist options
  • Save amlcurran/d8a6a53de9081753b6aa519c4cf1b35b to your computer and use it in GitHub Desktop.
Save amlcurran/d8a6a53de9081753b6aa519c4cf1b35b to your computer and use it in GitHub Desktop.
// this is less descriptive and more difficult to read
if (user.getState() == LoginState.LOGGED_IN && articleList.getQueue().size() > 0) {
uploadArticles();
}
// this is much easier to read and know what's happening
if (user.isLoggedIn() && articleList.hasQueuedArticles()) {
uploadArticles();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment