Recent Articles

Jun 2012

Memory Lost

by in Error'd on

"I found this outside of a local pharmacy," Antonio wrote, "looks like someone has to cure amnesia on the display."


Stringy Sting Verification

by in CodeSOD on

"The company I work for sells text-message related web services," writes Martin S. "Basically, you buy a subscription and then get access to our SMS gateway that has all sorts of fancy features."

"Being that we sell technology to other companies, I sort-of expected the codebase to be... well, not like this. Take, for example, this function (one of many of its kind) that verifies that a string only contains numbers."


Peachy Real Time

by in Feature Articles on

Back in 1952, the economist William Vickrey proposed a fairly unique solution to New York City’s subway congestion problem: introduce a variable fare that fluctuated during peak times. The idea was that the market powers would help tackle the ever-longer commutes by introducing some simple supply-and-demand principles.

While Vickrey’s subway proposal didn’t gain a lot whole of steam, the congestion pricing concept quickly spread to the public roadways, and eventually became a mainstream economic idea. And in 1995, after technology had finally caught up with theory, California implemented the first such system on Interstate 15. This computer-controlled system of variable pricing has spread to highways across the world, and I’m sure is the exact prior art that IBM “inventors” Christopher James Dawson et al paid homage to when they “invented” and patented this exact system in 2008.


Advantage Pricing

by in Error'd on

"They must really want your marketing information," writes J.W. Koebel, "that steak sure costs a lot of you want to buy it anonymously."


The Table Selector

by in CodeSOD on

"In my native language of German," writes Christian, "the word quellcode is a pretty direct translation of 'source code'."

"Unfortunately, bad code seems to cross language barriers - as does that famous three-letter explicit adjective. But occasionally I’ll find a piece of quellcode that deserves its own special, localized expletive: quäl-kot. When I stumbled across this interface in our quellcode, quäl-kot was the first thing that came to my mind."


The Program-Generator Program

by in Feature Articles on

When you've been in IT for as long as Pat McGee, you're bound to have survived at least one or two COBOL horror stories. While COBOL is certainly not the worst platform to develop software on (MUMPS will most certainly hold that title through at least our grandchildren’s lifetimes), its extreme verbosity and unique idiosyncrasies make it a challenge for organizations to develop clean, maintainable code.

To COBOL's credit, it was one of the first attempts – actually, it was probably the first attempt – at self-obsolescence. Like today, the programmers of old were far too talented to meddle in trite matters like "business rules." After all, if the managers and analysts could conjure up these business rules, they could certainly write them up in a business-oriented language.  A COmmon Business-Oriented Language, if you will. Of course, we all know how that story ends, and five decades later, COBOL programmers are still paying for that arrogance today.


Date Selector of the Damned

by in CodeSOD on

"It's no secret that web developers are generally considered the red headed stepchildren of programming, and with good reason," writes Joe. "With its proliferation of forgiving and loosely structured languages and the huge demand for web developers in our modern web-centric world, it's not surprising that the field is practically overrun by script monkeys with no real programming background. Armed with a shelf full of books on all the latest web technologies and a subscription to Experts' Exchange, they enthusiastically pound away at their keyboards day after day, happily and cluelessly producing oceans of spaghetti code so bad that even Olive Garden wouldn't serve it."

"Over the course of a decade in web development, I've seen so much terrible code that it takes something truly unholy to elicit more from me than a deep sigh and a weary eye-rubbing... but, every once in a great while, the devil still opens hell's source repository and looses upon my screen a horror so foul that even one as jaded as myself weeps in bitter despair. This is one such horror. I apologetically present to you: the date selector of the damned.


Unscheduled Programming

by in Error'd on

"I saw this at about 1AM on our local free station," Henk wrote, "I guess being a television station has its perks when it comes to getting the message out there?"


Disconnection String

by in CodeSOD on

"In ASP.NET programming," writes Chad Braun-Duin, "database connection strings are stored in configuration files, and the standard way of getting your connection string from these files looks like this:"

ConfigurationManager.ConnectionStrings(AppName).ConnectionString

Server Room Fans and More Server Room Fun

by in Feature Articles on

"It's that time of year again," Robert Rossegger wrote, "you know, when the underpowered air conditioner just can't cope with the non-winter weather? Fortunately, we have a solution for that... and all we need to do is just keep an extra eye on people walking near the (completely ajar) server room door."


Loose Cat Handling

by in Representative Line on

"I had a pretty good idea of what I was getting into," Christian Riesen wrote, "the company I started at was very forthcoming about their codebase, and how it had grown organically over the past 12 years. I took the job because it would be a challenge to convert it from single files with tons of includes to a to a framework-based approach."

"One can ever expect the unexpected, and this job was no exception. Besides wonderful comments like 'we include this file here' (which is then followed by several include statements), there are many, many more weird things that defy any logic. Take, for example, this piece of code:


Sponsor Appreciation, *bleep*ake mushroom, and More Error'd

by in Feature Articles on

Please take a few moments to check out the great companies that sponsor The Daily WTF.

TDWTF Sponsors

ISVCon Logo   ISVCon - You know how to write software. Selling it is the challenge. That's where ISVCon comes in. Spend three days in Reno, Nevada between July 13-15 getting an intense education in sessions across two tracks on topics including mobile platforms, social network marketing, game development, and cloud computing. Register today!
Joyent Logo   Joyent - This cloud ain't for storing music. Running your apps on Joyent's open-source SmartOS is a different, smarter cloud choice. Automatic and Free 400% vertical scaling, copy-on-write with ZFS, DTrace for killer visibility (heat maps! flamegraphs!) Come check out our stack.
JRebel Logo   JRebel is a JVM-plugin that makes it possible for Java developers to instantly see any code change made to an app without redeploying. JRebel lets you see code changes instantly, reloading classes and resources individually and updating one at a time instead of as a lump application redeploy. Download your FREE Trial Today!
Inedo   ProGet - a NuGet package repository that lets you host and manage your own personal or enterprise-wide NuGet feeds. It's a NuGet Server that's incredibly easy to set-up and install, plus it comes in a Free and Enterprise edition.

And now back to our regularly scheduled program...



The Logic Behind Modern Maintenance

by in CodeSOD on

When the big merger was announced, the IT staff of both corporations was a little bit nervous, and with good reason: The day after the announcement, many redundant positions were eliminated. Miraculously, the IT staff on both sides was left almost untouched. With the integration of two disparate code bases, there was a lot of work ahead.

The Odd Couple

During this process, Doyle discovered that his development group inherited a widely used enterprise-level suite of Visual Basic 6 client-based apps from "the other side." Doyle and his team were used to working in VB.NET, C# and ASP.NET; they felt a little taken aback at this news. But no matter, they thought -- it was only Visual Basic.


Batch of Trouble

by in Feature Articles on

Ben had already been with the University for a few years when Dave joined the team. At some point during the interview process, Dave reached the conclusion that he was here to modernize the team. As a result, he started on a Tuesday, and by Wednesday was telling everyone how he would do their job.

Dave strutted from desk to desk, playacting the highly-paid consultant. In reality, he was here to take over the student enrollment system from Ben. Ben had inherited it from Carl, who had inherited it from Bob. A whole chapter of begats was required to trace the roots of the system. It was mostly implemented in simple batch scripts, and it mostly was driven by simple text or CSV files. It wasn't a terribly pretty system, but it did have a few very important features:

  1. It worked.
  2. It didn't require much maintenance.
  3. It was thoroughly documented and well understood by the support team.


tblIsThere

by in CodeSOD on

"I've been maintaining a 'certain' application for several months now," Trent writes, "it exists in a wonderful state of being partially properly written code, but mostly legacy garbage. I've done my best to avoid anything in the database realm, but a change request forced me to journey down that dark path."

"When scrolling through the countless number of tables, I noticed something called tblIsThere. This is what it looked like:"


No One Should Need More Than 64 Zettabytes

by in Error'd on

"Having used a calculator to double check," Stephan writes, "I can confirm that the SQL 2008 R2 database will have to live without tuned indexes. Unless anyone happens to have a 64 zettabyte disk I can borrow?"