Once upon a time my friend Jimbo coded drunk while working on a JavaScript project. He was having a hell of a time with this thing and had been hitting his belt flask (yes, he really owns a belt flask) pretty hard out of frustration. Finally, after three hours or so, he got it working and passed out. What he neglected to do was remove all his alert() tests that he had put in to check his function calls. He handed his source in the next day, none the wiser.

One week later we got our assignments back. I got a 4/4, he got a 0/4. It didn't take us long to figure out why. Circled in red with an arrow pointing to "What the hell is this!" in big letters was alert('MY NUTS ARE PRETTY');

He has not coded drunk since.