Bad Code Makes Me Thirsty

This one isn’t from production code I’ve encountered (or created) but rather from the big WTF?!? site of them all, The Daily WTF. I love it:

“APPL IS COMPLTLY FRIED,” Damien’s emergency pager read, “CANT EVEN LOGON TO SRVR!!!” Damien dragged himself out of bed and VPN’ed on in. The middle-of-the-night page did not lie: any [...]

Bad Code Makes Me Thirsty

Ran across this one today while digging through some code provided by an outside source. Clarity of names eludes them:

<tr>
   <td align=”right”><label><h2>*First Name:</h2></label></td>
   <td><input name=”firstname” type=”text” class=”textInput” /></td>
</tr>
<tr >
   <td align=”right”><label><h2>*Last Name:</h2> </label></td>
   <td><input name=”firstname44″ type=”text” class=”textInput” /></td>
</tr>
<tr>
   <td align=”right”><label><h2>Nick Name: </h2></label></td>
   <td><input name=”firstname11″ type=”text” class=”textInput” /></td>
</tr>

Bad Code Makes Me Thirsty

Sometimes when you’re whipping up them sites you need to use a table. Sometimes you need to use tables. And sometimes you want to be really, really, really sure the table you want is the table you get:

<table border=0 width=”582″ cellspacing=0 cellpadding=0>
<table width=582 cellpadding=0 cellspacing=0 border=0>
   <tr>

I’m having a hard time even conceiving of how this [...]

Bad Code Make Me Thirsty

Welcome to a new installment on this site called “Bad Code Make Me Thirsty”, a celebration of plain ol’ badly-written code. Most of it will probably be found code but every now and then I have no doubt some of my own will show up.
To inaugurate this feature: two pieces of code found mere lines [...]