Ridiculous Moments in Code

The world wide web has led to a massive day-to-day proliferation of crap jokes that would have been unthinkable 30 years ago, and the programming culture is no exception. Interestingly enough though, many of these "masterpieces" actually date back to usenet culture or further. They show that there's no limits to the ridiculous shit that procrastinators or people with too much time on their hands can come up with. Some of these are positively ancient (and completely unfunny), but for completeness sake, I've collected as many of the most prominent examples as I know about.

Many of the older pieces utilize the capacity of C to be forced into bizarre corners. One particular trick is to use #define blocks to convert normal source code into total weirdness. The joke is that the code is actually supposed to compile.

California Codin' (Just wanted to check out that you gnarly dudes are using the latest and greatest software technology fer yer rad code...

SayBro like, this is some rad shit, so CheckItOut

like
    a = b
         an
    c = d
man

Or the classic Human DNA deciphered into C code!. See what god was really thinking when he wrote the genome code...

/* Set up sex-specific functions and variables
 */
#include 

/* Kludged code -- I'll re-design this lot and re-write it as a proper
 * library sometime soon.
 */
struct genitals
   {
#ifdef MALE
   Penis *jt;
#endif
   /* G_spot *g;   Removed for debugging purposes */
#ifdef FEMALE
   Vagina *p;
#endif
   }

Perhaps the greatest and most poetic example illustrates how C is the language of love. It's so good (and so twisted, that I'm going to quote it in its entirety...

char*lie;

        double time, me= !0XFACE,
        not; int rested,   get, out;
        main(ly, die) char ly, **die ;{
            signed char lotte,

dear; (char)lotte--;
        for(get= !me;; not){
        1 -  out & out ;lie;{
        char lotte, my= dear,
        **let= !!me *!not+ ++die;
            (char*)(lie=

"The gloves are OFF this time, I detest you, snotn sed GEEK!");
        do {not= *lie++ & 0xF00L* !me;
        #define love (char*)lie -
        love 1 *!(not= atoi(let
        [get -me?
            (char)lotte-

(char)lotte: my- *love -
        'I'  -  *love -  'U' -
        'I'  -  (long)  - 4 - 'U' ])- !!
        (time  =out=  'a'));} while( my - dear
        && 'I'-1l  -get-  'a'); break;}}
            (char)*lie++;

(char)*lie++, (char)*lie++; hell:0, (char)*lie;
        get *out* (short)ly   -0-'R'-  get- 'a'^rested;
        do {auto*eroticism,
        that; puts(*( out
            - 'c'

-('P'-'S') +die+ -2 ));}while(!"you're at it");

for (*((char*)&lotte)^=
        (char)lotte; (love ly) [(char)++lotte+
        !!0xBABE];){ if ('I' -lie[ 2 +(char)lotte]){ 'I'-1l ***die; }
        else{ if ('I' * get *out* ('I'-1l **die[ 2 ])) *((char*)&lotte) -=
        '4' - ('I'-1l); not; for(get=!


get; !out; (char)*lie  &  0xD0- !not) return!!
        (char)lotte;}

(char)lotte;
        do{ not* putchar(lie [out
        *!not* !!me +(char)lotte]);
        not; for(;!'a';);}while(
            love (char*)lie);{


register this; switch( (char)lie
        [(char)lotte] -1 *!out) {
        char*les, get= 0xFF, my; case' ':
        *((char*)&lotte) += 15; !not +(char)*lie*'s';
        this +1+ not; default: 0xF +(char*)lie;}}}
        get - !out;
        if (not--)

        goto hell;

            exit( (char)lotte);}

No sane computer language would allow that to compile. C is just awesome.

Understandably, code comments are the main wellspring source of weird and ridiculous moments, and there are many stories...

/* You are not expected to understand this */

Error messages are also a great source of lol or lulz. Some of these are interesting just because of the sheer idiocy they imply...

"Keyboard error or no keyboard present. Press F1 to continue."
"Error:  Error ocurred when attempting to print error message."

But as far as idiocy goes, nothing beats the Daily WTF. Reading these stories for a few minutes can be hilarious. Read too many though, and you will have nothing but horrible nightmares, knowing that many of these situations are actually fucking real... Read it and weep.