On the basis of recent discussions on biggest mistakes, dumbest code and so on. Let's have a more fun and positive thread about the funniest code you have seen or written.
I will start out with a classic PHP example which I still find the most funny piece of code:
<?php
$_GET['rich'] or die('trying');
Website.create();
while(you.inBedWith(me) == true)
me.doNaughtyThingsWith(you);
if(you.love(me){
do{
kiss(me);
}
while(nobodyIsWatching==true);
})
github.com/babel/babel/blob/033681af8941d9678961f…
Accompanied with twitter.com/samccone/status/763774434595397632
hmm one of my favourites was while i was working on a PHP4 Project. at the time the constructor had to be like the java constructor and there was no destructor at all ... but one former dev seemed to be curious and added the following method
public Distractor() {}
which till this day is my favourite method call. Because I never can be sure if it was on purpose or if he just misspelled it but it did it's job ... it distracted me for 20 minutes ;)
I used to create variables like this and initialize with random strings!
String integer = "Not Integer";
String rajkumar = "The King";
This was way back when I was fresh out of college! It still cracks me up!
Juan Picado
Web Developer at Gametwist
This one hidden on React library that I posted on my Twitter. That was hilarious.