The Daily WTF

The Daily WTF - 1172

Latest Articles

CodeSOD: A Context for Logging

When logging in Java, especially frameworks like Spring, making sure the logging statement has access to the full context of the operation in flight is important. Instead of spamming piles of logging statements in your business logic, you can use a “mapped diagnostic context” to cache useful b...

CodeSOD: The Replacements

Nobody wants to have a Bobby Tables moment in their database. So we need to to sanitize our inputs. Ted C noticed a bunch of stored procedures which contained lines like this: @scrubbed = fn_ScrubInput(fn_ScrubInput(@input)) Obviously, they wanted to be super careful, and make s...

CodeSOD: Cast Away

The accountants at Gary's company had a problem: sometimes, when they wanted to check the price to ship a carton of product, that price was zero. No one had, as of yet, actually shipped product for free, but they needed to understand why certain cartons were showing up as having zero c...

CodeSOD: I See What Happened

Graham picked up a ticket regarding their password system. It seemed that several users had tried to put in a perfectly valid password, according to the rules, but it was rejected. Graham's first step was to attempt to replicate on his own, but couldn't do it. So he followed up with one of...

Error'd: The WTF Experience

"As it turns out, they've actually been singing Purple Haze before the start of all of those sportsball games," Adam writes. Andrew C. writes, "When you buy from 'Best Pool Supplies', make no mistake...you're going to pay for that level of quality." Jared wrote, "Pullin...

CodeSOD: Parse, Parse Again

Sometimes, a block of terrible code exists for a good reason. Usually, it exists because someone was lazy or incompetent, which while not a good reason, at least makes sense. Sometimes, it exists for a stupid reason. Janet’s company recently bought another company, and now the new compan...

Coded Smorgasbord: Driven to Substraction

Deon (previously) has some good news. His contract at Initrode is over, and he’s on his way out the door. But before he goes, he wants to share more of his pain with us. You may remember that the StringManager class had a bunch of data type conversions to numbers and dates. Well guess what,...

CodeSOD: Compiled Correctly

Properly used, version history can easily help you track down and identify the source of a bug. Improperly used, it still can. As previously established, the chief architect Dana works with has some issues with source control. Dana works on a large, complex embedded system. “Suddenly”, her...

CodeSOD: Generically Bad

The first two major releases of the .NET Framework, 1.0 and 1.1 were… not good. It's so long ago now that they're easily forgotten, but it's important to remember that a lot of core language features weren't in the framework until .NET 2.0. Like generics. Generics haven't always been p...

Error'd: An Error Storm of Monstrous Proportions

"Move over NOAA, Google News shows us, unfortunately after the fact that The Daily Beast is the TRUEST hurricane prognosticator," Alejandro D. writes. "Um...So, these are so my car can listen to music, wirelessly, because its mirrors are its...er...ears??" Paul writes. Jyri...

The Windows Update

Every change breaks someones workflow. A few years ago, Ian started at one of the many investment banks based out of London. This particular bank was quite proud of how they integrated “the latest technology” into all their processes, “favoring the bleeding edge,” and “are always focusing on A...

CodeSOD: An Updated Version

Some folks were perplexed by the fact that Microsoft skipped Windows 9 and went straight to Windows 10. The urban legend is that so many old applications checked which version of Windows was running by doing something like version.startsWith("Windows 9") to see if they were on 95 or 98, th...
Related Articles

FarmVille Photo 2018-06-05 19:42

ATTENTION, Farmers! 📢 FarmVille is turning 9 this June 🤗 and you are invited for a month-long celebration! 🎉🤩 Send us your birthday greetings below, and join the "FarmVille Birthday" Farmstand for exciting rewards! 🎊🎁 Use the hashtag #FarmVilleBirthday #FarmVilleTurns9 NOW! ️👨‍🌾9️⃣👩‍🌾 Thanks for being with us throughout these years! 😊 #TuesdayThoughts #FarmVille #Birthday Official and Complete Walkthrough: https://zynga.my/FVFarmVilleBirthdayFarmstand PLAY NOW! https://zynga.my/FarmVille1