Gimme, Gimme, Gimme a man(1) after Midnight

Published: [2020-08-04 Tue]

Sometimes reality is so funny that you can’t make it up.

A tale of an Easter egg

The year was 2011. Linux’s man command, a de jure standard used for summoning a page from the manual, had existed for decades. Many a late night of troubleshooting revolved around reading crusty teletype-formatted “man pages.”

Then, one day a Twitter user suggested an idea to the maintainer of man-db.

@marnanel: Dear @colmmacuait , I think that if you type "man" at 0001 hours it should print "gimme gimme gimme". #abba

As silly an idea as it was, the maintainer actually implemented the Easter egg. So, if you typed man between the hours of 12 AM and 1 AM, man would print

gimme gimme gimme

This is, of course, a reference to the ABBA song “Gimme, Gimme, Gimme a Man after Midnight.” Because of the maintainer’s excellent work, ABBA’s legacy was extended yet further into the 2010s, thus fulfilling an ancient pop culture prophecy that ABBA will never die.

The maintainer was extra careful to make sure that the message was printed only if no man page was requested. He certainly didn’t want to break anything or confuse anyone. He just wanted to add a fun feature.

However, six years later in 2017, someone’s automated test failed.

We've noticed that some of our automatic tests fail when they run at 00:30 but work fine the rest of the day. They fail with the message "gimme gimme gimme" in stderr, which wasn't expected. Why are we getting this output?

Thus, @marnanel made a public confession:

er, that was my fault, I suggested it. Sorry.

Pretty much the whole story is in the commit. The maintainer of man is a good friend of mine, and one day six years ago I jokingly said to him that if you invoke man after midnight it should print "gimme gimme gimme", because of the Abba song called "Gimme gimme gimme a man after midnight":

Well, he did actually put it in. A few people were amused to discover it, and we mostly forgot about it until today.

I can't speak for Col [the maintainer], obviously, but I didn't expect this to ever cause any problems: what sort of test would break on parsing the output of man with no page specified? I suppose I shouldn't be surprised that one turned up eventually, but it did take six years.

And the Easter egg was removed.

Morals of the story

  • No matter how carefully you write a program, someone will break it.
  • No matter how reliable your automation is, there will always be an edge case you never imagined.
  • If you are going to add an Easter egg to a program, then make it count. The ABBA reference was so awesome that no one complained about the bug it accidentally introduced.

Feedback