Skip to content

Is user a goat?

developer.android.com
29 pointsjoshfarrant4 comments
On HN

Comments

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 ... }

public boolean isUserAGoat() { return mContext.getPackageManager() .isPackageAvailable("com.coffeestainstudios.goatsimulator"); }

I thought this was a joke at first, but this is apparently the genuine implementation: https://android.googlesource.com/platform/frameworks/base/+/...

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

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.