This recent entry on TheDailyWTF is one of the worst pieces of code I've ever seen in my entire life. When I stopped laughing and picked myself up of the floor though, it got me thinking - I hope this is a wind-up. Surely nobody having the audacity to call themself a professional programmer would really concoct something so hideous?
That said, I've come across some pretty bad code (in previous employments, I'm happy to say), so maybe this isn't too far fetched. I often think it's unfortunate that, for the most part, source code goes unseen by those who've paid for it, so the client is often unable to determine whether they have received a quality product in return for their money. If coders were aware that their efforts would be scrutinized by all and sundry, surely they'd make more of an effort to avoid such abominations as the one above, and perhaps also to comment their code more often, generally making life easier for the rest of us developers who have to pick up after them? Maybe then there'd be fewer cowboys in the industry. For now, a lot of software applications out there remind me of sausages - the end user doesn't really know what's gone into the making of the product, and they're probably happiest remaining the dark. Which isn't to say that there aren't some damn fine sausages out there - I'm quite partial to Lincolnshires, myself...