[Geeks are Sexy] technology news

Wednesday, February 14, 2007

The Worst Code You've Ever Written

Robert Nyman asked his readers to submit examples of awful code, and they graciously obliged (via 465 Berea Street). Now readers of both Nyman's blog and 465 Berea Street have come forward with some astounding snippets of code, mostly from the days of non-standard, table-based web development (and mostly written by themselves).

Inspired by Nyman, I've found it quite amusing digging up old projects and looking at the atrocious markup I once churned out. I'll scour those archives for a few gems and leave them in the comments. So, how about you? Got any embarrassing, self-incriminating evidence from the days of olde?


  • Uh...

    10 print "Hey there!"
    20 Goto 10


    By Anonymous Anonymous, at 7:42 PM  

  • well when over xmas break my bf said "write a doubly linked list in java or your dumped" and i obliged, i did a terrible job. over 100 compile errors...after that was sorted out, well, it works...ish. it's not done object-oriented in the proper way. i mean, it is object-oriented, but i dont do guis (well, i've been forced to sort of learn how recently, but at the time i didnt) and i put some stuff protected that should be private cuz i didnt feel like writing methods to pass the values and well, any object-oriented folk would likely cry at the site of it. oh, and the iterator doesn't work at all.

    By Blogger Mackenzie, at 12:37 AM  

  • Here's a gem:

    <body bgcolor="#ff9900" background="images/bg_orange.gif" text="#000000" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
    <table cellpadding="0" cellspacing="0" border="0" width="620">
    <tr><td width="49" height="77"><img src="images/span_topleft.gif" width="49" height="77"></td><td width="521" height="77"><img src="images/span_topmiddle.gif" width="521" height="77"></td><td width="50" height="77"><img src="images/span_topright.gif" width="50" height="77"></td></tr>
    ≪tr><td width="49" height="40"><img src="images/span_bottomleft.gif" width="49" height="40"></td><td width="521" height="40"><img src="images/span_bottommiddle.gif" width="521" height="40"></td><td width="50" height="40"><img src="images/span_bottomright.gif" width="50" height="40"></td></tr>

    <tr><td width="49" background="images/bg_left.gif">&nbsp;</td>
    <td width="521" bgcolor="#ffffff">

    <center><table cellpadding="0" cellspacing="0" border="0" width="505"><tr><td valign="top">

    For contrast, here's how I'd do this today:

    <h1>Site Title</h1>

    By Blogger Tom Harrison, at 6:15 AM  

  • woah what the crap is THAT mess?

    By Blogger Mackenzie, at 1:31 PM  

  • That would be the masthead of a site I built oh so many years ago. It was a logo that "floated" partially over a 3 column layout. To simulate this overlapping, floating effect, I chopped the logo up into a 3x2 puzzle of GIF images and then stitched them back together, into the 3 column layout, with a 3x2 table.

    Pretty atrocious, eh?

    By Blogger Tom Harrison, at 3:37 PM  

  • Ouch, that's terrible.. I think I already did something similar a long time ago. :)

    Depending on the situation, things had to be done like this back then...

    By Blogger Kiltak, at 4:18 PM  

Post a Comment

<< Home