OR 

Error‘d: The Reason is NULL

Turns out that you shouldn‘t use your edge browser to download Chrome because of potentially malicious links and...null, wrote Allen B. Timothy W. writes, On the surface, it seems that whomever sent this phishing email seemed to know I work in the wardrobe department of a major movie studio. I realized too late that it was just a typo. That big old green check is ...misleading, or was this a successful error? Im in emotional limbo, wrot

favicon of http://thedailywtf.com

CodeSOD: Tryception

If at first you dont succeed, try, try again. We have all encountered situations where we need to attempt an operation, with full knowledge that the operation might very well fail. And if it does, we should retry it. Usually after a delay, usually with a maximum number of retries. Todays anonymous submitter inherited a site-scraping application. Already, were in dangerous territory- site-scraping is inherently fragile, dangerous code. Its more d

favicon of http://thedailywtf.com

CodeSOD: Class Warfare

Setting aside cross-browser quirks, CSS is a fiendishly complicated specification. There‘s a lot to it. From styling rules and how they interact with the DOM hierarchy, to the complexities of using selectors to navigate the DOM- it‘s a complex tool that is also very powerful. I mean, it‘s Turing complete. Shiv works with a self-proclaimed ‘CSS Ninja‘- yes, that was actually in their resume when they got hired. They

favicon of http://thedailywtf.com

Error‘d: Investigation of Satisfaction

There are premium translation services, and then, well, there are the rest, Dave P. writes. More like Mumbo-Jumbo Mail if you ask me, writes Alicia Stefan H. wrote, Green checkmark. Successful completion message. Just...dont look any closer. Paul S. writes, So apparently London is now part of the United States. Must be part of the Brexit deal, right? Well, I guess that Ill be going with a different GUI framework, wrote Lucas L. David B.

favicon of http://thedailywtf.com

CodeSOD: A Swift Update

Banks are uniquely identified via a ‘SWIFT Code‘. It‘s an ISO Standard. Having an accurate SWIFT code for a given bank is of vital importance to anyone doing financial transactions. With mergers, moves, new branches, and so on, the SWIFT codes you do business with won‘t change often, but they will change. Thus, Philip wasn‘t terribly surprised when he got a request to update a pile of SWIFT codes. He couldn‘t

favicon of http://thedailywtf.com

CodeSOD: A Profitable Education

Today‘s anonymous submitter is an experienced Python developer. Their team is significantly less experienced. In the interests of training, someone suggested, ‘Perhaps we should buy books for everyone.‘ Our submitter was handed a stack of possible books, and asked to pick the best one to help the team mature. One book spent some time discussing types, and the conversion between them. By way of example, it provided a handy metho

favicon of http://thedailywtf.com

CodeSOD: A Clever Switch

Todays anonymous submitter has this to say about this code: It works fine, its just... clever. Im not certain about the relative cleverness of this solution, myself. switch (true) { case (d = 15000): m.values[0]++; break; case (d 15000 d = 30000): m.values[1]++; break; case (d 30000 d = 45000): m.values[2]++; break; default: m.values[3]++; break; } This JavaScript lives in a web dashboard for monitoring an internal system

favicon of http://thedailywtf.com

Error‘d: We Need a Windows Install CD in Aisle 7

Encountered this one while attempting to weigh some vegetables and well...the scale crashed? writes Sam. Johnwrote, Should I start binge drinking to fix this number? Someone puked a UI all over my screen. The best part, although the video is buffering where it should be playing, the video behind the text is playing like this is normal. Steven B writes. Wow, Amazon is really angry about my promo code...which is particularly remarkable given

favicon of http://thedailywtf.com

CodeSOD: For a Long While

Here‘s a philosophical question. Let‘s say you‘re searching an array. Is it clearer to use a for loop and break when you find the element, or is it better to use a while loop and break if you hit the end of the array? Most of us would likely use the for loop, but it wouldn‘t be wrong to use the while- maybe just unexpected. But what if you had forgotten that while loops even exist? An anonymous submitter found this, and

favicon of http://thedailywtf.com

CodeSOD: Hitting Your Skill Ceiling

Clia was handed a pile of legacy code and told to upgrade it, but with a very important rule attached: the functionality couldnt change. Any change could break someones workflow, and thus in the upgraded system, even the bugs had to be reproduced. Unlike most legacy code, this wasnt all that old- it was written in C#. Then again, C# is old enough to drive, so maybe it is old. Regardless, C# has utility methods, like, say, a ceil function. At no p

favicon of http://thedailywtf.com

Representative Line: An Equal Crunch

Rina works in an environment which tends to favor crunch. Its a bit of a feast or famine situation, where theyll coast for months on a pretty standard 9-5 schedule, and then bam, suddenly its 18 hours days. No one particularly likes those periods, and code quality takes a nosedive. Co-worker Rusty, though, starts making utterly bizarre decisions when stressed, which is how Rina found this line while doing a code review: int count = stackRepositor

favicon of http://thedailywtf.com

Paper (Size), Please

Terje worked for an IT firm that serviced the purchasing department of a global corporation. To manage purchases, the department used an enterprise shipping and warehousing system that shall be called BLA to protect the guilty. The system ran on a Citrix farm in Norway with all the most impressive resources at its command. Just after a major upgrade of BLA, sporadic performance issues began cropping up in the Brazil and Perth offices. When us

favicon of http://thedailywtf.com

Enterprising Messages

Percys employer is an enterprise vendor. They have a variety of products all within the enterprise space. Like most enterprise products, theyre sold on the strength of the marketing teams ability to claim with a straight face that theyre secure, robust, reliable, and performant. While the company offered a cloud solution for their enterprise suite, the real money was in the on premises version. With on-prem, any updates or upgrades were almost gu

favicon of http://thedailywtf.com

CodeSOD: To Round a Corner

Last week we saw an attempt to reinvent the ceil function. Tina raised a protest: 6 lines to re-implement a ceil function? We can do better. //Rounds to 1000d Superior public int round1000dSup(int value_To_Round) { int finalResult = 0; int resultIntermediate = value_To_Round / 1000; resultIntermediate += 1; int valueRounded = resultIntermediate * 1000; if ((valueRounded - value_To_Round) == 1000) { finalResult = value_

favicon of http://thedailywtf.com

Success Despite Management

In our industry, we all know that managers cause problems when they try to, well, manage. This invariably causes us to get frustrated. Sometimes when we rebel and try to force them to do the right thing, we are the ones that pay for it with our jobs. Sometimes, they get impatient at our mortal lack of Deity-level skills to make the magic happen fast enough for them, and we pay for that with our jobs as well. Occasionally, even though it seems

favicon of http://thedailywtf.com

Error‘d: A Right to Remain Ever Conscious Blooms

Eion R wrote, Sure Google Voce, that is exactly what I was looking for. One might think this game is titled Alpha Blending and the Revenge of Floating Point but its not. Its just broken, writes Ashley A. Bryan S. wrote, I just hope that whoever created this survey doenst work on their online banking app. Now that its the end of the day, Im pretty sure Ive walked some finite, non-negative number of steps, Drew C. writes. Why yes, I am in

favicon of http://thedailywtf.com

CodeSOD: A Tern at the Build Process

Justin Self inherited an internal build tool. Rome may not have been built in a day, but this tool was. It ‘simplifies‘ provisioning development environments, claiming machines in the environment for certain tasks, and so on. (e.BuildStatus == null ? (e.Branch == null ? : ( Branch: {e.BranchUrl}|{e.Branch})) : ( {(e.BuildStatus == Building ? Building : e.BuildStatus == Success ? Built : Build failed)}: {(e.BuildStatus ==

favicon of http://thedailywtf.com