logo.gif
Ph: 30000004

The Lemming Switch

2012-02-16

"The way in which project requirements meet developers at our company is a WTF in and of itself," writes Kevin, "but suffice it to say that a certain developer was tasked with writing a Windows Service that would periodically review a list of files from the network and purge them if necessary."

"Of course, to this certain developer, 'Windows Service' means something that is left running on a desktop somewhere. In his world, VB6 is also a 'simpler, cleaner, and easier to use' platform, and thus is his platform of choice... to this day. Here's what he delivered after a couple days of work."

"The system is down!" cried the voice at the end of the phone. "We've run out of numbers!"

"You've… run out of numbers?" asked Daryl.

"One of our sites is partially maintained by a third-party vendor with developers based out of Kerbleckistan," writes Nathan, "they'll sometimes 'forget' to use version control and instead just write directly to production. This has naturally caused some frustrating 'lost feature' problems when they remember to use source control, and somehow this all falls on me to mitigate."

"To avoid constantly breaking things, I wrote a script that monitors file changes to production and commits any changes to a branch in the repository. I'll then merge their changes into the working mainline. It's usually a few JSP files with some text or a link updated, but recently, when I went to fetch the current status, I was greeted by this friendly result:

Flexible Spending

2012-02-10

"I spotted this at the Airport of Valencia in Spain," wrote Peter P, "looks like they have quite weird temperatures there..."

SQL MUGging

2012-02-08

"We're replacing an old PHP website," writes Roggo, "to examine the existing functionality and test the install, we were given access to the live site. Out of curiosity, I had a look at the code that we are soon to replace. The first file I opened was called mug_password_forgotten.php; I was greeted by line 8:"

$sql = "select muguser_id, muguser_directory " . 
       "from mugusers " . 
       "where muguser_active = 1 " . 
       " and muguser_email = '" . $_POST["email"] . "' ";

Mr. Kashmere (from John A)
Mr. Kashmere is one of our middle school teachers. There had been a merger of two schools, and everything had changed: administration, policies, procedures... and technology. One of the new technologies they had picked up as a small school was Google Apps, including Gmail.

When I heard that Mr. Kashmere was having trouble getting new e-mail, I was curious, and figured I should go have a look at what the problem was.

Dirty Code

2012-02-06

Ever since being hired, Adam had spent most of his time working on new projects.

He was aware that there was an "old system" running out there and would someday be shut down and his efforts were to help this come about, but he never had the opportunity to cross paths with it.  Based on what he had heard though, this was a very, very good thing.

amp, #039 and a0B30000004la04EAA&

2012-02-03

"I saw this on my way home from work," Daniel Moore writes, "thank goodness CVS is doing something about Maryland's crippling shortage of whooping cough!"

"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."

Code PaLOUsa 2012

2012-01-31

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.

My Talk — Ugly Code: Beauty is in The Eye of the Beholder

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.

The TDWTF Discount + Bonus!

View Article Archives >>


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser