The Daily WTF

The Daily WTF - 1172

Latest Articles

Error'd: What About the Fish?

"On the one hand, I don't want to know what the fish has to do with Boris Johnson's love life...but on the other hand I have to know!" Mark R. writes. "Not sure if that's a new GDPR rule or the Slack Mailbot's weekend was just that much better then mine," Adam G. writes. Conn...

CodeSOD: A Devil With a Date

Jim was adding a feature to the backend. This feature updated a few fields on an object, and then handed the object off as JSON to the front-end. Adding the feature seemed pretty simple, but when Jim went to check out its behavior in the front-end, he got validation errors. Something in the da...

CodeSOD: A Loop in the String

Robert was browsing through a little JavaScript used at his organization, and found this gem of type conversion. //use only for small numbers function StringToInteger (str) { var int = -1; for (var i=0; i<=100; i++) { if (i+"" == str) { int =...

CodeSOD: Nullable Knowledge

You’ve got a decimal value- maybe. It could be nothing at all, and you need to handle that null gracefully. Fortunately for you, C# has “nullable types”, which make this task easy. Ian P’s co-worker made this straightforward application of nullable types. public static decimal ValidateDecima...

Internship of Things

Mindy was pretty excited to start her internship with Initech's Internet-of-Things division. She'd been hearing at every job fair how IoT was still going to be blowing up in a few years, and how important it would be for her career to have some background in it. It was a pretty standard intern...

Error&#039;d: Intentionally Obtuse

"Normally I do pretty well on the Super Quiz, but then they decided to do it in Latin," writes Mike S. "Uh oh, this month's AWS costs are going to be so much higher than last month's!" Ben H. writes. Amanda C. wrote, "Oh, neat, Azure has some recommendations...wait...no...

CodeSOD: Swimming Downstream

When Java added their streams API, they brought the power and richness of functional programming styles to the JVM, if we ignore all the other non-Java JVM languages that already did this. Snark aside, streams were a great addition to the language, especially if we want to use them absolutel...

CodeSOD: Seven First Dates

Your programming language is PHP, which represents datetimes as milliseconds since the epoch. Your database, on the other hand, represents datetimes as seconds past the epoch. Now, your database driver certainly has methods to handle this, but can you really trust that? Nancy found some ...

CodeSOD: Bunny Bunny

When you deploy any sort of complicated architecture, like microservices, you also end up needing to deploy some way to route messages between all the various bits and bobs in your application. You could build this yourself, but you’ll usually use an off-the-shelf product, like Kafka or Rabb...

CodeSOD: A Truly Painful Exchange

Java has a boolean type, and of course it also has a parseBoolean method, which works about how you'd expect. It's worth noting that a string "true" (ignoring capitalization) is the only thing which is considered true, and all other inputs are false. This does mean that you might n...

Error&#039;d: Choice is but an Illusion

"If you choose not to decide which button to press, you still have made a choice," Rob H. wrote. "If you have a large breed cat, or small dog, the name doesn't matter, it just has to get the job done," writes Bryan. Mike R. wrote, "Thanks Dropbox. Becuase your survey can'...

CodeSOD: Close to the Point

Lena inherited some C++ code which had issues regarding a timeout. While skimming through the code, one block in particular leapt out. This was production code which had been running in this state for some time. if((pFile) && (pFile != (FILE *)(0xcdcdcdcd)...
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