Humor in code

by krike in General / Reviews on 10 Dec 2009

Every once in a while we love to let go of ourself, especially when looking at a screen for hours looking at code you have written like 10 times or more.

So from time to time we love to have a good laugh and just do some random funny things. Here is a list of humor in code written by developers

Humor code #1

public class MohammedAli {
  float like_a_butterfly;
  string like_a_bee;

Humor code #2

public class LunchOrder {
    double cheeseburger;
    char grilled;
    long drink;
    short cake;

Humor code #3


print ' {o,o}'
print ' |)__)'
print ' -"-"-'
print 'O RLY?'
print ' '
print '{o.o}'
print '|)_(|'
print '-"-"-'
print 'YA RLY'
print ' '
print ' {o,o}'
print ' (__(|'
print ' -"-"-'
print 'NO WAI!'

var myAss = this.GetType().Assembly;

Humor code #4

public class WebCrawler //: public SpiderMan, private PeterParker

Humor code #5

for(int c = 0; c < 10;)
   c++; // < get it?  c++ ?  it's so... literal

Humor code #6, My favorite

char coal;
short cut;
long way;
float assets;
string tanga;
double penetration;
object slide;

UserPermissionException up = new UserPermissionException();
throw up;  // lol

return off;// the Jedi;

Humor code #7

    //something in loop
        break dance;

Humor code #8

var up:Error = new Error();
throw up;

Humor code #9

$iShower = $_GET['clean'];
if ($iShower) {
     echo getdate();

Humor code #10

my $ofTheJedi = x;
return $ofTheJedi;

Humor code #11

   //Just to be sure =)

Humor code #12

sleep(5) # Aproximately time taken to reload the application
kill $me # , please

Humor code #13

$self = new User();
while($self->hungry()) {
    $bacon = $pig.Substr(...);
    $breakfast = getValue() + $bacon;

Humor code #14

<?php $_GET['rich'] or die('trying'); ?>

Written by krike

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet nisl nisl. Ut interdum libero vitae quam ultricies et lacinia elit aliquet. Praesent tincidunt, sem tempus feugiat feugiat, turpis tellus scelerisque erat, sit amet feugiat neque arcu ac lectus. Sed at mi et elit interdum scelerisque vitae eu felis.

krike has written 77 posts.

  • Pingback: Humor in code | CMS tutorial site Hello CMS - the best cms website()

  • Pingback: Humor in code | CMS tutorial site()

  • Pingback: Tweets that mention Humor in code | CMS tutorial site --

  • Pingback: Humor in code | CMS tutorial site()

  • Pingback: Humor in code | CMS tutorial site « Internet Cafe Solution()

  • Devin Walker

    Love the bacon one! Hilarious