Friday, July 24, 2009

Google's Recursive Practical Joke...

What got the nerd world talking yesterday was a practical joke setup by Google. A few employees like @MattCutts (whose was the first that I personally encountered) spread a message around on Twitter that stated, "A Google easter egg for people who know what recursion is".

The punchline was that the included link sent you to this page. Apparently, whenever somebody googled the term, "recursion", they were then provided with another link asking, "Did you mean 'recursion'?". Upon clicking on it, you were sent back to the same page again.

Hahaha. Get it?

I'm guessing probably not. You see, recursion is a programming technique used to reference a function within itself. Wikipedia gives its formal definition as "a method of defining functions in which the function being defined is applied within its own definition".

Still with me? Again, probably not. Well, think of it like this... it's like that piece of art where a painter is looking in the mirror and painting himself looking in a mirror and painting himself. Or, for another example, it's like holding up two mirrors parallel to each other, and the nested images keep showing themselves until infinity.

Hence, the practical joke. Googling "recursion" will point you to the same term again! And, of course, that's what recursion is all about. Twitter user @vicchi explains the method behind Google's madness, "In order to define recursion, we must first define recursion".

Is your head spinning yet? Are you rolling your eyes at all geek humor?

This caught on like wildfire yesterday. It received almost 2300 Diggs, and a thread discussing it on Reddit, for example, had over 400 comments, one of which wryly remarks, "My future overlords kinda tickle me". Here's a sampling...



msaleh: WOW! Those Google engineers always have a sense of humor!

jleard: Since they have (seemingly) neglected the base case I wonder if they've thought to redirect to Stack Overflow after someone has clicked the "did you mean recursion" link oh... six or seven hundred times in a row.

iamnoah: Only if you click the link at the top. If you click the one at the bottom, it's tail recursion and can be optimized into iteration.

steveklabnik: Actually, all recursive algorithms can be implemented as iterative ones, and vice versa. What you're thinking of is Tail Call Optimization, where you can recur ad infinitum in constant space.

mcanon: And sometimes recursion can be expressed as a memoizing fixed point combinator. Check it out - very cool stuff.

steveklabnik: That's pretty awesome. Thanks for the link.

orrd: This is the lamest pun thread ever. I don't get any of them!



Oh, those crazy jokesters! Someone kill me, please, for understanding all of this.
  

0 Comments:

Post a Comment

<< Home