Remy Porter

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

Sep 2012

A Byte of Booleans

by in CodeSOD on

Carl’s investigation started when he found out that his predecessor had set up a cronjob to restart Tomcat every three hours. Carl never tracked down one specific reason why the application server needed to be restarted every three hours, but paging through code like this, he knows the problem’s in there somewhere.


            

Finish the Finnish Audit

by in Feature Articles on

Many European nations require their citizens to serve in the military. For those not ready for that Starship Troopers-esque future, most of those nations offer a civilian alternative. In Finland, this is called “siviilipalvelus”.

Siviilipalvelus is what brought Sampo to a small sub-department of the Finnish Treasury. He had programming skills, and they had a programming problem. They had an application which was older than Sampo, and at this point no one knew what the original requirements were, nor whether it met those requirements. There were half a million lines of code that were ported across many environments, and not nearly enough eyes to review them.


Connected to the Connector to the Connection to the System

by in Feature Articles on

“The users want some changes on the ticket form,” Bucky, the smiling intern said. “I was told I should talk to you.”

Jesse laughed. “Oh, I know that form well.”


The Lone Rangers

by in CodeSOD on

It started when David tried to access a Singleton and got a null-pointer exception. Then he noticed some bugs where the Singleton had inconsistent state. And then he looked at the code…


            

The Slowdown

by in Feature Articles on

The marketing firm managed the web presence of several large banks and needed a Unix admin. Nick had spent the past decade running heavy HP-UX servers in the banking industry. It seemed like a very natural fit, and Nick thought he was going to enjoy the faster pace in a smaller firm.

The firm, as he learned, was broken into two major branches: consulting and everything else. Everything else existed to keep consulting happy, since consulting pulled down the big bucks. On Nick’s first day, his boss Ted introduced him to Larry, one of those consultants. Larry had some very important things to tell everyone who worked with the server team.

“There are two Windows boxes in the data-center,” Larry explained. “Those are mine. Do not touch them. Ever. Nod if you understand.”


Big-Data JSON

by in CodeSOD on

When Matthew saw this attempt at a JSON serializer, he had one question: why didn’t you use one of the many libraries we already use in this application?

The answer was, “Because on ‘big data’ procession you should to avoid creation of many objects in the Java!”


The Reporting System

by in Feature Articles on

“Hey, is that a COBOL book on your shelf?”

Matt looked up and saw his boss, Jack, poking around the corner of his cube wall like an oncoming iceberg. “Huh? Oh, that. Yeah. My dad gave that to me as a joke…”


Hexed Id

by in CodeSOD on

The web application David inherited has one main job: fetch articles based on the integer ID passed on the URL. The only trick to the whole thing is that the ID might be encrypted and represented as a hexadecimal number.

David didn’t really look into the process until someone complained that the system was serving up the wrong articles. When he read through the code, he saw this: