Remy Porter

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

Jul 2014

A Team of One

by in CodeSOD on

Bob worked at a small company. There’s a messy history in its founding. The owner, Aaron, worked for another company making basically the same software, until he finally got fed up with their coding style and practices. So he quit to found his own company, with his own rules about things, like how many blank lines there should be before a for loop (exactly 1), how to order variable declarations (alphabetically, with “::” coming after “z”), and how source control should be organized (about as organized as organized crime).

Aaron didn’t waste a lot of time managing, and made sure to keep his hands in the code. Of course, no one wanted to touch the code after he did, which meant Aaron wasn’t just the owner, but he was a one-man team. The other teams might deliver features, but Aaron’s team delivered vision. Well, vision, and code blocks like this, which parse parameters off the command-line:


The Great Bacon Conspiracy

by in Feature Articles on

As an IT infrastructure manager, Jerry spent more time skimming his junkmail folder than he liked. Unfortunately, a large number of important messages landed there, because Garrett, the CSO, mandated an extremely aggressive approach to identifying spam. No less than once a week, a vital message was marked as spam.

NCI bacon.jpg


A Priestly Epoch, Running off the Tracts

by in Coded Smorgasbord on

Peter came across this helpful little utility function:

public static DateTime EPOCH_UTC()
{
   DateTime epoch = new DateTime(1980, 1, 1, 0, 0, 0);
   return epoch;
}

In the Belly of the Beast

by in Feature Articles on

A large company is something like a whale. They are huge beasts who strain their sustenance (profits) from the ocean that surrounds them. In this analogy, customers are krill, but their employees are more like Jonah- wrapped up inside of a beast larger and more complex than they can possibly imagine.

First, we have no control over who gets swallowed up in that whale with us. Phil, for example, found himself huddled in the bowels of a large manufacturer with Len as his only company.

The Broken Piece


Everyone Wants Validation

by in Coded Smorgasbord on

Faibbus works with an international team. Some of his fellow developers don’t quite adhere to the same standards. This code was in a module, and the comments and text were originally in Dutch.

if(this.value.length!=0){

   //because the greater/smaller signs are being escaped  

   if(this.value.length==1){alert('The year must have 4 digits.');this.focus();}

   if(this.value.length==2){alert('The year must have 4 digits.');this.focus();}

   if(this.value.length==3){alert('The year must have 4 digits.');this.focus();}

}