"Lucky me," writes Joe from the Submit-To-WTF Visual Studio Add-In, "I just inherited a home-grown system information application."
"Judging from the code the previous programmer wrote, this is sadly one of the better pieces."
Last year's Code PaLOUsa (held in downtown Louisville) was a blast, and it was great to meet up with some of you guys who were able make it out. I'm definitely excited about Code PaLOUsa 2012; there's a lot of great speakers, and it's right in the heart of bourbon country.
It's said that without evil there can be no good and that without darkness, there can be no light. Is the same true of ugly and beautiful code? Maybe... but that's certainly not a question I'll be answering in this talk. Instead, we'll talk about ugly code, where it comes from, how to avoid it, and how to rid your codebase of it. And of course, I'll share some of my favorite anti-examples from The Daily WTF.
If it takes two contract developers six months to drive a project to failure, then four developers should be able to fail in half the time! Josh assumed that was why he and Sam were carted out to the client site and tossed into the oubliette of the PowerPac project. They were armed with nothing but a rusty spoon and a requirements document so old it needed to be stored in an oxygen-free environment.
The original development pair was Sally "I can code but I'm more of a designer" Jorgensen (the CEO's daughter) and Billy "I taught myself HTML in a week and am now a programmer" Jorgensen (the CEO's brother). They ran the project exactly like you'd expect such a dynamic duo to run it- directly into the ground. By the time Josh and Sam joined, it was already well past deadline and over budget.
Terry had spent the better part of the past decade digging through the trenches of QuidCorp's flagship application QuidFlow -- a program used to flowchart business processes. Though QuidFlow performed well and, overall, customers were happy with the product, whenever it came time to address a bug or investigate just how the filename validation worked; the source code was beginning to show its age.
Terry raised his concerns to management. Much to his surprise, management approved a plan to transition their C++ developers into the world of .NET through a little on-the-job experience.
Imagine yourself as an eager, young developer. After many long months of self-study, you’ve carefully honed your craft and have skillfully mastered virtually all development technologies from enterprisey to hipster. Your twelve-page résumé could land you a job anywhere, and as it would happen, the job you decided to take was at a highfalutin consultancy filled with like-minded developers who were almost as skilled as you.
You and you cohorts could build anything. Literally, anything: a software cure for cancer; a software cure engine that could dynamically load cure plug-ins at runtime to cure anything; or even a software engine factory that could dynamically create engines that could dynamically load plug-ins that could do anything.
The Storage Warehouse (from Grig)
The first recession I remember was in the early 1990’s, and I remember it so well because I was looking for a job. The want ads listed an opening for a UNIX admin – something which was right up my alley – so I gave the company a ring.
“Ye-LLO!” was the greeting after a couple of rings. In the background, it sounded like John Philip Sousa March music was playing on a 1960s AM transistor radio.
"I work on a team maintaining a large and enterprisey PHP system," writes Amber, "and as such, my job mostly involves doing enhancements and fixing bugs."
"It sounds normal enough, if not for the fact that almost all variables are globals and each of them might or might not be initialized in the same way, or the same place, as seen in this screenshot."
We've got some great companies that sponsor The Daily WTF. And all they ask in return... just take a moment or two to check out what they do. It's some pretty cool stuff.
TDWTF Sponsors
SingleHop Cloud Instances 98% off - Design, deploy and manage your cloud instance on the public cloud for only $1 for your 1st month (normally $50/month!) Use your Cloud Instnace to test new code, experiment with new software or gain extra development time...it's your choice! Try it today with coupon code "CLOUD1". New Relic is basically a magical, real-time performance and user monitoring tool that works on virtually any web platform: Java, Ruby, PHP, .net, Python, Ruby on Rails. I'm not sure how it works (magic?), but it's incredibly easy to use and is pretty inexpensive. Remember: performance is a must-have feature! Monetate - their testing, targeting and personalization platform for online retailers is used on leading websites like Best Buy, Sports Authority and Urban Outfitters. If you’re a problem-solver who is passionate about rich web applications, scaling Internet applications to billions of page views, and working with big data, then you’re a perfect fit for our close-knit and agile team.! Inedo - the makers of BuildMaster, the free, and easy-to-use, web-based deployment and release management tool. Going far beyond Continuous Integration, BuildMaster delivers a series of robust features unparalleled by other build-promote-deploy-distribute tools. Oh, did I mention it's free? Amazon DynamoDB - is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. With a few clicks in the AWS Management Console, you can launch a new Amazon DynamoDB database table, scale up or down request capacity for the table without downtime or performance degradation, and gain visibility into resource utilization and performance metrics.
And now for our regularly scheduled program...