My Profile Photo

Chris Arcand

Principal Engineer building Terraform at HashiCorp 👨‍💻 Formerly: Red Hat, NBC SportsEngine, RubyMN organizer. Once played the clarinet for a living, now making a living to play hockey. I make pointless connections to Minnesota as a Minnesotan does.

St. Paul, MN

Programming Easter Eggs

Perhaps these shouldn’t be called Easter Eggs - ‘programming novelties’? - but the little additions in projects which don’t necessarily need to exist are always satisfying and amusing to me. There are a number of them that my colleagues or I have stumbled upon. Here’s a little collection I curated.

The headers link to where the code exists in its project. Have any additions? Let me know and I’ll add them to the list!

The ‘forty_two’ array accessor in Rails

The ‘❨╯°□°❩╯︵┻━┻’ method in Sidekiq

I’m pretty certain this one is my favorite.

The ‘wtf!?!?’ method in Pry

‘nyan-cat’, ‘get-naked’, and poems in Pry

From Enrico Genauck (@enricogenauck), Added 5/4/15

The pry gem also includes a dedicated file to Easter Eggs with nyan cat and a few text snippets from Jermaine Stewart, T.S. Eliot, and Leonard Cohen, and Fernando Pessoa.

The ‘isUserAMonkey’ function in the package

From Ian Ehlert (@ehlertij)

I’m not sure if this is all that strange considering the Monkey is a well documented, actual command line tool to stress test your UI. But that’s part of the much larger joke.

The ‘I_AM_THE_DESTROYER!’ method in Paranoia (acts_as_paranoid rewrite)

From Jason Frey (@Fryguy9)

The TODO is probably the funniest part, to be honest XD

Honorable Mentions

The ‘fortnight’ method in Rails

I don’t know if it was really intended to be a novelty or taken seriously, but I find it amusing. And yes, I do actually try and use this - in tests, anyway.

The ‘seppuku’ command in RVM

Wayne Seguin added this as an alias for implode. The change reads “Added ‘rvm seppuku’ in honor of tsykoduk who can’t spell so it saved his life.”

I especially enjoy the rvm_log "Hai! Removing $rvm_path"

The ‘question’ and ‘answer’ commands in RVM

These commands seemed to have been removed since they were added in v0.1.30

More entertaining is the bugfix for these commands that shortly followed:

Bugfix: ‘rvm answer’ now uses perl, since the universe is written in Perl. As it is obvious… the universe has bugs, and perl is the only language that can have bugs not even god could sort out.

<- Back