- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
This made me smile. I also saw this kind of SQL craftsmanship back in the early 2000s.
Admin
Hacking the Delphi linker to handle .... yeah ... NO.
Admin
That sounds like a recipe for SQL injection.
Admin
I was trying to reference an existing comment and mangle its text by substituting certain characters, but couldn't because they were all held for moderation.
Admin
I got a similar one when adding translations to our software.
Someone had the great idea to link all the buttons (about 50 of them) to one function that parses the clicked button text to determine the action to do.
Guess what happen when you change the text on the buttons to have them in an other language...
Admin
TRWTF is to assume that a public method, the Getter function, is only used for debugging, and not follow up to see where it's called. Especially in legacy code, that's a recipe for disaster.
Admin
Assuming that a getter is only used for debugging is a recipe for trouble, but the article's sort of mangling is not the kind of trouble that you'd normally expect.
Admin
This reminds me of a JSON storage engine I wrote for an embedded platform. To save space, if you tried to store a string value, it would search the ROM to see if there was a sequence of bytes that matched the string, and used that instead.
It made sense seeing as the JSON was often storing an option by name represented as a string, and so the string to compare the name of the option had to be somewhere in the ROM anyway.
Admin
"Hacking the Delphi linker to handle .... yeah ... NO."
In all my years of using Delphi, both professionally and for my own personal projects, I have never had to do this. I would say that this is a huge red flag for a mountain of bad code. The article seems to confirm this.
Admin
So... they gave her bottle of wine to reward her for horrible behavior. Bad code aside, if you have any kind of mature process you don't just go about changing things unrelated to your task, and do so without a care for understanding how the code works and not even testing your change before committing.
Admin
I mean, with a CI process and presumably the fact that she's working on an isolated branch, the "failure to test before committing" is a very mild grievance. And more to the point, it's a common thing to carefully cleanup formatting in older code- I'm a big fan of "leave the code better than you found it". If you have a cheap and easy opportunity to pay down some technical debt, pay it!
Admin
Does Anyone remember an article from years ago, about a PHD hire who wrote a proof that his code would work, but when his code, failed, he said it was the softwares fault?
Or, does anyone have a good way of being able to search random articles from years ago?
Admin
Bad code is never "aside"
Admin
Yes, I have a way to search for that:
https://thedailywtf.com/articles/classic-wtf-the-proven-fix
Admin
https://thedailywtf.com/articles/The-Proven-Fix
I used a newfangled thing whose name looks like a mispronunciation of "googol".
Admin
The software we use could have this problem. Could. It allows not only to parse the keyboard button's text, but access the keycode directly as well. I learned about text parsing after using the keycodes for years, and then been scratching my head for months trying to understand why anyone would use something so unreliable (for starters, everyone constanly forgets to switch their keyboard locale).
Admin
thank you for sharing the information though this blog
Admin
The fact you mention switching locales implies you seem to work in a multilingual environment, which puts you way ahead of the curve to handle i18n.
More than once I had the unfortune to have to explain to coworkers why writing 'append "s" if n > 1' is a terrible way to handle pluralization, for example.
Admin
Years ago I broke some APL by adding a comment. Comments should not break code, but I added it after a label and then found a goto '→ Label + 2'. APL is very line oriented, comments count as lines.
That was when I learned that just because you can do something does not mean that you should do it. Somebody thought to save a label.
Admin
I wouldn't call it multilingual - we all use Russian, but for scientific and programming stuff we have to rely on English.
"Append 's'" - yikes.
Admin
The software we use could have this problem. Could. It allows not only to parse the keyboard button's text, but access the keycode directly as well. I learned about text parsing after using the keycodes for years, and then been scratching my head for months trying to understand why anyone would use something so unreliable (for starters, everyone constanly forgets to switch their keyboard locale) Seo
Admin
The software we use could have this problem. Could. It allows not only to parse the keyboard button's text, but access the keycode directly as well. I learned about text parsing after using the keycodes for years, and then been scratching my head for months trying to understand why anyone would use something so unreliable (for starters, everyone constanly forgets to switch their keyboard locale) Seo
Admin
"Bad code aside, if you have any kind of mature process you don't just go about changing things unrelated to your task"
Based on the article, it was kinda bad code. Also, there's the Boy Scout Rule.
Admin
This is one of those obvious bot spam comments, where they just say some generic thing that you could say about a lot of blogs (so there's no evidence they actually read the blog), and then post a link... how did this pass moderation?! (and before you say the captcha on the comment form means it can't be a bot, consider that there are APIs that bots can use to hire people to solve captchas)