Recent Articles

Dec 2013

Classic WTF: The Firing Offense

by in Feature Articles on

It's been a great year here at The Daily WTF and according to our in-house statisticians, The Firing Offense by Charles Robinson, published on May 21st, was our most popular article in 2013! Enjoy and see you back on January 2nd, 2014.


Egon was fortunate enough to land a front-line support job fresh out of college, but he didn’t enjoy a single minute of it. He continued to slog thru the seven circles of Helldesk for about a year until he found an opportunity to move on. An opening at nearby WTF University’s Electronic Engineering department needed to be filled by a well-rounded IT guy. Egon didn’t think he had much of a chance to land the job, but desperation made him try.


Classic WTF: A Crony Joke

by in Feature Articles on

Today's 2013 WTF flashback article is a great one written by Remy Porter back on July 30th and is a perfect example of Hanlon's Razor in action.


Steve set aside his Turkish pizza and borek and answered the phone. He was taking lunch around the corner from the office.


Classic WTF: A Misleading Memory

by in Feature Articles on

Today's Best of '13 classic was written by Ellis Morning and originally ran back on March 12th. It shows that one constant remains as true today as it was years ago: the very worst users are sure to call just as you're about to walk out the door. Google+


6:55 PM. Tom's shift ended in precisely five minutes. Neither he nor any of his late-shift copilots were on the phone at the moment, so increasingly carefree banter flowed through an otherwise empty office. His co-workers discussed that new game, Myst, and the latest puzzle that stumped them. They'd keep it up all the way out to their cars.


Classic WTF: The Biggest Boon-Dongle in the World

by in Feature Articles on

With the year drawing to a close, it's a great opportunity to review our best articles from 2013. Here's one written by snoofle that was originally published back on January 31st.


Telecommunications manufacturing is a cut-throat business. Features, functionality and hardware need to be added and continuously improved at a frenetic pace in order to stay one step ahead of the competition. Engineers must constantly increase their skills to leverage the latest advances in technology to design and build the best product possible at the lowest cost. Slip up just a little, and it can be a death knell for your company.


Best of Email: Questionable Maintenance, A Refund on Storage, and More

by in Feature Articles on

Don't forget, The Daily WTF loves terrible emails. If you have some to share, mail in your mail!


So...When is Maintenance Again? (from Eric J.)


Where's Windows?

by in CodeSOD on

Java was touted as write once, run anywhere to emphasize its cross-platform advantages. Of course, the devil is in the details, and to interact with the local operating system, you still need to know something about it.

Without a built-in facility, the only real way to figure out the local OS is to try to exec commands unique to each OS and then check to see which ones succeed, and what value(s) get returned. For example, uname -a provides useful information on *nix systems, but is useless on Windows. It can be as painful as trying to find Waldo.


Click Here to 'Like' Unhandled Exceptions

by in Error'd on

Alexander writes, "I was searching the web for solutions to some Oracle OCI driver issues when a I received a curious suggestion."


Long Distance to Valid

by in Feature Articles on

“Could you be on this call too, Bruce?”

Bruce puzzled over the request. “Abby,” he said, “if Dale will be there, I’m not sure I need to be.”


Don't Wear Out Your Methods

by in CodeSOD on

Each year, whenever summer weather faded and the air started to turn brisk, Craig knew that it could mean only one thing - a new round of interns would be arriving in the department. Sure, some were markedly better than others, but a little bird had mentioned to Craig that his intern-of-the-year actually had some coding experience on his resume!

Maybe this was why Craig let his intern run loose with what he had considered a simple spec. It was meant to be a learning task. You know - get familiar with checking code in and out of source control, explore the code base, and so on. The result? A 2,300 line source file named "Functions".


Confessions: Network-Terminating Protocol

by in Feature Articles on

Paul's family has a long, proud tradition of working in IT. His father ran support for a Stanford computer lab, and his grandfather — a greengrocer — claimed to have seen a UNIVAC one time. Ambling dutifully down the path their ancestors trod, not only was Paul sysadmin for a research lab, but his brother, Saul, was on the same university's network security team. The brothers' relationship was an amicable one, but there was one incident about which Saul always felt the need to give Paul a hard time.

It had been like any other day at Paul's workstation when an IM arrived from his brother: "I'm going to forward you an email we just got from the operator of a public NTP server - it's about one of YOUR machines." That sounded ominous, but Paul didn't have long to wait; a moment later, the complaint arrived in his inbox:


Calling All Zip Codes

by in CodeSOD on

It's been an active couple of months for O. Z.'s group.

In an effort to combat keying errors and all around bad data, some long overdue validation was added by one of O. Z.'s co-workers to several of the screens, and perhaps most importantly, to the address entry screens.


Death is NOT an Option

by in Error'd on

"I work at a large insurance company here in the UK and our life insurance system doesn't allow 'death' to be a valid reason for a member leaving a life insurance policy. Seems to me to be a pretty big oversight," Jimmy D. wrote, "Having raised this with our technical support team I was told there was (and I quote) 'no real benefit' to fixing this so it will be left as-is."


Requirements by MSPaint

by in Feature Articles on

Stuart read the project document for Stark Portal, his new assignment from Michael, the department project manager. At first glance he thought Michael had forgotten the requirements entirely. That wasn’t the case.

There was only one requirement listed: LIKE LANNISTERNET BUT GREY


Printing Decimal Numbers is HARD!

by in CodeSOD on

Decimal numbers are sometimes difficult to work with because they can't always be stored with exact precision. This also leads to difficulty in displaying the value of a decimal number because you need to deal with getting the precision right. Fred G. found this bit of ingenuity:

  // File format
  //
  // ABBBBBCDDDDDEEEEEEE...
  //
  // A - bytes 0-0   integer portion of field x (range: 0-9)
  //     (done this way because we can not represent a decimal number exactly)
  //
  // B - bytes 1-5   decimal portion of field x (range: 00000-99999 to represent 0.00000-9.99999)
  //     (done this way because we can not represent a decimal number exactly)
  //
  // C - bytes 6-6   integer portion of field y (range: 0-9)
  //     (done this way because we can not represent a decimal number exactly)
  //
  // D - bytes 7-11  decimal portion of field y (range: 00000-99999 to represent 0.00000-9.99999)
  //
  // E - bytes 12-18 discount rate (range: 0.00000-9.99999)
  // ...
  public class Xyz {

    public class Data {
       private double ab;
       private double cd;
       private double e;
       // ...

       public Data(double ab, double cd, double e /* ... */ ) {
         this.ab = ab;
         this.cd = cd;
         this.e  = e;
         // ...
       }

       public double getAB() { return ab; }
       public double getCD() { return cd; }
       public double getE()  { return e;  }
       // ...
    }

    public String createDataToWriteToFile(List<Data> list) {
      DecimalFormat df1 = new DecimalFormat("0.00000");
      DecimalFormat df2 = new DecimalFormat("00000");
      DecimalFormat df3 = new DecimalFormat("0");

      StringBuilder sb = new StringBuilder();

      for (Data d : list) {
          String s = df3.format(Math.floor(d.getAB())) + 
                     df2.format((d.getAB() - Math.floor(d.getAB()))*100000) +
                     df3.format(Math.floor(d.getCD())) + 
                     df2.format((d.getCD() - Math.floor(d.getCD()))*100000) +
                     df1.format(d.getE());
          sb.append(s);
          sb.append("\r\n");
      }

      return sb.toString();
    }
  }

Call Me Ishmael

by in Feature Articles on

David E. and his peers were pirates back in the pioneering days of the wide open seas of the internet back in 1998. Their small group consisted of a few just-out-of-college adventurers and one slightly more seasoned manager. They sailed by the seat of their pants while writing a new product for their company. It was like sailing over the ocean, looking for something, but not knowing what...

The application they had cooked up looked promising, but the initial roll-out went... badly. It performed fine when they tested it-- but when clients started hitting it all at once, it choked. They felt as though they were locked in a pillory, and gleefully mocked by David's boss's arch nemesis-- let's call him Ahab. Ahab swaggered into the review and ripped at their design, convinced it would never work, all the while touting his own example. David's team had to concede that he was right, and re-factored a lot of their code. After all, Ahab was The Man!


The Uninstalling Installer

by in CodeSOD on

From a technical standpoint, Digital Rights Management is a WTF- it’s a crypto system which requires the user to have access to the key, and simply hopes to make getting the key out of the device too cumbersome to be worth a pirate’s time. The shoddy technical reasoning behind it sometimes leads to shoddy technical implementations.

Benjamin tried to help a friend install a DRM client on their machine. The installer continuously failed, and perhaps foolishly, Benjamin decided to run it with elevated permissions. After restoring from backup, Benjamin cracked open the installer and looked at some of the shell scripts that it ran.


Where We're Going, We Don't Need Roads

by in Error'd on

"Though the scenic route is tempting, I think I'll drive instead of taking the bus," writes Alfred'o.


'O'-Convertible

by in Feature Articles on

The consulting company that Alicia worked for, NewSoft Associates, was in the intelligence business. Their work involved digging through data produced using technology that was years and decades old, identifying the nuggets that were valuable, and persisting them into a central repository so that others could perform the needed analysis and take the appropriate action.

Yes, they were a Business Intelligence company. And Alicia was one of their leading consultants.


Fixing Delphi

by in CodeSOD on

Delphi has a rounding function that uses bankers' rounding instead of mathematical rounding, which can cause issues in mathematical applications. Throughout the years, folks have used numerous solutions, frequently rewriting the round function to use mathematical rounding, or else adding both a bankers rounding function and a mathematical rounding function to allow for both methods. These have typically been only a few lines long.

Paul M. was upgrading some legacy code when he happened upon a unique solution to "fix" the Delphi rounding issue:


Managed Order Management

by in Feature Articles on

Hiro’s employer, an international consultancy firm, hosted a number of applications for “enterprise” customers. They provided everything from HR solutions to order management tools. Each local office was independent, but a central corporate office would issue decrees to be obeyed as divine law.

One such decree ordered them to upgrade customers to a new, internally developed order management package, ASAP. Corporate had put a lot of time and effort into the tool, and wanted a successful roll-out. Hiro’s office did what they were told, and to prove their loyalty to their corporate overlords, they started by bringing their largest customer, Initech, on line. Hiro’s management proudly reported a successful migration.


Exceptionally Hard to Swallow

by in CodeSOD on

Does a tree make a sound if it falls in the woods and there's nobody there to hear it?

B. M.'s coworker was the stuff of which legends are made; code was always delivered ahead of schedule and it never threw an error. Her code was the least buggy in the entire department, and so became the standard against which all other code was measured.