Remy Porter

Computers were a mistake, which is why I'm trying to shoot them into space. Editor-in-Chief for TDWTF.

Oct 2015

Monitoring the Situation

by in Tales from the Interview on

Joe T recently decided it was time to go job hunting. This mostly meant deflecting emails from head-hunters, doing phone interviews with ignorant HR departments, and the occasional on-site interview with a possible employer. One of those on-site interviews brought him to an IT services company which handled a few large US government contracts.

004. Brasserie La Saint-Pierre à Saint-Pierre (Bas-Rhin)


The Hard Problem

by in CodeSOD on

I’ll warn you to start: this is a date handling CodeSOD, but that’s only a small part of the WTF. You see, there’s an old joke, “There are three hard problems in computer science: naming things and counting things.” This code has a hard time with the first:

       private string ReturnCurrentGMTTime()
        {
            string result = string.Empty;
            DateTime time = DateTime.Now;
            string fs = "yyyy-MM-dd'T'HH:mm:ss";
            result = time.ToString(fs);
            result += "+02:00";
            return result;
        }

A Well Mapped Error

by in CodeSOD on

Marvin’s company had a problem. Their C++ application tended to throw out a lot of error codes. That was actually okay- that application had a lot of possible failure modes that it couldn’t do anything about other than cough up an error and quit.

The problem was that their customers weren’t particularly happy with messages like: Error: QB57, since it told them absolutely nothing. “RTFM” was not an acceptable response, so someone had to add some functionality to turn those cryptic error codes into meaningful messages.


Validate My Feelings of Cleverness

by in CodeSOD on

It’s not uncommon to have a branch in your code along the lines of, if (debugMode) { doSomeLogTypeThingy(); }. Usually, we try and wrap that sort of stuff up and keep it far away from the actual business logic, and the result is a plethora of logging frameworks and diagnostic libraries.

They are, however, consistent about one thing: whether or not debugMode is enabled or not, the actual business logic should behave the same way. They’re designed and intended to be minimally disruptive.


A Type of Insanity

by in Coded Smorgasbord on

Types are fundamental to most programming languages. Even the loosest, duckiest type system is still a system of some kind. It’s impossible to be a programmer if you don’t at least have a vague understanding of what types are, what they mean, and how you use them.

Well, not impossible.

The Null Type


Sponsor Announcement: Scout

by in Announcements on

Our sponsorship program has been a great success, and we’ve got another great sponsor to help us keep this site running and bring you the horrors that your jaded eyes crave, along with special features like TDWTF Live and our recent BYOC contest about the Lucky Deuce. Our newest sponsor is Scout. They donate $10 to the Larimer County Humane Society every time somebody tries out Scout, and now they’re launching a new tool…