The Daily WTF - RSS Feed

Curious Perversions in Information Technology

Latest articles

Error'd: Days of Future Passed

After reading through so many of your submissions these last few weeks, I'm beginning to notice certain patterns emerging. One of these patterns is that despite the fact that dates are literally as old as time, people seem pathologically prone to bungling them. Surely our readers are already familiar with the notable "Falsehoods Programmers Believe"...

CodeSOD: Constantly Counting

Steven was working on a temp contract for a government contractor, developing extensions to an ERP system. That ERP system was developed by whatever warm bodies happened to be handy, which meant the last "tech lead" was a junior developer who had no supervision, and before that it was a temp who was only budgeted to spend 2 hours a week on that project....

CodeSOD: The Truth and the Truth

When Andy inherited some C# code from a contracting firm, he gave it a quick skim. He saw a bunch of methods with names like IsAvailable or CanPerform…, but he also saw that it was essentially random as to whether or not these methods returned bool or string. That didn't seem like a good thing, so he started to take a deeper look, and that's when he...

CodeSOD: A Form of Reuse

Writing code that is reusable is an important part of software development. In a way, we're not simply solving the problem at hand, but we're building tools we can use to solve similar problems in the future. Now, that's also a risk: premature abstraction is its own source of WTFs. Daniel's peer wrote some JavaScript which is used for manipulating...

CodeSOD: Exceptionally General

p>Andres noticed this pattern showing up in his company's code base, and at first didn't think much of it: try { /*code here*/ } catch (Exception ex) { ExceptionManager.HandleException(ex); throw ex; } It's not uncommon to have some sort of exception handling framework, maybe some standard logging, or the like. And even if you're...

Error'd: Punfree Friday

Today's Error'd submissions are not so much WTF as simply "TF?" Please try to explain the thought process in the comments, if you can. Plaid-hat hacker Mark writes "Just came across this for a Microsoft Security portal. Still trying to figure it out." Me, I just want to know what happens when you click "Audio".   Reader Wesley faintly...

CodeSOD: A True Leader's Enhancement

Chuck had some perfectly acceptable C# code running in production. There was nothing terrible about it. It may not be the absolute "best" way to build this logic in terms of being easy to change and maintain in the future, but nothing about it is WTF-y. if (report.spName == "thisReport" || report.spName == "thatReport") { LoadUI1(); } else if...

CodeSOD: We All Expire

Code, like anything else, ages with time. Each minor change we make to a piece of already-in-use software speeds up that process. And while a piece of software can be running for decades unchanged, its utility will still decline over time, as its user interface becomes more distant from common practices, as the requirements drift from their intent,...

CodeSOD: He Sed What?

Today's code is only part of the WTF. The code is bad, it's incorrect, but the mistake is simple and easy to make. Lowell was recently digging into a broken feature in a legacy C application. The specific error was a failure when invoking a sed command from inside the application. // use the following to remove embedded newlines: sed...

CodeSOD: Switching Your Template

Many years ago, Kari got a job at one of those small companies that lives in the shadow of a university. It was founded by graduates of that university, mostly recruited from that university, and the CEO was a fixture at alumni events. Kari was a rare hire not from that university, but she knew the school had a reputation for having an excellent software...

Discover, share and read the best on the web

Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters! Get unfiltered news feeds or filter them to your liking.

Get Inoreader
Inoreader - Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters!