Android Studio’s “Code contains easter egg” inspection (2019)
wh0.github.io
wh0.github.io
Also, it seems strange to add a detector for this specific case instead of actually fixing the IDE's parser to match the language's correct syntax rules.
Dang I'm old.
I feel tempted to bring up the counter argument "but someone should look at untrusted code thoroughly enough to not miss it anyways!", but that would be like abolishing safety belts and airbags because surely people would drive more safely.
Is there any non-sneaky usage of this feature out there in the world? I suppose given the massive amount of Java, there probably is.
If you do the full parse you can end up with adversarial inputs that result in cubic or exponential run-time complexity (see, for example, Pygments CVEs for comparable examples in this domain).
Especially for Java, not JavaScript where source code is at least slightly relevant to the end user experience?
Unicode escape characters in comments will draw most people's eyes immediately, it just doesn't look natural.
Instead write the easter egg in completely plain sight attached to a boring change, make sure the PR is passing CI on the first try, and a reviewer will skim for exactly .5 seconds before replying "LGTM!".
Just past the fold at the top, but out of view from the bottom, would be the ideal place
So, given the antagonistic relationship in which Easter Eggs originated, I'm not surprised that large companies would continue that antagonistic relationship.
Source: https://en.wikipedia.org/wiki/Easter_egg_(media)#Origin
So the game programmers put aliases in instead. Hence why you see such strange names in games like Yu2, Nakazoo, Faw, S.Miyahon (who is actually Shigeru Miyamoto), etc.
https://kotaku.com/donkey-kong-easter-egg-discovered-26-year...
As a non-android developer, I am now more confused.
2249 public boolean isUserAGoat() {
2250 if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R) {
2251 return false;
2252 }
2253 // Caution: This is NOT @UserHandleAware (because mContext is getApplicationContext and
2254 // can hold a different userId), but for R+ it returns false, so it doesn't matter anyway.
2255 return mContext.getPackageManager()
2256 .isPackageAvailable("com.coffeestainstudios.goatsimulator");
2257 }
https://cs.android.com/android/platform/superproject/+/maste...See https://bugs.chromium.org/p/chromium/issues/detail?id=31482
https://gamefaqs.gamespot.com/ps/196885-castlevania-symphony...
If you search for it you'll find all the references are by Google except one or two (which are probably ex-googlers repeating the meme):
[1] https://developer.android.com/reference/android/os/UserManag...
I suppose third party apps could also test for it, and do things with it, but is is really just intended as a joke.