Jokes and Humour in the Public Android API
(voxelmanip.se)198 points by todsacerdoti 14 hours ago
198 points by todsacerdoti 14 hours ago
For X11, from the top of my head:
The global variable that toggles a bunch of legacy cruft is called "party_like_its_1989": https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/di...
The changelog for the DRI2 extension is "Awesomeness!", "True excellence", "Enlightenment attained" etc: https://www.x.org/releases/X11R7.7/doc/dri2proto/dri2proto.t...
Reminds me of BeOS (and now Haiku), which have "is_computer_on()" and "is_computer_on_fire()" both with great descriptions.
https://www.haiku-os.org/legacy-docs/bebook/TheKernelKit_Sys...
Reminds me of Delphi -- it has an exception 'EProgrammerNotFound'.
https://docwiki.embarcadero.com/Libraries/Athens/en/System.S...
With a completely serious (though short) documentation page I read as very, very dry humour.
I know it is trying to be funny. But those states are quite normal in modern computer with advanced power management. OS should handle wakeups from deep sleep, or state where temperature of motherboard is 200 celsius.
For the curious minds: https://github.com/haiku/haiku/blob/master/src/system/libroo...
looking around a bit, it's used as an example in the documentation:
https://github.com/haiku/haiku/blob/7d07c4bc739dbf90159a5c02...
This is actually a great reason to keep it around; it's as simple as possible, and nothing uses it so it's easy to find the relevant bits of code.
If you want to test the isUserAGoat and isUserAMonkey on you own device, I published this small app that does just that: https://play.google.com/store/apps/details?id=com.trianguloy...
Maybe I can add these other easter eggs...
On my device with Android 15 I can't install your app. Google enforces a minimum compielSdk now. Maybe you can upgrade it in your build :)?
If you check the app description, there's a GitHub link, which in turn has an f-droid link you can use.
But you're not missing out since `isUserAGoat()` will return false on Android >=11 anyway and `isUserAMonkey()` will return true if and only if you're using the monkey test suite.
The Androids: The Team that Built the Android Operating System: link isn't working :(
I like that this sense of humor is still preserved in such a huge company code base. You won't notice it when you use the API, but when you look at the source code, these little Easter eggs will remind you that there are real people behind the code. Compared with the cold feeling of many software nowadays, this contrast makes people feel warm. Honestly, maybe we need more of this.
This means jokes and humour in technical documentation. While it's often frowned upon, I love a bit of humour in docs. I wrote about this here:
True, it has never been in an HTML standard, however it was definitely a documented part of early HTML.
The blink element was in Netscape Navigator's HTML dialect in 1993/94, when early HTML was still just hitting IETF RFCs / DRAFTs, you can find blink in the Netscape HTML developer documentation from just after that era, DevEdge. It was never in NCSA Mosaic, the other big GUI browser of the era.
Later on in the process of being standardized, when it was more W3C than IETF albeit still mainly the same people, Netscape agreed to drop blink from the proposals if Microsoft dropped marquee, so in that sense yes, it was never in a standardized version of HTML, but many tags in active use at the time were never in a standards doc.
See here https://www.w3.org/People/Raggett/book4/ch02.html for some history from w3c, who went on to become the formal custodians of HTML after the IETF days.
Edit: here's the earliest Netscape Developer Docs I can see on archive.org https://web.archive.org/web/19961115043739/http://developer....
public static final String DISALLOW_FUN
The default value is false. [...] Type: Boolean [...] Constant Value: "no_fun" Source: https://developer.android.com/reference/android/os/UserManag...
---
How the hell did this pass code review? Are booleans strings on Android?
Also this is an enterprise policy constant, so it gets sent (and configured) as string/string dictionary via REST API from MDM backend. That's mostly because the constants can be of mixed types (e.g. "MAX_PASSWORD_CHARS" : "1", "DISALLOW_NETWORK_SWITCHING: "true" - example, constants not actual).
Someone else pointed out the reason for the datatype. A more subtle problem is the use of double negatives. Boolean APIs like "disable" will throw off users of your API.
How isUserAMonkey API came about: https://books.google.nl/books?id=68BZEAAAQBAJ&pg=PA96&lpg=PA...
To ensure that the monkey of a monkey test (an emulated user doing random taps) cannot do all possible actions.
https://books.google.nl/books?id=68BZEAAAQBAJ&pg=PA96&lpg=PA... "Bruce grew the lab over the years from an initial set of seven devices to more
than 400. He said there were some unanticipated problems to resolve over that time. "One day I walked into the monkey lab to hear a voice say, '911-What's your emergency?" That situation resulted in Dianne adding a new function to the API, isUserAMonkey(), which is used to gate actions that monkeys shouldn't take during tests (including dialing the phone and resetting the device)."
Interestingly, the original Mac had a similar MonkeyLives flag: https://folklore.org/Monkey_Lives.html
Notice how pretty much none of these are added in the last 10 years?
Android's become 'more mature' - ie. Boring, and the joke to code ratio is dropping rapidly.
Good, I hate ‘funny’ code. Just get to the point, I’m not here for someone’s notionally hilarious inside joke from 18 years ago.
Ah I see you're one of those who would enable `UserManager.DISALLOW_FUN`!
I personally quite enjoy a bit of whimsy in code. What we do (mostly) isn't that serious (modulo those, including me once upon a time, who work on literal life and death software)
I think that's a big line between people who work as software engineers becuase they enjoy the work and want to build something and folks who go there to punch the ticket and run back home as soon as possible.
The second group doesn't want to deal with "all the fun crap" and "distractions" that stand in the way of them marking a bug fixed (or, god forbid, actually getting extra bugs/work assigned because some "fun" code might break or cause confusion).
As teams and companies grow, the second group usually outgrows the first and the first group moves on to reform into smaller teams working on something else again.
I agree with you. The dinosaur game in Chrome is the classic example; turned off because schools threatened to not buy Chromebooks if kids could play a game in the browser. At least it seems to be a setting now, so your individual locality can decide if fun is allowed.
I don't mind either personally, but I've had a few occasions where such things have caused issues with engineers that didn't have English as a 1st language.
A fair bit of time was wasted on trying to understand some joke/pun code and variable names, and on another occasion, spending the best part of a day working on something because they took some sarcasm in code/comments literally.
I couldn’t agree more. I work in a codebase that has a handful of these “fun”-named functions/concepts and I hate it. It wasn’t funny the first time I came across it (just very confusing) and it’s not fun having to explain to new hires why a few things are named the way they are.
It needlessly complicates reading/following the code. Even if you explain the naming back at where you define the function/variable it add an extra click-through/hover to read that and an extra translation you have to do in your head when you read the “fun” variable name in the future.
One example is we have a flag called “dinnerbell”. What does that do? It tells the server receiving that flag to “come and get it”, “it” being the full data object instead of just getting a delta. It could have been called a whole slew of other things that would make more sense.
Live a little. When you've passed away, was all the seriousness paid off?
That said, funny code should still work
There's a middle ground for sure. I've left a few witty comments and loglines in my time.
But I've also had to debug a Delphi unit which returned error codes inspired by the magical supercomputer Hex from the Discworld novels.
"Divide by cucumber error" is not a decent enough representation of a module's internal state, no matter how funny you think you are.
I've noticed that modern life is in general less fun than it was 10 years ago. It might be me getting older, but I'm sure there are bigger societal changes too. BTW I used to browse tcrf.net and it was so interesting that video game developers would leave pieces of themselves in their work. Love letters, old memes, angry letters, random shit, whatever. Meanwhile modern programming is all about pRoFeSsIoAnALisM and MaXiMiZiNg PrOdUcTiViTy at all costs.
> BTW I used to browse tcrf.net and it was so interesting that video game developers would leave pieces of themselves in their work. Love letters, old memes, angry letters, random shit, whatever.
This is quite dependent on the games you play. Modern games are becoming larger, which makes the project overall more serious and makes it harder to hide easter eggs. That being said, Indie games with small teams still contain a lot of fun and even AAAs can still contain some goodies.
Yes, it like a rite of passage from a startup to “mature” company. It’s like Google’s or Reddit’s April Fools jokes. Actually, the novelty of April fools jokes can probably be a KPI of how corporatized a company is.
I think it really is up to us to make things as fun as we want to see... There may be more minefields as we grow old (Can a senior pull a harmless prank on newly joined juniors without coming off as mean/threatening?), but at the same time these little joke comments/commit messages, pranks etc.. are what brought people closer together in every place I worked at so far...
I mean what other choice do we really have? let the fun police win?
How is someone writing an article about Android source code node nerdy enough to know what a Tricoder is? I don’t buy it
They are in their early 20s and not American¹. Why is that so hard to grasp?
The age makes sense, but Swedes are definitely into Star Trek https://en.wikipedia.org/wiki/S.P.O.C.K
Funny, when I was in my 20s and not British, I knew what a Dalek was because it was just part of the zeitgeist. Tricoders are frequently mentioned as one of the life imitating art type of things that modern tech is striving to take from sci-fi to IRL. I had never even seen an episode of Dr Who, but I was familiar with it because of all the other sci-fi/nerdy stuff I was into. Ironically, I did know what someone wearing an H on their forehead meant from watching Red Dwarf, but that’s a tangent. It just seems like a strange Venn diagram where source code android and Star Trek tricoder do not intersect would be a very odd diagram
I think you hit the nail on the head there, you and the author are simply from different cultural zeitgeists. I also remember Star Trek and Dr Who being a big deal, but I was entirely too young to care. And I continue not to care, since I don't watch live action shows much. Never seen an episode of Friends or Game of Thrones either for example. Just a starkly different generation and subculture.
> the other sci-fi/nerdy stuff I was into
I guess that’s your answer. People have different interests and as such there’s a virtually unlimited number of culture combinations that people can be into. And people can have white spots in places that are surprising to others, there’s only so much time.
My fellow old person, Deep Space Nine came out 32 years ago. It's not something the nerds of today need to know. All these great sources of nerd allusions will be lost in time, like tears in rain.
While I found it surprising at first I don't think it should be. Star Trek really doesn't seem to be as big as it used to be.
> Star Trek really doesn't seem to be as big as it used to be.
Hint: it was never big outside of the USA. If anything, Internet and the Hollywood reboots is the way most people outside of the USA learnt about it.
Also try to find Europe in the article: https://en.wikipedia.org/wiki/Cultural_influence_of_Star_Tre...
There's a Swedish Star Trek-themed band that has been continually active since 1988 and are popular enough that they still do festivals in Sweden, Germany and other European countries every year https://en.wikipedia.org/wiki/S.P.O.C.K
Are you sure?
I'm Italian and we had Star Trek (all the films, all the shows, many of the books), and apparently the Star Trek Italian Club[0] was funded in 1982. I think Spock and Kirk were quite familiar to most people, and for sure as a nerd in the '00s everybody understood the joke of showing Bill Gates as a Borg on Slashdot.
[0] https://stic.it/
> , and for sure as a nerd in the '00s everybody understood the joke of showing Bill Gates as a Borg on Slashdot.
Everybody, Gates and Slashdot in one sentence.
Very big in Germany imo. I came back from school and always watched back to back TNG and MacGyver. TNG and DS9 were big and aired nationally. My father grew up with Kirk & Spock and most people who were children in that generation and had access to a TV know the show, because there was not much else on TV. He's not a nerd at all :)
Adding to the comments: Not an American, but like others here watched TNG every day after school, and TOS before that. Many other people my age did, for example my wife.
BTW, we have watched with our sons all of TNG and DS9 for the last 3 years, and our eldest is now deeply familiar with Star Trek as a result. Very few of his peers are familiar with it, though.
I was never a big Star Trek fan, but here in Sweden growing up I watched episodes of The Next Generation, Voyager, and Deep Space Nine when they happened to be on. There definitely always seemed to be some Star Trek series running in a decent TV slot and everyone seemed aware of it - even if its popularity was eclipsed by that of Star Wars.
From friends and family in Belgium it seems it was somewhat bigger there.
> Hint: it was never big outside of the USA.
Really? I must have grown up in an alternative universe. Star Trek TOS and TNG were aired on our local TV station in the 80s and 90s, IIRC even in the afternoon. I would be extremely surprised if I'd meet a 30+ person who grew up here (European country) and didn't know Star Trek.
Probably because it was dormant for a long time. And then when it was brought back, it was brought back by people who have no clue what made Star Trek good so it has largely sucked.
With the benefit of hindsight, I'd say that impression is more because every series is very different. TOS and TAS may have been similar to TNG seasons 1 and 2, but TNG got more thoughtful as it went on; DS9 was a very different show to both TOS and TNG, with long-term continuity and changes (beyond casting) that stuck, and far more shades of grey and where outright evil came with a smile and a charismatic speech rather than being a puddle of psychic oil; VOY had almost no continuity, making it the polar opposite of DS9, but most of the characters were interesting enough for a space soap opera; ENT was derided by many when it came out, because all the main plot arcs made no sense and they kept introducing old fan favourites that didn't make sense contextually because series set in the show's future had yet to meet the Borg, the Ferengi, etc. And while I've never seen Prodigy, I'm aware that was trying for a very different approach to exploring the cannon and had its own story to tell.
And famously, only the even-numbered films are any good (which doesn't mean all even films are good, e.g. Nemesis).
In this light: DIS throwing away an interesting premise and then going nuts; PIC being three seasons of "why did the scriptwriters put the Borg everywhere, when the main story is androids vs. Romulans, Q, and warcrimes(*?) against changelings leading to changeling terrorism?"; and the very much more pew-pew-lasers action films of Kelvin**… none of this is particularly shocking.
What's nice (for people like me) is that SNW and LD are both well-written and thoughtful — but again, very different shows.
SNW feels like it is trying to be the best of TOS, TNG, and DS9, even if it does have a bit of fan service with insufficiently justified presence of Kirk (James, the other one is fine).
LD is very very silly, but it works for me — not as a canonical set of events (Mariner is even less suitable a personality for a ship officer than is Burnham, and in the same way I can head-cannon all Q episodes as "Q is actually Barclay on the holodeck having a power fantasy", most of the main four cast feel to me like students LARPing trek on a holodeck), but rather I like it because the tries to "yes, and…" the show's existing cannon in ways that mostly work and the characters are fundamentally decent to each other 95% of the time (and when not, justified).
* Perhaps "crimes against humanity" would be a closer take, or whatever the term should be in a not-just-humans universe
** and Section 31 whose critical response is so low that I forgot it existed rather than watch it, and only remembered the existence of when looking at Wikipedia to check if Nemesis was even or odd
Right? It could be an attempt at humor, but it could also be someone who is naive of culture before 2003. I lost some respect for the author at that point...
This is so american/age centric please reconsider dispensing respect based on who watched the same TV shows as you growing up
For many years at FB, suffixing dangerous or really-deprecated tokens with `_DO_NOT_USE_OR_YOU_WILL_BE_FIRED` was the standard. Everyone[^1] was in on the joke.
In the middle of the pandemic when ~50% of the workforce had started post-2020, it and other things became complaints for causing fear/uncertainty. We didn't do the best job on-boarding remote people and making them feel part of the culture at that time.
[^1]: It was a big company so this statement could only be true in the circles I had access to.