from Hacker News

Is user a goat?

by joshfarrant on 9/23/15, 2:25 PM with 4 comments

  • by brenniemac on 9/23/15, 4:39 PM

    A junior dev once thought it would be funny to quietly slip this into some code right before a release not realizing it had changed in lollipop. He was lucky I happened to have Goat Simulator installed and caught it.

    if (!userManager.isUserAGoat()) { ... Super important business logic ... }

  • by herbig on 9/23/15, 2:54 PM

    public boolean isUserAGoat() { return mContext.getPackageManager() .isPackageAvailable("com.coffeestainstudios.goatsimulator"); }
  • by chillydawg on 9/23/15, 2:37 PM

    Excellent :D Perhaps it should have been mountain goat, though?