Recent Articles

Oct 2013

The Call of WTF

by in Feature Articles on

From the archived blog of Paul, recovered from a USB stick found beneath the raised tiles of a decommissioned server room, long forgotten.

The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents. But what of these modern times of connectivity, with the ease of the piecing together of disassociated knowledge? Can any information be safely sequestered away-- fragmented and separated, never to come together and burrow in the minds of men?


The Curse of the Warped Bootstrap

by in Feature Articles on

“Hey Stan, can I use mockingbird?” Andrew asked, leaning into Stan’s cube. He had to do some rigorous performance testing for a customer-reported issue.

Stan gave a start, ripped out his earbuds, and glanced back nervously. “Use sesame.”


The Flux Capacitor

by in Feature Articles on
Google+

After two weeks of vacation, it’s easy to forget the little things. Chad left his ID badge at home. That’s inconvenient in any office, but when you work at a US Naval Base, they take security more seriously. Without his ID badge, the door wasn’t supposed to open.

Chad was a Marine veteran who had become a civilian IT contractor. The enlisted men had a name for this sort of security: “Private Proof ”. A Marine Private might be stymied, but anyone with two brain cells to rub together could bypass it. Chad and his co-workers kept a large “year-planning” calendar on the insecure side. Chad pulled it down off the wall and slid it beneath the door. Waving the calendar around triggered the motion-sensor on the secure side, opening the door.


Remember, Remember the Thirty-Third of November

by in CodeSOD on

Some say that time is nothing but an illusion. The degree to which some software developers struggle with times and dates certainly suggests mysterious and unknowable forces swirling beyond the brink of human understanding. Consider this code that Ian found while pruning an old application. It's meant to provide the correct suffix for any given day of the month:

string num = "th";

int day = Convert.ToInt16(DateTime.Now.ToString("dd"));
switch(day)
{
    case 1:
        num = "st";
        break;
    case 21:
        num = "st";
        break;
    case 31:
        num = "st";
        break;
    case 2:
        num = "nd";
        break;
    case 22:
        num = "nd";
        break;
    case 3:
        num = "rd";
        break;
    case 33:
        num = "rd";
        break;
    default:
        num = "th";
        break;
}

Internet is Broken - Time to Get a New Phone

by in Error'd on

"I had only had my new phone for a few days when I got this message," Robert N. wrote, "Maybe I should just throw away the phone, because clearly, nothing works."


What Should He Do, Indeed

by in Tales from the Interview on

Leighton started his career as an apprentice ICT technician for a Secondary school. The job was roughly what you would expect, but the interview went down as one of the most surreal moments of Leighton's life. With his first interview scheduled to begin at 9:15 AM, Leighton arrived forty-five minutes early in his new suit and tie. At T-minus two minutes he remained the only candidate in the reception area, and his confidence was growing. But at 9:13, in walked Dave.

Dave had a strut to him, an air of cool detachment that Leighton couldn't seem to match, even though they were about the same age and Dave had elected to wear jeans and a t-shirt. It turned out they were vying for the same position, but while Leighton was relying on his community college experience, Dave had been putting computers together since he was in Secondary school. By the time the receptionist asked them who wanted to go first, Leighton's confidence was on the floor in pieces. His brand new tie seemed uncomfortably tight, and the collar of his dress shirt kept tickling his neck. Dave was out of his chair before Leighton could say anything, and looked back at his competitor with a smirk.


WTF Inc Epilogue - From the Other Side

by in Feature Articles on

Most folks know that I've spent the last couple of years on Team-WTF in Department-WTF at WTF-Inc. A while back I moved on to BigCo Inc. This place is a huge bureaucracy, but somehow, things manage to get done. As with most places, it has its share of (sometimes epic) WTFs, but those can wait for another day. This time, I got to witness WTF-Inc - from The Other Side.

Due to government regulations, BigCo found itself in need of the sort of services provided by WTF-Inc. Since there are only two companies that provide this type of functionality, and the other company has a long way to go to catch up to WTF-Inc, BigCo didn't have many alternatives, so they decided to check out WTF-Inc. As part of it, someone at BigCo got the idea to search its huge HR database of resumes to see if one of its myriad employees has ever had any association with WTF-Inc. One name popped up.


Decode("
")

by in CodeSOD on

A quick and easy way to generate WTF code is to find some deceptively simple problem that’s been well solved, and reimplement a naive solution to the problem.

Ryan found this attempt to handle HTML encoding of key characters. This code is VB.NET, which is important to keep in mind, since the Framework provides a variety of methods to do this correctly.


Authenticated Authentication

by in Feature Articles on

Like a ninja in the night, Hanz M., AKA Hanzo, stalks across Hesse University’s Dresden campus. The go-to man in the IT department, he fixes the messes that others leave behind. This is one of his stories.

"You absolutely must read this," Hanzo’s boss Gertrude said. "This is beyond hilarious."


Book Now and Get Your Threeth Night Free!

by in Error'd on

"I was shopping around for affordable vacation packages and found this on Expedia," John wrote, "Glad to know my threeth night will be comped!"


A Scrubbing Bubble

by in CodeSOD on

Matt was thrilled.

Finally, at long last, he had received the opportunity to rewrite one of the company's most overly complicated, fault intolerant, and important services. Over the years, it had achieved a "widowmaker" status where it was famous for crashing whenever it encountered one bit of uncommon (like accented characters) or mis-keyed data, often at the most busiest periods. There was talk among the teams for years of re-engineering the process but, because of its reputation, the code was deemed too gnarly and therefore too costly to fix...until now.


Hashed Code

by in Feature Articles on

Jan had been tasked with digging into a Java web application exhibiting odd behavior. New users couldn’t create accounts, and existing users sometimes found themselves logged in as other people. Concern about sensitive personal data being exposed to the wrong individuals had raised many corporate hackles, especially within the Legal department. While unresolved, the issue left the company open to litigation.

It was easy to rule out a state management issue. After that, Jan traced a typical login, and noticed something odd. The ID for his test account was 102, a value that came from an autonumbered column in the backend database. However, the application had to pass user data to an external vendor’s iFrame, which had its own mechanism for handling user states. Inside the iFrame, Jan’s ID was 48627.


Which Would YOU Rather Support?

by in CodeSOD on

To populate a temporary database table, most of us would write something like this:

-- Assume table TempData exists
Truncate table TempData;
Insert Into TempData
Select ... From ... Where id = 1234 and Flag Is Not NULL;

Advanced Adventures in ActionScript

by in Feature Articles on

"That's a natural twenty," Eric said, leering at his coworkers over his Dungeon Master's screen. "Tim, the kobold decapitates your Elven Ranger." The players groaned, and Tim could only mutter in protest. This was only their first adventure, and his character was already dead? Eric smiled. Tim and Alanna would soon learn that suffering abrupt decaptitation in their weekly Dungeons and Dragons game was much-needed preparation for their new jobs at ScriptCloud.

Eric had only joined the company a few months prior, as their first in-house developer. "They" were ScriptCloud Actionware, a local startup dedicated to reinventing the world of mobile app development. With the hindsight that only half a year of nonsense can bring, glimpses of ScriptCloud's deep-seated WTFitude were there right from the beginning. The interview process had gone slowly, not because of stiff competition or a monolithic HR department, but because ScriptCloud had chosen to post the job opening right before their entire staff went on summer vacation. The staff meeting on Eric's eventual first day was somewhat unnerving, ending as it did with the CEO swearing at the creative director after a twenty-minute argument about a single screen of the app's user interface. The app in question was ScriptCloud's first, a game with about the same complexity as Angry Birds (if none of the success). It was built by Costly European Consultants, and it would be Eric's job to support it.

White Plume Mountain


Free Optical Moose Inside

by in Error'd on

"I recently bought a new power brick for my Asus Eee PC netbook. It was supposed to come with a free optical mouse," writes Roberto, "However, I was surprised to find that I was sent an optical moose instead."


The Great John

by in Feature Articles on

Nate returned from his weeklong vacation expecting his co-workers to ask him the same boring question, “So how was it?” They never got the chance, because when Nate entered the office, he found half of his coworkers’ cubicles empty. AwesomeWeb was a small web shop which had done well over the years. When Nate went on vacation, they had a small staff of 40. Now, that number was slashed in half.

The survivors explained: “It’s Martia, man! She gutted this place under the guise of ‘cost-cutting’ measures. We’re lucky we survived!”


The Senior Format

by in CodeSOD on

Alex W. used to work with a “senior” C# developer. This “senior” developer’s resume proudly proclaimed that he had 15 years of experience developing in C#.

That “senior” developer has long-since moved on to more senior pastures , but he left behind code like this:


An IDE Impostor

by in Feature Articles on

Despite having written code for twenty years before he'd even turned thirty, Jim couldn't help feeling like a bit of an impostor. He wasn't suffering from the Capgras delusion, though. He felt the way many of us feel when presented with a new job using new technology - in this case, the .NET framework and C# - that surely he couldn't be good enough at this to keep the job for very long. Surely his peers would find him wanting. While Jim struggled with his own self-worth, one thing he didn't struggle with was choice of IDE: Visual Studio. Intellisense, one-click refactoring, and a host of other features allowed him to fake it till he could make it. As far as Jim could tell, there was no reason to use anything else when developing a .NET solution.

Jim's first assignment was to work on a codebase created by Biff. Biff was a Something-Something-Level 3, so Jim was ready to learn a few new things when he fired up Visual Studio and opened Biff's solution. And learn he did. For example, he learned that VS marks syntax errors with a red, squiggly underline, much like Microsoft Word does with spelling and grammar mistakes. Biff's code lit up like a first-grader's essay about summer vacation, loaded as it was with misspelled identifiers, missing semicolons, and AWOL closing braces. Jim would have wondered if Biff had ever tried to compile the mess, but he was too busy wondering if the senior developer made a habit of typing with his eyes closed, since Visual Studio would have helpfully pointed out these sorts of mistakes as he made them.


83.3% Uptime

by in CodeSOD on

It was the klaxon noise that Jacky hated the most. If there was even a whisper of the word “hacked,” Mr. Cullen would sound the alarm.

“All-hands meeting, boardroom, right now,” Mr. Cullen said. He left the klaxon on as the employees of Red Feather assembled in the boardroom. “The webserver,” he said gravely, “is no longer responsive. We’re being hacked as we speak.”


Top Secret BSOD

by in Error'd on

Rafael Cortes wrote, "Apparently, the folks who created the History Channel's show, America's book of Secrets, decided that a BSOD text qualifies as 'high tech'."


A Woman Scorned

by in Feature Articles on

The sound of the phone woke Sergio from a deep sleep.

"We've been hacked. All of our data is gone. I can't believe this is happening"


854

by in CodeSOD on
Troy, lead developer at IniTechMobile, should have known better.

The company was moments away from launching an Android port of their popular app, WereWolfTasks. The task management app plays a video of a transforming werewolf if the user doesn’t complete his to-do list before a full moon. Because IniTechMobile was an iOS shop, they outsourced the Android port to VampMobile, an eastern European company that specialized in iOS to Android ports.

The app launched on Google Play. Almost immediately, complaints flooded Support’s ticket log. "The werewolf video is all smushed when I rotate my phone!" "My tasks keep getting erased every time my phone restarts!" "Why are the tooltips all in Romanian?"


This Direction, That Direction, Indirection, Indigestion

by in Feature Articles on

Joe G. was working for a financial company that had accumulated more than 20 years' worth of code and cruft. This was compounded by management being convinced that the source of all of their technical problems was IT not caring enough about business interests, rather than two decades of short term thinking. They refused to acknowledge the company's technical debt and believed that IT employees' attitudes were solely responsible for their growing reliability problems.

The code was mostly C++ with some Java mixed in here and there for a few legacy front end applications. Joe was tasked with debugging a problem with one such application called TurdEditor. TurdEditor would receive several parameters from a server at startup, then let users tweak those parameters and click an apply button that ostensibly sent the new parameters back to the server. There was also an environment variable called DOMAIN, that if set would cause all company applications to connect to the test servers instead of those in production.