Recent Articles

Jan 2009

What the Ad? - RPG Edition

by in Feature Articles on

Back in the day, when computer graphics ranged between non-existent and lousy and system specs called for RAM amounts usually less than 256k, and floppy disks were still...floppy, games that relied mostly upon the user's imagination provided the biggest bang for their software buck. Instead of the up, down, left, right, B, A, etc., it was all about typing in verbose commands like Look, Take, Get, Kill, and so on. However, where these games lacked in the graphics and gameplay perspective (at least from the modern perspective), there's one thing that they often got right - simulating the mindset of the jerkwad dungeon master.

First, consider the "classic" Zork II. I'm sure that I'll catch hell in the comments, but I absolutely hate this game. Now, I don't have a problem with the storyline or lack of graphics, no, I hate Zork II because it's the type of sadistic game that sets you up to fail.  Basically, you could get to one point in the game, unable to proceed because you don't have a certain item...and you can't go back unless you have an old game save. Activision got what they deserved for buying Infocom.


Critical Condition

by in Feature Articles on

Photo Credit: 'ntenny' @ Flickr Having worked with several companies as a systems administration consultant, Massimo had learned that one cliché is, in fact, true: the bigger they are, the harder their bureaucracies are to navigate*. When his employer sent him to work with their biggest client – a large government agency – he was prepared to deal with endless TPS Reports, Process for Application Implementation and Navigation documents, and Form Request Forms. But there was one thing he did not expect: that little asterisk at the end of the cliché.

You see, the “bigger they are” rule only works for reasonably-sized values of “big”. Once an organization grows too big – say, large-government-agency big – strange things tend to happen. The entire bureaucratic structure can collapse on itself, creating an überbureaucracy (i.e., an Ouroboros-like bureaucracy that can serve only itself) surrounded by satellite units that somehow work together to solve the organizational goal. It’s pure chaos. And not the good, entrepreneurial/start-up kind of chaos, more the touch-the-leftover-pizza-that-I-paid-for-with-my-budget -and-I’ll-stab-you-with-a-fricken-fork kind.


A Little Above and Beyond

by in Error'd on

"While browsing the New Mexico Corrections Department webpage," writes Bob Dole, "I came across this amazing picture . Most records indicate a lack of picture by simply not showing a picture, but this went a little above and beyond."


The Mega Bureaucracy

by in Feature Articles on

Photo credit: 'digicla' at Flickr At my daytime corporate-type job, if I need to even sneeze in the general direction of a production environment, I need both a managerial and customer approvals with documentation solemnly stating that I thoroughly tested my changes and swear on a stack of MSDN licenses and O'Reilly books that I am NOT going to break anything as a result of my changes.  Sure, the whole thing is a pain (and admittedly, a necessary evil), but what Bruce W. has to go through beats the pants off of anything I've ever had to go through.

For the most part, Bruce loves his job.  He gets to work with a lot of intelligent and motivated people.  He has been developing a new system to support a new product that has the possibility of earning his division several million dollars per year and saving the corporate parent several hundred thousand dollars per year.  The net effect on the corporate parent's bottom line will be quite nice.  He developed a Web front end while a fellow developer put together the data feeds.  The initial development work was estimated to take about six weeks; pretty good since we only had eight weeks to work with. 


The Great Code Spawn

by in Representative Line on

Several years ago, Dan D’ predecessor, Steve, came to the realization that many of us arrived at one point or another: writing data-access code can get boring and repetitive. To ease the tedium, Steve did what many developers in his position do. He wrote some code to generate a lot of code.

Unfortunately, Steve’s coding skills weren’t all too hot. Worse were his code-writing-code writing skills. In the years since The Great Code Spawn (as it has come to be known), the data-access layer has become an unmaintainable disaster – so much so that, rather than add a new database column, developers have “split” single fields into multiple through bit-shifting and string manipulation.


Noticing Something Strange

by in Feature Articles on

Jon works for a small company that sells electronic biofeedback monitors and provides a website that allows customers (mainly health professionals) to upload and interpret the collected data. Not too long ago, they hired an "experienced web developer" named Nigel to help on the web-end of things. After a few weeks of minor site maintenance tasks, Nigel was given his first real feature to implement: a notification system.

The Spec

The idea behind the notifications system was to allow management to communicate with customers about new products, system outages, industry news, and so on. The new feature had to accomplish the following:

  1. Provide a means for management to display notices to customers.
  2. A given notice may be intended for just one user, or for multiple users.
  3. On the notices page, the customer should see all notices that they haven’t yet acknowledged.
  4. The customer should be able to acknowledge notices so that they’re no longer displayed.

The Design


Sooo Jealous

by in Error'd on

"This message came up while I was looking for information about a funeral home," Gary noted. "While making my friends sooo jealous wasn't my primary objective, I guess it couldn't hurt."


Whom Should I Say is Calling?

by in CodeSOD on

An Anonymous reader who is part of a team that works for a small company, maintaining a messy codebase of a large and expensive company writes, "We were having trouble finding why a particular PL/SQL Stored Procedure was failing. Inside the SP, we found the following:

IF .. AND p_program_name <> '[executable name].exe'
THEN   RAISE invalid_calling_pgm; END IF;

Sponsor Appreciation, Service Bells, Service Doors, & Much More

by in Feature Articles on

Without our sponsors' support, The Daily WTF simply wouldn't be. Please show your support by visiting these fine companies and checking out their products & services. Or by sending in a cool souvenir. Or by even buying me a beer. But the first one's probably the easiest.

 

Resolver Systems   Resolver Systems - developers of Resolver One, an Excel-compatible spreadsheet designed for reliability that's programmable in Python, easily integrates with .NET, and comes with a built-in Web server. Give it a shot, make an awesome spreadsheet, and send it in to win the $25,000 Resolver One Challenge!
Aurigma   Aurigma - developers behind Image Uploader, a cross-platform component that delivers a user-friendly interface (thumbnail generation, folders, etc.) for uploading multiple image files.
CounterSoft   CounterSoft - makers of Gemini, the software that enables you to log, assign and progress ALL your project issues: Bugs, Enhancements, New Features, Risks, Change Requests, Quality Checks, Support Tickets and more. Now with a free, 5-user license.
DotNetRemoting   DotNetRemoting - a communication framework that allows you to easily build bidirectional network applications for Windows, Web, Mono, and PDA platforms.
Infosoft Global   Infosoft Global - the developers behind the seriously impressive FusionCharts v3: interactive and data-driven charts, gauges, and maps for web applications. Reasonably priced (starting at $69), fairly licensed, and cross-platform, it's certainly worth checking out their free trial.
FsckVPS   Fsck VPS - straight-forward Linux VPS hosting by geeks, for geeks: root access, no strangeness, decent hardware, and as much virtual coffee as you can drink. Plans starting at $9.95/mo and, with coupon code WTF, get 50% off your first month.
Software Verification   Software Verification - software engineering tools for memory leak detection, code coverage, performance profiling, thread lock contention analysis and thread deadlock detection, flow tracing and application replay on the Windows Vista, 2003, XP, 2000 and NT platforms.
Springloops   Springloops - unique source code management tool focused on web development teams. Code in parallel, share your code safely, and concentrated on results, not on lost changes or overwritten files. Sign-up for a free trial or a complete free account, and see how it makes great things simple.
A Sane Approach to Database Design   A Sane Approach to Database Design - the book that tells you how to build a smart database, with lots of examples of people who did it wrong. And although the irish girl has nothing to do with database design, I certainly appreciate keeping up the tradition.
Mindfusion   MindFusion - a great source for flow-charting and diagramming components for a variety of platforms including .NET, WPF, ActiveX and Swing
Mosso   Mosso - massively scalable hosting for .NET (2,3,3.5) PHP, Ruby, etc., with unlimited sites & mailboxes, simple online provisioning, and an enterprise clustered platform that's supported by real people.
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.
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)
WTF   The Non-WTF Job Board - Powered by HiddenNetwork, it features some great job opportunities like:

Little Boxes Everywhere, and More Support Stories

by in Feature Articles on

Little Boxes Everywhere (from Nick W)
A little while back, the help desk forwarded a call from Jane in accounting who, apparently, couldn't find a critical spreadsheet. Obviously, the help desk must have reasoned, this must be a job for... Data Recovery!.

After getting a few details from Jane, I opened up the network share and noticed that the file was, in fact, there. I even checked the backup catalog to make sure that previous editions of the file existed just incase it was a data corruption problem. Everything was where exactly where it was supposed to be, so I called up Jane to see what the problem was.


Elevator Crash

by in Error'd on

"I saw this in the elevator at downtown Seattle Macy's," writes Alan, "I decided to take the stairs."


Cluster#$%&

by in Feature Articles on

Image credit: 'Mark Bowytz' - REMEMBER THE KRAKEN!!!It was a little past 4AM when Massimo's support pager went off, jarring him awake. Without even looking at the pager or logging into his laptop, he flipped on the television to Channel 242: the Video on Demand channel for the Italian TV broadcaster that he worked for.

Nothing.


Delaying the Evitable

by in CodeSOD on

Wow, Paul thought to himself, "signing up for a new account takes a little while, huh? He was new on the job and clicking through to get a handle on the application he'd be maintaining. He opened the code to see what the signup button was actually doing behind the scenes.

The design was kind of strange; all HTTP requests were routed through Actions. Most Actions inherited from other Actions – for instance, LoginAction and SignupAction inherited from DelayableAction, which inherited from ActionBase.


Feeling Aggregated

by in Feature Articles on

"All right, Jory, we're gonna start you off simple here, kid!" Jory B.'s boss was a large man with forearms like hairy hams, and he spoke in a gruff, deep, and loud voice. "Yer gonna learn about The Aggregator by adding a simple feature. I want it to be sendin' emails whenever someone signs up at one of our locations!" He continued on his throaty, saliva-y explanation of what should appear in the emails, which mail server to use, and so on. "Welcome aboard, kid," he said warmly, extending a hand with fingers that looked like sausages.

Jory dodged flying saliva droplets while his boss spoke. "Thanks. And can do!"

The Aggregator


There's Gotta Be A Catch

by in Error'd on

"The $9.99/mo for T-Mobile @Home seems pretty good," Dustin notes, "but there's gotta be a catch in there somewhere."


self->Static Anti-Pattern

by in CodeSOD on

If someone comes up to you and says that they work in the video game industry you might think that he or she has an interesting job (and if you're a gamer, then it sounds they have an AWESOME job). Surely, in between marathon video game playing sessions, they would be working with some true geniuses on really cool programs instead of working with the regular schmoes maintaining the Batch Load Processing Report - right? Well, wake up from that dream, bucko.  The same bad coders from whom you inherited that insipid, "enterprise level" application get to make video games while you slave away for "the man".

Consider Andy Goth's submission.  After successfully integrating a flight simulator with an image generator and making it a sparkling gem of efficiency, maintainability, and clear documentation, he was given the task of documenting the high-level architecture and low-level implementation of which the following code is a part of.  In between writing Doxygen comments saying "This function does nothing" or "Use of this macro is a syntax error" or "Using this macro on the left-hand side of a multiplication will result in zero", considered if it would take longer to finish his documentation or ask management if he could throw away the old code and rewrite the entire application from scratch.


ANDY=NO

by in Representative Line on

"Years ago," Mark wrote, "and long before I had started working there, the lead developer at my company tendered his resignation and starting up a firm of his own. It was a one-man consultancy built to service a single client: his former employer. They had little choice in retaining his services as, prior to leaving, he intentionally obfuscated all of the code.

"As part of Operation Obfuscation, he removed all of the unnecessary white space and (apparently) converted the code to all caps. Problems were compounded by the platform (some off-brand BASIC interpreter), his original choice of variable names (X, Y, Z, etc.), and the lack of any structures like subroutines. Developers came and, after hearing about code, quickly left. For a reason that escapes me to this day, I actually chose to stay and help them with their mess. It sounded like it could be a fun challenge.


Scratch One Inevitability

by in Feature Articles on

Before Curtis even got to sit down at his desk, he was accosted by a frenzied, sweating junior developer. "OhmygodCurtis," he began. Curtis extended his hand in a "calm the hell down" gesture and allowed him to continue. "A whole bunch of our stores had no data posted last night and I'm not sure why orwhat to doabout it or whoIshouldtalktoand-" Curtis gestured again, to which the developer handed him a thin stack of papers. After a deep breath, the developer continued. "It's a list of the stores that didn't post last night."

The stores in question were part of what we'll call Hewitt & Liberty Block – a reasonably large tax preparation company serving a handful of states with over 2,000 retail locations. Each of the locations was set up to post tax data and sales records to the central computer at the main facility. According to Curtis's list of stores that hadn't posted any data, it was nearly 1/4. It was going to be a long day.


Salty News Photos

by in Error'd on

"Google news chose an interesting photo to go along with an article about mental illness," Tom commented.


Service Tag, Please

by in Feature Articles on

As a Network Administrator in a mid-sized manufacturing company, Kevin is used to working with end-users. One of his roles is to act as third-tier technical support, thereby avoiding most of the fun experiences from the corporate helpdesk and focusing mostly on the more complex issues from power users.

One such issue that came up recently was that a certain user's laptop intermittently dropped connections to the VPN. After running several diagnostics against the computer, Kevin determined that, oddly enough, the integrated network card was defective and that a warranty fix through Dell was be needed. After explaining the situation to the user over the phone, he sent a quick follow-up email to ask for the laptop's service tag. Days later, he received the following reply in the form of a printout via inter-office mail.


CommonUtils and the Inadequate java.lang.*

by in CodeSOD on

CommonUtils
"Right around Christmas time," Earl B writes, "I inherited a lovely Java project that contained a library class named CommonUtils. Wandering inside, I found something quite strange in the middle of quite a few other weird things."

public static Integer getIntegerValueOf(int value) {
        Integer result;
        if ( value == 0 ) {
            result = DomainConstants.INTEGER_0;
        } else if ( value == 1 ) {
            result = DomainConstants.INTEGER_1;
        } else {
            result = new Integer(value);
        }
        return result; 
    }

Revenge of MUMPS Madness!

by in Feature Articles on

Photo credit: 'digicla' at Flickr Tyson wasn't used to 8:00am meetings, let alone meetings with the not-so-technical-even-though-their-name-implies-it Application Auditors on the dimly lit 32nd floor. Arriving fashionably late at 8:06, he was struck by how many suits were in the meeting with him - and he'd again opted not to shave.

The middle-suit seated across from him began, "Tyson, let me cut to the chase - there are some serious flaws in your CASTLE system."


The Many Faces of Malcolm Eleby

by in Error'd on

Pete Ash writes, "Malcolm Eleby with the missed shot, Eleby Rebounds, passes to Eleby, back to Malcolm, Malcolm scores!"


Longjmp - FOR SPEED!!!

by in CodeSOD on

For those who don't know, there is a standard C header called setjmp.h that defines two methods: longjmp() and setjmp(). The longjmp works just like a goto statement in C in that, when executed, the program jumps to another pre-defined point in the code, defined by a setjmp. However, where goto is limited to the current, local scope, longjmp can span outside of the current scope and across functions.

If goto is considered harmful, then longjmp() should definitely be considered dangerous. As in, thermo-freakin-nuclear bomb dangerous. Fortunately, its complexity and frequency of use seem to be on par with that of a nuke, and most C developers have not brought it in their everyday. Most. And then there are the folks like Giovanni Verza's predecessor, who left behind functions like this.

/* this subroutine is called thousands of times.
use longjmp instead of loops to increase speed.
Daren 12/03/05 */


void
calculate(struct salesinfo*sales){
        jmp_buf buffer;
        int i=setjmp(buffer);

        if (!(i<sales->count))
                RETURN_NOTHING;

        addvaluetosubtotal(sales->values[i]);

        if (i<sales->count){
                longjmp(buffer,i+1);
        }
}

Irish Girl

by in Souvenir Potpourri on

Ever since the first Free Sticker Week ended back in February '07, I've been sending out WTF Stickers 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: Steak Dinner).


When most readers send in souvenirs, they'll use the postal system. Every once in a while, someone local or passing through Cleveland will stop by and exchange souvenirs over drinks at the CornerStone Brewing Company next door (which is always welcome, let me know if you're ever in the area). And then there's Danny V who, apparently, dashed in the office, threw this package halfway up the stairs, and rushed out before anyone even saw him.


The Revealing Spreadsheet

by in Feature Articles on

Photo credit: 'Life in LDN' at FlickrWhen Glen Sommers was hired to add some features to a Cold Fusion based web application for a non-profit organization, he wasn't surprised by the quality he found, instead he expected it.

The application, whose sole purpose was to manage registrations for a organization's annual conference, was a learning experience for the original developer (who apparently did the work for free).  Among its many WTF's, the app used a grand total of 1 database table with 50+ columns with generic names like PackageOne, PackageTwo, PackageThree, and so on, but The Real WTF™ was the application's security...or rather, the lack thereof.

The URL Hack


No More Paper!

by in Error'd on

"I received these three letters all on the same day," wrote Martin P., "two were sent October 31st and the other November 1st, and they all said pretty much the exact same thing. At least it's comforting to know we're saving trees."


It's All About C, The CIA Interview, & Not People Like You

by in Tales from the Interview on

It's All About C Now (from Dan M)
Last year, I saw that a certain founded-and-headquartered-in-the-Netherlands electronics company was hiring web developers in my town, so sent in my résumé. Like most résumés, mine contained the standard skills & buzzword section:

Languages and technical writing: PHP, MySQL, AJAX, JavaScript, PRADO Framework, MSSQL Server, C#, .Net Framework, Perl, C/C++, Visual Basic, ASP, HTML, DHTML, XML, SOAP, CSS, Java, UML

I was pretty excited to get an interview. Well, that is until the interviewer took one look at my resume and said "Why is C so far down on your list?"


Your E-tailer Hates You

by in CodeSOD on

You'd think that buying things online eliminates the human element of shopping in a retail store. And you'd almost be right.

Nolan heard about one of his company's "problem customers" from a friend of his in the customer service department. This customer was satisfied exactly as often as he was not right – never. If there was a coupon code for $5 off five items, he'd be calling to ask why it didn't work for one item. If they caved and gave him the discount, it'd only result in more calls demanding more and more discounts. If his order arrived on the last day of the estimated shipping date, he'd bitch and moan until the shipping cost was refunded.


Curiosity, Ignorance, Malice

by in Feature Articles on

Jim B. stared wistfully in the mirror at the wrinkles near his eyes and the few stray gray hairs that he’d accumulated over the last six months. On the way back to his desk, he stopped by his friend Mike's desk. “Point three six,” he said as he banged his head against Mike's cubicle wall. “Point three six.”

His work was about as high-stress as it gets – he was on a team building a security system that was responsible for keeping ne’er-do-wells out of data belonging to nine-figure financial companies and an array of three-letter government organizations, many of which Jim had never heard of. But if he failed and a hacker got into the data, Jim would be sure to find out exactly what the FQD was when they had him deported.


Nothing To Smile At

by in Error'd on

"That's nothing to smile at, Brett," writes David Robinson, "EntityName parsing errors are serious business."


(currently live at NBC Sports)


Enterprise Level Access

by in CodeSOD on

Some time ago Martin F. was sent in by his IT consulting company to help fix some problems with the HR Database at a major European banking / insurance firm.  He admits that the WTF worthy warning signs were there at the onset (among them being that he was the 4th in a series of consultants assigned to this project), but being relatively naive to such things, he accepted the position and spent a year shaking his head in bewilderment and, at the same time, his fists at Rob.  He was an HR 'specialist' and a true IT genius who had a self-proclaimed hobby of programming in Visual Basic and was, of course, long gone from the corporation.

The HR Access-pool

The problem database held monthly snapshots of information about all the (over 50,000) employees of the bank, such as their names, DOBs, home address, function, fixed and variable salaries going back about 4 years.  Over that period of time, it had expanded to an impressive 2 Million records in size which is not unheard of in any large corporation, but your typical "Select and Group By" query on 200 people took about eight minutes.  However, as Martin came to discover, this was mostly due to the fact the corporate HR database was in reality an Access database sitting on some network fileshare.