Skip to content

Instantly share code, notes, and snippets.

@jmarkovic
Created July 23, 2014 15:57
Show Gist options
  • Save jmarkovic/c737504b64c6e5b7f4b7 to your computer and use it in GitHub Desktop.
Save jmarkovic/c737504b64c6e5b7f4b7 to your computer and use it in GitHub Desktop.
This is the code I had a pleasure debugging. For some weeks now I'm debating some of my stubborn colleagues who's idea of good code is "if it works, don't change it" no matter how ugly it is. This often generates anti-patters such as exclusivity to AsyncTask for networking, strong references of Context and Activity almost everywhere and so on. T…
if (registrationId.equals("") || registrationId.equals(null)) {
} else {
// // Device is already registered on GCM
if (GCMRegistrar.isRegisteredOnServer(getApplicationContext())) {
} else {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment