• Sauron (unregistered)

    User-Agent: TheDailyWTF Browser/Frist

  • (nodebb)
    if (previousComment == 'Failed moderationr')
    {
            $("##accordion").accordion({
                            autoHeight: frist
                    });
    }
    else
    {
            $("##accordion").accordion({
                            autoHeight: secnod
                    });
    }
    

    Addendum 2023-01-30 07:52: Let's hope the moderator makes the same spelling mistake as me.

  • Robin (unregistered)

    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...

  • Drak (unregistered)

    JQuery: trwtf

  • Joh (unregistered)

    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.

    🤷‍♀️

  • (nodebb)

    If Environment.MachineModel = "ENIAC", then set ##organ auto width; else, then set ##organ auto width.

  • (nodebb)

    My browser of choice is a Chrome fork, and I'm running on an M1 Mac, so basically none of those things are true.

    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/

  • speciesUnknown (unregistered)

    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.

  • Ollie Jones (unregistered)

    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.

  • (nodebb) in reply to Joh

    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]

  • Strahd Ivarius (unregistered) in reply to Steve_The_Cynic
    Comment held for moderation.
  • N (unregistered) in reply to Jeremy Pereira
    Comment held for moderation.
  • Old Timer (unregistered)

    " 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.

  • David Mårtensson (unregistered) in reply to Steve_The_Cynic
    Comment held for moderation.

Leave a comment on “Height of the Accordion”

Log In or post as a guest

Replying to comment #:

« Return to Article