• RFoxmich (unregistered)

    Asus Cheap computers...cheaper code.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered)

    Defaults? Defaults? We don't need no defaults!

    We don't need no steenking defaults!

  • The MAZZTer (cs)

    Am I the first to notice that both branches of the if statement do the exact same thing?

    Also I stumbled across something similar on a website recently. Its JavaScript was set to "strict mode" which meant more stringent parsing rules and from a developer standpoint, it keeps you from making some common dumb mistakes.

    Good, right?

    Well, their script didn't pass the strict mode parsing checks and refused to run!

    So the only browser that worked properly with the site was the only one that doesn't support strict mode at all and so would not implement the extra checks... Internet Explorer 9 and lower. I wonder if they'll figure it out once IE10 is released, as it has support...

  • Daniel (unregistered)

    Who would ever want to surf the web with a non-Windows-and-non-Mac Computer? That is unthinkable.

  • KentGeek (unregistered)

    This would be hilarious in 2005. In 2013, it's sad. It appears not to work at all on Chrome on Windows (not surprising, based on that Javascript).

  • Pizuzzled (unregistered)

    Anyone else wondering how they got 38 lines out of that source?

  • noland (unregistered)

    I also like how it's all put inside a closure but all entities are still is populating the global object. (And since it doesn't declare any vars, it also throws an error at the if-clause, aside from not providing a default branch.) Just: wow!

  • Dirktooth (unregistered)

    Wow... that's... yikes. I don't even... I think I may need to go lie down.

    You could seriously reduce this bosh'tet to a single line. A non-javaScript line, even.

  • Bob (unregistered)

    The real wtf is that lack of line-wrap...

  • Kushan (cs) in reply to KentGeek
    KentGeek:
    This would be hilarious in 2005. In 2013, it's sad. It appears not to work at all on Chrome on Windows (not surprising, based on that Javascript).

    Working just fine on Chrome/Windows 7 here?

  • Andy (unregistered)

    First rule of browser sniffing: Don't do it.

    Second rule of browser sniffing (only for experts): Don't do it.

    Last rule of browser sniffing: Use an existing library and provide a sane default.

    ~Andy

  • Kushan (cs)

    Proof here, if Aksimet will actually let me post it: http://imgur.com/rbv0b0e

  • n/a (unregistered)

    Well, it is a Win8 gadget. They really intend to keep desktop Linux/BSD users from being their customers, as is apparent here.

  • Friendly Neighborhood Lurker-Man (unregistered) in reply to Kushan
    Comment held for moderation.
  • JC (unregistered)

    Q: How many web developers does it take to change a lightbulb

    A: jQuery!

  • RaceProUK (cs) in reply to Andy
    Andy:
    First rule of browser sniffing: Don't do it.

    Second rule of browser sniffing (only for experts): Don't do it.

    Last rule of browser sniffing: Use an existing library and provide a sane default.

    ~Andy

    Almost. I'd go for the following:

    First rule of browser sniffing: Don't do it. Second rule of browser sniffing: Seriously, don't do it. Third rule of browser sniffing: If you do it, I will remove your reproductive organs slowly with a cheese grater.

  • Captcha:sagaciter (unregistered) in reply to n/a
    n/a:
    Well, it is a Win8 gadget. They really intend to keep desktop Linux/BSD users from being their customers, as is apparent here.
    Now that you mention "gadget", the "Desktop gadget" for Asus WebStorage's shitty "note sync" service doesn't work unless your locale is set to English or Korean. I'd report it to them but I'm scared of having to navigate their their broken websites in broken English.

    Plus, it's not like fixing that particular bug would make Webstorage not be a piece of complete garbage (though I'd consider using it for backups if they gave me at least 50GB free).

    Sorry I'm just a bit angry because I have an Asus laptop filled with Asus software and it's all complete shit.

  • Junior (unregistered) in reply to RaceProUK

    ...ouch. That seemed to wake me up better than coffee.

  • mrfr0g (unregistered) in reply to RaceProUK

    First, Second, Third rule of browser sniffing: Don't do it unless you are fixing a browser specific bug, see IE6-10.

  • Christoph Wagner (unregistered) in reply to RaceProUK

    Why would it be a bad idea to sniff out browsers (or rather sniff supported features depending on your definition of browser sniffing) to provide additional features to the User?

  • ASUS layout test (unregistered)

    ...is the name of their feedback form and there is a field named "Sublect".

    Its all perfect engrish.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered) in reply to Christoph Wagner
    Christoph Wagner:
    Why would it be a bad idea to sniff out browsers (or rather sniff supported features depending on your definition of browser sniffing) to provide additional features to the User?
    Because inevitably (as seen here), some Paula will come along and use it in a way that breaks non-additional features?
  • Afonso Loureiro (unregistered)

    I just died a little inside...

  • PedanticCurmudgeon (cs) in reply to Christoph Wagner
    Christoph Wagner:
    Why would it be a bad idea to sniff out browsers (or rather sniff supported features depending on your definition of browser sniffing) to provide additional features to the User?
    1/10 would not flame with someone else's keyboard
  • The Betpet (unregistered) in reply to n/a

    LOL! All that and it's just to append the same text into the head of the page! Well done on that one.

  • urza9814 (unregistered) in reply to Christoph Wagner

    Sniffing features is a good thing. Sniffing browsers is not.

  • Sutherlands (unregistered) in reply to RaceProUK
    RaceProUK:
    Andy:
    First rule of browser sniffing: Don't do it.

    Second rule of browser sniffing (only for experts): Don't do it.

    Last rule of browser sniffing: Use an existing library and provide a sane default.

    ~Andy

    Almost. I'd go for the following:

    First rule of browser sniffing: Don't do it. Second rule of browser sniffing: Seriously, don't do it. Third rule of browser sniffing: If you do it, I will remove your reproductive organs slowly with a cheese grater.

    I don't understand how these made it to featured comments. If all browsers worked the exact same way then it might be logical; but with the difference in each of the browsers, you pretty much HAVE to use browser sniffing if you want your website to display correctly. Or do all of your clients say "It doesn't work in this place in IE6-8, and doesn't work in Firefox on this other page? That's ok. It basically works."
  • Mcoder (cs) in reply to Christoph Wagner
    Christoph Wagner:
    Why would it be a bad idea to sniff out browsers (or rather sniff supported features depending on your definition of browser sniffing) to provide additional features to the User?

    Because there are hndreds of other browsers that can run your extra feature, but you didn't heard about. (Some of them because they just don't exist yet, but they'll exist in the future, become very popular, and you won't rewrite your tests.)

    You can verify if any browser feature is available with Javascript. No need to identify the browser.

  • Arghhhhh (unregistered)

    So much work just to include the same stylesheet

  • Ralph (unregistered)
    Creating websites so that they work on all browsers and platforms for all vendors is
    (ftfy) drop dead easy if you simply relax your deathgrip, follow the standards, and let the browser handle laying out the page!

    The point is to make websites that work.

    NOT to make them "display the same" on every computer. That is impossible. The sooner you get that through your rat turd infested brain the better. Other people don't have your computer. Their computer will be different, so things will look different. That's how it is. You can't do anything about it. No, you can not. That isn't possible. I don't care how hard you wish. Tough. It isn't your computer, it's theirs. They will control how it looks. You won't. Because you can't. So stop fucking trying already before I have to come over there and break my cluebat over your fingers! I mean it! Stop!!!

  • F (unregistered) in reply to Mcoder
    Mcoder:
    Christoph Wagner:
    Why would it be a bad idea to sniff out browsers (or rather sniff supported features depending on your definition of browser sniffing) to provide additional features to the User?

    Because there are hndreds of other browsers that can run your extra feature, but you didn't heard about. (Some of them because they just don't exist yet, but they'll exist in the future, become very popular, and you won't rewrite your tests.)

    You can verify if any browser feature is available with Javascript. No need to identify the browser.

    You can indeed, but "available" is not the same thing as "working", except with every browser made by anyone other than Microsoft.

  • F (unregistered) in reply to Ralph
    Ralph:
    Creating websites so that they work on all browsers and platforms for all vendors is
    (ftfy) drop dead easy if you simply relax your deathgrip, follow the standards, and let the browser handle laying out the page!

    The point is to make websites that work.

    NOT to make them "display the same" on every computer. That is impossible. The sooner you get that through your rat turd infested brain the better. Other people don't have your computer. Their computer will be different, so things will look different. That's how it is. You can't do anything about it. No, you can not. That isn't possible. I don't care how hard you wish. Tough. It isn't your computer, it's theirs. They will control how it looks. You won't. Because you can't. So stop fucking trying already before I have to come over there and break my cluebat over your fingers! I mean it! Stop!!!

    But the all-powerful Marketing Department insist on it. Impossibility is not an acceptable reason for not doing what they say.

  • esoterik (cs) in reply to Captcha:sagaciter
    Captcha:sagaciter:
    ... Sorry I'm just a bit angry because I have an Asus laptop filled with Asus software and it's all complete shit.
    I had an Asus netbook, i think i booted the default software once, just as a smoke test after unboxing. The first thing i actually did with it was wipe the disks and install ubuntu.
  • Ken (unregistered) in reply to F
    F:
    But the all-powerful Marketing Department insist on it. Impossibility is not an acceptable reason for not doing what they say.
    This is why we have to lock the Marketing Department and the Consumer Sheep into their own separate network. Let's call it a walled garden of iShit and spamDroids. Arrange so that all devices and all information belong to the corporates, and the users have no control of their stuff or their data.

    Then, we build a separate network for nerds only. It has to be hard to use -- hard to connect, hard to configure, hard to navigate. Hard enough that the marketdroids, bleeding heart nincompoops, politicians and whatnot can never see what's there.

    Only then can we have our freedoms back. We can do it. We did it the first time. Our only mistake was inviting the gutter snipes to come play in our kingdom.

  • esoterik (cs) in reply to Sutherlands
    Sutherlands:
    I don't understand how these made it to featured comments. If all browsers worked the exact same way then it might be logical; but with the difference in each of the browsers, you pretty much HAVE to use browser sniffing if you want your website to display correctly. Or do all of your clients say "It doesn't work in this place in IE6-8, and doesn't work in Firefox on this other page? That's ok. It basically works."
    TRWTF is HTML was never intended to display the EXACT same on all platforms, thats what PDF was intended to do. HTML was only intended to define the structure and content of a document, it was intended be rendered in a myriad of ways, for example in a text-mode browser, or magnified up to 72 pt so grandma can read it.
  • Spudley (unregistered) in reply to JC
    JC:
    Q: How many web developers does it take to change a lightbulb

    A: jQuery!

    Heh. That's the thing that really made me want to cry over this one - they're using jQuery, and yet feel the need for browser sniffling.

    But even beyond that, the real irony is that even if they did need to sniff the browser, jQuery has a browser sniffer already included. (okay, granted, it's deprecated and was never a good idea from the begining, but all the same, it would have been better than what they've got)

    There are so many lovely WTFs here, it's hard to pick my favourite.

    • I quite like the if() blocks that have no code in them.

    • And of course the if() block that does the same thing in the else condition.

    • And the way it uses global variables is too just funny.

    • But I think my favourite bit is the comments that state the obvious. Always a sign of a really poor developer who thinks he's the bee's knees.

    Hehehe. I love it.

  • ahhhhh (unregistered) in reply to RaceProUK
    RaceProUK:
    Andy:
    First rule of browser sniffing: Don't do it.

    Second rule of browser sniffing (only for experts): Don't do it.

    Last rule of browser sniffing: Use an existing library and provide a sane default.

    ~Andy

    Almost. I'd go for the following:

    First rule of browser sniffing: Don't do it. Second rule of browser sniffing: Seriously, don't do it. Third rule of browser sniffing: If you do it, I will remove your reproductive organs slowly with a cheese grater.

    If you want to do moderately fancy visuals or do cross domain ajax and support IE you have to. If you want to know ahead of time if your video element will respond to "play" or silently ignore it you have to. I pushed for a long time to never do it on my current project... but at the end of the day you just can't get around it sometimes because browser vendors still don't really have their **** together.
  • Chris (unregistered) in reply to RaceProUK

    You say that, but I had to remove SSL 2.0/3.0 support from one of our webservers last week to pass PCI compliance scanning. IE 6/7 break with the worst error page in this case, so if you hit our http redirect we're going to check your browser. (And tell you to get IE8 or something else for crying out loud)

    Two wrongs, they make a right!

  • Masaaki (unregistered)

    Well beyond that stupid bit of code, it's also the slowest website I have ever seen - seriously? I have to load every goddamn time I scroll? No thank you!

  • Matthijs (unregistered) in reply to Ralph
    Ralph:
    The point is to make websites that work.

    NOT to make them "display the same" on every computer. That is impossible.

    How is your little spot of paradise, anyway?

    Because let me tell you, here in the actual real world, sometimes you don't just make websites for yourself, but for the people that in the end pay your salary. And those people will want a website that looks as near the same as possible on all major browsers. And if that browser-list is somewhat limited (to, for example, IE8-10, Chrome, Firefox and Safari), that is very much a possibility.

    It may be difficult, and you will have to tell your client that that the feature he wants will take a lot of time (and thus: money) to implement exactly the same, but it is always possible; worst case scenario involves the true WTF's, like pre-rendered images, flash, and absolute positioning on everything. Just recall the crazy loops we'd have to jump through, not that long ago, to make stuff like nicely rounded corners and drop-shadows.

    Now, in that same real world only some of us apparently inhabit, you also may at times inform your client that, yes, you can add support for the 0.01% of users who do not use one of the covered browsers, but it will cost money. To which those clients tend to reply: "well, bugger them then". In this case, they should of course have added a fall-back, even if it did not work very well, but if you're not part of their target audience, they simply do not care, and most definitely will not pay you for adding support either. So you don't.

    As for feature sniffing: that only gets you so far. Again, in magical unicorn land, all browsers that implement a feature do so in exactly the same way and to the same degree. In my harsh cruel reality, there's stuff like a date/time input element which may be supported but not work (thank you, Chrome). There are features like file-access api's that work, right up to the point where they crash (thanks, IE10). And don't even get me started on styling features that are supported in all browsers but simply implemented slightly different, so that your nicely supported feature will yield ever so subtly different results depending on which browser executes it.

    Now I do not condone browser / OS sniffing, for obvious reasons; but sometimes it is unavoidable to comply with what you client wants.

  • chubertdev (cs)

    Browser sniffing: it literally is a code smell.

  • TheLazyHase (cs) in reply to RaceProUK
    RaceProUK:
    Third rule of browser sniffing: If you do it, I will remove your reproductive organs slowly with a cheese grater.

    I try to visualize what happen if a women do browser sniffing.

    It look like something that come from Japan.

  • vt_mruhlin (unregistered)

    There are legitimate use cases for browser sniffing, but this is not one of them.

  • NH (unregistered) in reply to RaceProUK

    I only sniff browser for statistical reasons - to check what people actually are using and to try to test the web pages with the most common alternatives for the moment.

    And most of the special handling is actually for IE while other browsers seems to accept standard pretty well.

  • Jazz (unregistered) in reply to Captcha:sagaciter
    Captcha:sagaciter:
    Sorry I'm just a bit angry because I have an Asus laptop filled with Asus software and it's all complete shit.

    So you're angry because you decided to spend your own money on some stuff you didn't want?

    I... I don't think anyone else can help you with that problem.

  • Coyne (cs) in reply to n/a
    n/a:
    Well, it is a Win8 gadget. They really intend to keep desktop Linux/BSD users from being their customers, as is apparent here.

    Yeah and whatever happened to he "interwebs are like roads" motif?

    "Our car works everywhere except Montana and Wyoming; we don't like those states."

    "You can only drive on toll roads that are owned by General Motors."

    "Well, it might drive on California roads; but that's a liberal state and so we can't provide any guarantee."

    "That car you bought from us last month? It's no longer supported on your town's roads. Refund? Ha ha ha ha..."

    Seriously, it's time for some kickback. Site uses Flash? Tell them to change to HTML 5. Site uses QuickTime? Same thing. Site can't do decent defaults for an unknown browser? Don't visit. Browser doesn't handle a lot of sites? Download another one.

    I am seriously tired of "feudal web".

  • ahhhhh (unregistered) in reply to NH
    NH:
    I only sniff browser for statistical reasons - to check what people actually are using and to try to test the web pages with the most common alternatives for the moment.

    And most of the special handling is actually for IE while other browsers seems to accept standard pretty well.

    For the most part that's true, but I've seen Chrome blue screen on css3 filter effects that Safari and iOS Safari happily render.
  • Matt Westwood (cs) in reply to n/a
    n/a:
    Well, it is a Win8 gadget. They really intend to keep desktop Linux/BSD users from being their customers, as is apparent here.

    "Oh dear! My computer doesn't work on this website! I'm going to have to go out and buy a new computer which does!"

  • Jimmy (unregistered)

    Is this that old that Chrome wasn't around or.....OH

  • O'Shea (unregistered) in reply to Kushan
    Comment held for moderation.

Leave a comment on “Website WTF - Asus Transformer Book”

Log In or post as a guest

Replying to comment #:

« Return to Article