4 ms·
Proper use cases for Android UserManager.isUserAGoat()
- king_jester 14y agoYou all laugh, but when I finally build my new app GrssTrckr (track the amount of grass you eat + social integration) this will be super handy.
- frisco 14y agoThis reminds me of the "isUserAMonkey" thread: http://stackoverflow.com/questions/7792123/strange-function-in-activitymanager-isuseramonkey-what-does-this-mean-what-i http://stackoverflow.com/questions/7792123/strange-function-... That turned out to refer to automated testing harnesses as opposed to live users (see: http://developer.android.com/tools/help/monkey.html http://developer.android.com/tools/help/monkey.html). Unfortunately, http://developer.android.com/tools/help/goat.html http://developer.android.com/tools/help/goat.html 404s. The Android API is known for lots of little hidden references and Google jokes. The SensorManager for example has a bunch (i.e., GRAVITY_DEATH_STAR_I and SENSOR_TRICORDER: http://developer.android.com/reference/android/hardware/SensorManager.html http://developer.android.com/reference/android/hardware/Sens...). According to the Chrome team, the "Goats Teleported" reference in Chrome is just a random number: http://www.quora.com/Google-Chrome/How-is-the-number-for-Goats-Teleported-determined-in-Google-Chromes-Task-Manager http://www.quora.com/Google-Chrome/How-is-the-number-for-Goa... So, it appears that isUserAGoat is most likely just an engineering joke that shipped.
- surine 14y agoThe code responsible for enumerating goat teleportation (on very low contrast page): http://100-geek.net/articles/goats_teleported http://100-geek.net/articles/goats_teleported
- chris_wot 14y agokNuthMagicNumber?
- surine 14y agoLooks like golden ratio (phi, about 1.618) * 2^30. Maybe something to do with Knuth's Surreal Numbers? (http://www-cs-faculty.stanford.edu/~uno/sn.html http://www-cs-faculty.stanford.edu/~uno/sn.html)
- praptak 14y agoMaybe the answer to this question sheds some light on that: http://cstheory.stackexchange.com/questions/9639/how-did-knuth-derive-a http://cstheory.stackexchange.com/questions/9639/how-did-knu...
- mcpherrinm 14y agoOne thing this page noticed that I hadn't previously was the comment // See design doc at http://go/at-teleporter http://go/at-teleporter for more information. I believe that's a Google intranet page, and so this story is left hanging for the non-Googlers among us.
- wladimir 14y ago"LIKE_TRANSACTION", "TWEET_TRANSACTION", on the lowlevel IBinder RPC interface in Android also made me laugh a bit: http://developer.android.com/reference/android/os/IBinder.html#LIKE_TRANSACTION http://developer.android.com/reference/android/os/IBinder.ht... . "There is no response returned and nothing about the system will be functionally affected by it, but it will improve the app's self-esteem.".
- DannyBee 14y agoWell, the number in chrome is kinda random (not really), but there is a story behind why someone added "goats teleported". That wasn't just randomly chosen, it's from a joke that dates back to 2006.
- Someone 14y agoNaming an automated GUI tester a monkey could be a reference to the original Mac: http://www.folklore.org/StoryView.py?story=Monkey_Lives.txt http://www.folklore.org/StoryView.py?story=Monkey_Lives.txt (IIRC, the original Mac also had an area of memory called "MickeyBytes" that stored the current mouse acceleration settings)
- cdf 14y agoOr it could be a Chinese Zodiac sign thing? There are 12 animals in the Chinese Zodiac, each representing a year in a 12 year cycle. Goat and Monkey are two of them. I'm a Tiger, which means I am either 2,14,26,38,50,62,74,86 or 98 years old.
- gadders 14y agoReturns True on LL Cool J's phone: http://en.wikipedia.org/wiki/G.O.A.T http://en.wikipedia.org/wiki/G.O.A.T.
- chris_wot 14y agoSo, uh... What happens if the goat counter overflows?
- wulczer 14y agoIt can't http://git.chromium.org/gitweb/?p=chromium.git;a=blob;f=chrome/browser/task_manager/task_manager.cc;h=ad46354259ec8687c8665820f9f53bf89ccc715d;hb=HEAD#l599 http://git.chromium.org/gitweb/?p=chromium.git;a=blob;f=chro... (link found on some other page, can't remember where)
- shocks 14y agoUsing Chrome 25.0.1323.1 dev-m and I don't see Goats Teleported. Anyone else?
- JohnLBevan 14y ago@shocks: you only get this on certain OSes; it seems this is on *nix systems, but the teleporters are currently unable to get through gates / into windows.
- deleted 14y ago[deleted]
- viggity 14y agoin every app I've written since 2008, I've added an interface named "ICanHazCheezburger", it has a single property "CanHazCheezburger". I don't actually have any classes that implement it, it is just a nice little easter egg for the next dev that works on the code :)
- wesbos 14y agoLooking for a polyfill - anyone?
- no_more_death 14y agoSo I've created a shim for iOS. You play a gentle, low sound, not unlike goats bleating. Then you check the accelerometer[1][2] for the unique pattern of sound waves rebounding from the hairs of theuser's beard. (Remember, the iOS accelerometer is amazingly accurate. This technique really works!) If you're interested, drop me a line at 1.800.GOAT.API and I will license my patent for your app. [1] Cf. http://stackoverflow.com/questions/13248493/detect-ipad-mini-in-html5#answer-13377929 http://stackoverflow.com/questions/13248493/detect-ipad-mini... [2] Also relevant: http://xkcd.com/378/ http://xkcd.com/378/