Alex Papadimoulis

Founder, The Daily WTF

May 2010

33 33 33 33 33

by in Error'd on

"Just my luck," Q.M. writes, "I picked all 32's."


The Homegrown CMS

by in CodeSOD on

Several years ago, Mike M’s company decided that they needed to build an in-house Content Management System portal application. Well, actually, the lead developer made the decision… and the recommendation… largely because writing applications are boring. But writing platforms upon which you can write applications… now that’s exciting!

Two years and several failed “proof of concepts” later, and the company had portal driven by a VB6 application with a SQL Server database behind it. If one were to create a list of adjectives to describe this monstrosity, “stable,” “reliable,” and “accurate” would be strikingly absent. However “stillborn” would probably make the top of the list. When Mike took over, the application had 200 forms, one auxiliary code module, and zero classes.


Unmanageably Manageable

by in Error'd on

"I can't argue with that logic," wrote John Noble.


Convoluted toString, Interesting Comments, and More

by in Coded Smorgasbord on

"Everyone knows that Russians are the best programmers, and the guy we recently hired is no exception," Kip DeMane wrote, "though his English is a little... off. Here are his comments from a recent commit."

r22795 | t-------- | 2010-05-10 16:06:35 -0400  | 1 line

cleaned code, modified function format_for_rtf . no more 
numbered key to access video array elements, renamed all 
camel toe vars, applied consistent coding formating

Pipe Dreams

by in CodeSOD on

When digging into a newly inherited codebase, most experienced developers have a preferred way to break the system down into understandable pieces. Most of course start with the documentation, but since there rarely is any, that leaves one of two approaches: back-end to front-end or front-end to back-end. John, a Java and SQL developer, generally likes to start in the database and work his way to the front-end.

Recently, he drew the short straw and was tasked with making a few changes to a legacy Swing application that everyone was afraid to touch. Having never seen the innards of the app, he dove straight to the database and noticed a rather interest querying pattern.


Sponsor Appreciation, Binary Abacus, Overpriced Null, and More!

by in Feature Articles on

It's that time again! Please take a moment to check out the companies that sponsor us. Without them, there'd be no Daily WTF.

 

TDWTF Sponsors

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.
Comic Reader Mobi   Comic Reader Mobi - a mobile comic book reader for iPhone/Windows/Blackberry with smarts; the app can automatically detect the size of the text bubble and magnify only that text without needing to zoom in and out.
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.
SlickEdit   SlickEdit - makers of that very-impressive code editor and some pretty neat Eclipse and VisualStudio.NET tools and add-ins, some of which (Gadgets) are free. Check out this short video highlighting just one of SlickEdit's Visual Studio integration features.
SPN_NAME   StrataScale - their world-class Data Center is engineered to provide 99.999% availability of power, cooling, and network connectivity, and has N+2 redundancy. That's some serious business.

The Daily WTF: Now With Audio!

by in Feature Articles on

 

A couple months ago, I got an email from Daniel Magliola asking me if I’d like Hear a Blog to narrate The Daily WTF. I almost immediately replied “no thanks”, thinking that the last thing anyone wanted was TDWTF’s articles read by some Cylon-sounding program. But to my surprise, they don’t use text-to-speech software; they use real, professional narrators. Go ahead, give it a listen.


The Raybinator, Copy & Paste Error, and Yes I Do

by in Tales from the Interview on

Got tales from your own interview? Then share them, why don'tcha!


The Raybinator (from Ray Smith)
My first interview after university was with a small local finance company applying for the position of "database engineer". Having only a little experience with Access, SQL Server and MySQL, I wasn't too hopeful of getting the job, but figured that the both the general interview experience and getting an idea of what would be expected from database work in the workplace would be worthwhile anyway.


The Tautology Type

by in CodeSOD on

Consider the tautology: an unnecessary construct that adds no meaning, context, or understanding and may as not exist. In linguistics, it can come in the form of superfluous modifiers such as adequate enough and true fact. In procedural code, it’s simply wrapping code in an “if (true) {…}” block. But in a database table, representing the tautology can be especially tricky.

Fortunately, John’s has solved this problem by inventing a new SQL data type that can be used when a BIT column would allow too much variation in the data. Simply add a BIT column to your table along with a CHECK constraint enforcing that column to be zero.


Make Sure That You

by in Error'd on

"I received this on my mobile phone bill," notes Sandor Arendse, "now I finally know what to do in an emergency... oh wait!"


Krypto and 24

by in Bring Your Own Code on

As a kid, I was never a fan gambling away my hard-earned allowance. Heck, even playing poker with M&M’s meant that maybe — just maybe — I’ll walk away with less chocolate than I came to the table with, and that was an anxiety worth not experiencing. Fortunately, I’ve since come to my senses, but I’ll never forget the game my risk-averse friends and I would play when we came across a deck of playing cards.

While most kids reached in their pockets for coins to ante up, we’d pulled the face and joker cards out of the deck, shuffle the rest, and deal out six cards, face-up, in the middle of the table with one of the cards a few inches from the rest.


A Real Tri-State

by in CodeSOD on

Everyone knows that a real Boolean has three states: True, False, and FileNotFound.

This naming conundrum has left many to wonder, if Booleans have three states, what does that make a Tri-State? It's a good question, and one that Peter Bronk has had the unfortunate pleasure of being able to answer. Found deep within the bowels of a big, contrived, and clumsy legacy product, he found a real Tri-State.