Alex Papadimoulis

Founder, The Daily WTF

Oct 2010

Sponsor Appreciation, Open Source Child Care, and More

by in Feature Articles on

Please take a moment to check out the companies that sponsor Daily WTF.

TDWTF Sponsors

Microsoft Silverlight Firestarter   Microsoft Silverlight Firestarter - Light up your Silverlight skills with Scott Guthrie and the Silverlight product team in this one-day live-streamed and on-demand event on December 2, 2010 from 8:00 am to 5:00 PM Pacific. It's completely free, but seating is limited so make sure to register for in-person (Redmond) or online attendance!
BuildMaster   BuildMaster - an easy way to automate your build, deploy, and configuration process all the way through production. Basically, it's application lifecycle management the way it should be: platform neutral, process neutral, and tool neutral.
SoftLayer   SoftLayer - serious hosting provider with datacenters in three cities (Dallas, Seattle, DC) that has plans designed to scale from a single, dedicated server to your own virtual data center (complete with racks and all)
Mindfusion   MindFusion - a great source for flow-charting and diagramming components for a variety of platforms including .NET, WPF, ActiveX and Swing
Peer 1   Peer 1 - provides award-winning Managed Hosting, Dedicated Hosting, Co-location, and Network services offered through 15 data center across North America. With over 10,000 businesses hosted on their legendary SuperNetwork™backbone, PEER 1 delivers one of the highest server performance and network outputs in the industry.

And now, back to our regularly scheduled program.


Submit WTF Code Directly From Your IDE

by in Announcements on

At the day job, I spend the majority of my time working on BuildMaster. While I certainly find it more exciting than the Big Boring Business App at Mega Financial Co, the structure is similar: there are a number of modules, different teams are responsible for different modules, and about the only change in scenery is working on a different module.

Though I wouldn’t call it boring, working on the same thing day-in and day-out can sometimes drag a bit. Even with an ample supply of Single Malt Scotch. Apparently, I wasn’t the only one feeling this, so we started a new company initiative: let developers work on projects that fall outside of their normal job description.


Double Spaced

by in CodeSOD on

If past CodeSOD articles are any indication, it would seem that "certain" developers have a very difficult time wrapping their minds around spaces and spacing.

How do you replace double spaces? What about triple spaces?? Or quadruple??? Clearly, these were questions asked by the coders of today's two specimens. And obviously, they found their answers.


It's Not A Bug, It's Data Security

by in CodeSOD on

"I work for a nationwide retailer," Jody writes, "In one of the databases I work with frequently is a table called PRODUCTS which contains information about every item we sell, and on this table there's a trigger called PRODUCTS_TRIGGER which fires on every insert, update, or delete. One day while working on some unit tests I needed to insert a row into PRODUCTS, work with it, and then delete it when the test was complete, but the DELETE failed because of a problem in PRODUCTS_TRIGGER. When I looked at the code for this trigger I found the following sequence of comments:

    -- <name redacted>  mm/01/yyyy  This trigger was preventing deletes because
    --                              it's trying to insert NULL into the primary
    --                              key of the PRODUCTS_AUDIT table on DELETES.
    --                              Corrected problem by using :old.PRODUCT_ID
    --                              (which has a value) instead of :new.PRODUCT_ID
    --                              which is NULL when doing a DELETE.
    -- <name redacted>  mm/10/yyyy  <Name of VP in charge of security redacted>
    --                              insists this trigger be changed back to how it
    --                              was to "prevent a rogue process from deleting
    --                              products".

Bikeunsure

by in Error'd on

"While I appreciate Bikesure's pro-active communications," writes Oli Allen, "I really would have preferred some information about my insurance."


Overloaded Help

by in CodeSOD on

"A certain coworker of mine is known for writing vast libraries of redundant Java code (example: makeStringArray(...)) in the hopes it will make everyone's lives easier," Jared writes. "That said, I wasn't at all surprised when I encountered this block of code."

"What's notable, however, is that when I first saw it, there were only 10 overloaded versions of setRecData(). I made the mistake of sarcastically asking him, 'but what if I have to set record data for twenty sets?' The next day, the improved version you see here was committed."


The Interesting Resume, The Insecure Resume, and More

by in Tales from the Interview on

The Interesting Résumé (from John)
Back in 2002, we needed an integration specialist for my team. This was after the dot-com bubble burst and previous ad placements online had resulted in getting flooded with résumés from desperate souls whose only qualifications for the job were that they could legally work in the US without Visa sponsorship.

This time, I placed a blind ad through our newspaper. The applicants would submit their résumés through the paper and therefore hopefully help us weed out some of the crazy, because taking the time to print and mail a résumé shows a tad more serious intent then just hitting "send" on email. I went down to the paper to pick up the first batch of submissions and was surprised at how many there were (50 or so). But there was one return address in the bunch that got my immediate and prompt attention.


Property Basics

by in CodeSOD on

Whenever a Code SOD featuring Visual Basic is published here, a flood of The Real WTF is VB comments ensues. As mindless and unoriginal of a comment as it is, there's a good reason for the sentiment: Visual Basic is designed for beginners, is often used by beginners, and beginners write an awful amount of awful code.

While it's easy to blame the language for bad code — *cough*PHP*cough*variableVariables*cough* — beginner-targeted languages can offer some benefits. Like, for example, the awesome fun and ease of using a single line of code like this: My.Computer.Audio.Play("cha-ching.wav")


Discovering New Math

by in Error'd on

"While checking my Discover Card balance, I was struck by the fact that I must have missed something in math class," writes Bill T, "either that, or this is an example of the hidden fees credit card companies are adding to accounts."


Cold Date Conversion

by in CodeSOD on

"Our customers were reporting a strange bug," Eric writes, "when they would select dates for events in December, they'd get the following message."

Conversion failed when converting datetime from character string 'De/09/2010'

The Why Timeout

by in CodeSOD on

Slade's colleague had a hard time grasping why. It wasn't that he was slow, more that he just didn't care enough to think things through. In some lines of work that’s not too bad, but in software development, it can lead to “interesting” results. Case in point: a timeout dialog.

The task was to detect whether someone forgot to log-out of the application and, if so, log them out of the system. This was an important feature, as the application was responsible for divvying up time-sensitive data analysis work. The first attempt was pretty straight forward:


Now with TDWTF Buttons!

by in Souvenir Potpourri on

Ever since the first Free Sticker Week ended back in February '07, I've been sending out WTF Stickers (and, now mini-buttons) to anyone that mailed me a SASE or a small souvenir. More recently, I've been sending out the coveted TDWTF Mugs for truly awesome souvenirs. Nothing specific; per the instructions page, "anything will do." Well, here goes anything, yet again! (previous: Salmiak Attack).


I've been reluctant to do another Souvenir Potpourri lately, especially after receiving those toxic goods last time. However, I have been slowly making my way through those Finnish treats, and have even gotten a few (now former) friends to try it. Of course, that wasn't good enough for you Finns; you just had to send more.


Documentation Done Right

by in Alex's Soapbox on

Of all people, I have a pretty high standard for doing things right. After all, I’m probably the last person who wants to be caught being The real WTF. This makes things tricky at the Day Job, <shameless_plug>where I work on BuildMaster, a pretty cool system that streamlines and automates the entire development, build, test, and deployment processes.</shameless_plug>, as I’ll often spend an exorbitant amount of time wondering about the best way to do something. Case in point: what’s the right way to do documentation?

Just to be clear, by “documentation”, I don’t mean manuals, user guides, feature matrices, and the like. Those are produced by technical writers, who seemingly enjoy living in the third circle of hell. What I mean is UML, Data-Flow, Flow Charts, Module Breakdowns, and all other works used internally by the development organization. And expanding on the question, which of these documents are we supposed to produce, and how much documentation is needed?

Documentation Done Enterprisey


Important Reservation

by in Error'd on

"I was without a pen and paper to write down this important information," Ryan O writes, "thankfully, my session wasn't interrupted."