- 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
User-Agent: TheDailyWTF Browser/Frist
Admin
Addendum 2023-01-30 07:52: Let's hope the moderator makes the same spelling mistake as me.
Admin
The bigger mystery here is, what on Earth is with that CSS selector? Does the accordion have
id="#accordion"
perhaps? That would be weird and confusing but it's the only explanation I can think of...Admin
JQuery: trwtf
Admin
So in summary, is the WTF: "legacy code exists"? Or maybe it is: "legacy code was altered in a non-optimal way"?
If that's the bar we're setting here, I hate to break it to you but you'll find that in most codebases you look at. Here, it's fairly harmless (as opposed to, say, busy-waiting)... heck, maybe a nice optimising compiler can even throw the second body away if it recognizes that the instruction stream is the same.
🤷♀️
Admin
If Environment.MachineModel = "ENIAC", then set ##organ auto width; else, then set ##organ auto width.
Admin
No, the first part is true. All browsers are Mozilla. (There's something that I don't remember what it is(1) that breaks if your browser doesn't claim to be "I'm Mozilla, but really these other things.")
(1) It might even be irrelevant today, but the sorry tale can be found at https://webaim.org/blog/user-agent-string-history/
Admin
We will probably never escape from browser sniffing.
On one hand, we have the drive to get rid of it so we can write only one set of code, and enable or disable functionality depending on whether a browser has a feature.
On the other, we have browser vendors intentionally making their browsers behave differently to each other, to the point that a boolean flag "Yes, feature X exists" doesn't tell us anything
I would bet good money on browser sniffing still being practiced 10 years from now.
Admin
It's possible the Redmond Middle School Science Projects (Internet Explorer and old Edge) are the biggest WTFs to date in web technology.
I've wasted countless hours, and QA teams I've worked with have wasted uncountable hours, trying to make things compatible with those abominations. All in the name of Ballmer-era browser lock-in.
It's good they're in the dustbin of history where they belong. It was a very smart move, for devs anyway, for Microsoft to start working with Chromium.
Admin
Joh - completely agree with your first paragraph "legacy code exists" and gets this type of bit-rot. Normal every day occurance...
BUT I disagree with the premise of the second part.... Even if the compiler eliminates the redundancy, there is still the human cognitive load every time the code base is looked at... and this is the real WTF [it is worse than failure, because of $$$ - and raisins]
Admin
" specifically because the JQuery UI developers are doing the hard work of managing browser compatibility for you"
That is, specifically because the jQuery Ui developers are doing the hard work of making sure that old browsers show a blank page or an error message.