HTML5 showing surprising honesty



  • How often do you read this in a specification?


  • 🚽 Regular

    Its explanation is completely legitimate, though. Reading the rest of that little section, basically what it's saying is "HTML was fucked up as it evolved ad-hoc and chaotically, and we're making efforts to tone down the WTF nature of HTML that had come out of past browser wars and poor attention to standards. Web developers and browsers alike must conform and come to some agreement or else these WTFs will continue"



  • @RHuckster said:

    Its explanation is completely legitimate, though. Reading the rest of that little section, basically what it's saying is "HTML was fucked up as it evolved ad-hoc and chaotically, and we're making efforts to tone down the WTF nature of HTML that had come out of past browser wars and poor attention to standards. Web developers and browsers alike must conform and come to some agreement or else these WTFs will continue"

    The problem with that thinking is that some of the designed parts are actually more fucked up than the ad-hoc parts. Like the specification for determining which mouse button was pressed during an event.


  • 🚽 Regular

    @blakeyrat said:

    Like the specification for determining which mouse button was pressed during an event.
     

    The event object has a button property. Granted it should use constants, but besides that it's no different than C# or Java.



  • @RHuckster said:

    @blakeyrat said:
    Like the specification for determining which mouse button was pressed during an event.
    The event object has a button property. Granted it should use constants, but besides that it's no different than C# or Java.

    It's quite different from C# and (I presume) Java:

    @W3C said:

    During mouse events caused by the depression or release of a mouse button, button is used to indicate which mouse button changed state. The values for button range from zero to indicate the left button of the mouse, one to indicate the middle button if present, and two to indicate the right button. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

    So here's how the W3C defines the button property:

    @W3C said:

    Left = 0
    Middle = 1
    Right = 2

    Here's how Microsoft ad-hoc-ed the same property:

    @Microsoft said:

    None = 0
    Left = 1
    Right = 2
    Left & Right = 3
    Middle = 4
    Left & Middle = 5
    Right & Middle = 6
    Left & Right & Middle = 7

    Tell me: which standard looks like the result of a well-thought-out standards process, and which standard looks like the result of a 3-day cocaine and hot rocks bender?


  • ♿ (Parody)

    @blakeyrat said:

    Tell me: which standard looks like the result of a well-thought-out standards process, and which standard looks like the result of a 3-day cocaine and hot rocks bender?

    I probably would have gone the MS route. The W3C method of sending multiple events seems painful. I wonder what the use case was that drove that.

    But more importantly, are we talking about snorting the hot rocks?



  • @boomzilla said:

    I probably would have gone the MS route. The W3C method of sending multiple events seems painful.

    Ah but that's the crowning achievement: it doesn't send multiple events.

    @boomzilla said:

    But more importantly, are we talking about snorting the hot rocks?

    You grind them up and freebase them.


  • ♿ (Parody)

    @blakeyrat said:

    @boomzilla said:
    I probably would have gone the MS route. The W3C method of sending multiple events seems painful.

    Ah but that's the crowning achievement: it doesn't send multiple events.

    Oh, OK, I guess I was confused about the initMouse thing. So, assuming a browser follows the standard, the events would look like this:

    detailbutton
    Left10
    Middle11
    Right12
    Left + Middle21
    Left + Right22
    Middle + Right23
    Left + Middle + Right33

    Sounds like the sort of thing that someone thought was clever, and then ends up on the front page here.



  • You got it, but there's no spec at all for chording the mouse... so if you get 2 events from a chord, that's just the browser maker being "nice". If you chord for example left and right, which button the browser decides to send to DOM is a crapshoot... it could be always left, it could be the first pressed, it could be always right-- again the spec maker doesn't seem to understand the concept of chording at all.



  • That seems pretty dumb.

    Can you elaborate on chording?



  • @Sutherlands said:

    That seems pretty dumb.

    Can you elaborate on chording?

    Chording = pressing 2 or more buttons at once. Sorry, I should have defined my terms.

    It's generally a bad idea to use chording in your UI, but that doesn't mean the W3C should make it literally impossible to do so.



  • @blakeyrat said:

    @W3C said:
    Left = 0
    Middle = 1
    Right = 2

    @Microsoft said:
    None = 0
    Left = 1
    Right = 2
    Left & Right = 3
    Middle = 4
    Left & Middle = 5
    Right & Middle = 6
    Left & Right & Middle = 7

    What does either of them do with an 11 button mouse?  Admittedly, this question is hypothetical, because I recently broke it, and then found to my dismay that Kensington doesn't make it any more - they now top out at 4 buttons, no scroll wheel.  I guess that's what I get for not buying a new mouse for a decade because the old one was just working...



  • @blakeyrat said:

    Ah but that's the crowning achievement: it doesn't send multiple events.
    Well then, I guess Silverlight's back in business.



  • @tgape said:

    What does either of them do with an 11 button mouse? 
    I hope that's rhetorical.



  • @hoodaticus said:

    @tgape said:
    What does either of them do with an 11 button mouse? 
    I hope that's rhetorical.
     

    They have mice with more than eleven buttons.

    They call them "keypads".



  • @blakeyrat said:

    @RHuckster said:
    @blakeyrat said:
    Like the specification for determining which mouse button was pressed during an event.
    The event object has a button property. Granted it should use constants, but besides that it's no different than C# or Java.

    It's quite different from C# and (I presume) Java:

    @W3C said:

    During mouse events caused by the depression or release of a mouse button, button is used to indicate which mouse button changed state. The values for button range from zero to indicate the left button of the mouse, one to indicate the middle button if present, and two to indicate the right button. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

    So here's how the W3C defines the button property:

    @W3C said:

    Left = 0
    Middle = 1
    Right = 2

    Here's how Microsoft ad-hoc-ed the same property:

    @Microsoft said:

    None = 0
    Left = 1
    Right = 2
    Left & Right = 3
    Middle = 4
    Left & Middle = 5
    Right & Middle = 6
    Left & Right & Middle = 7

    Tell me: which standard looks like the result of a well-thought-out standards process, and which standard looks like the result of a 3-day cocaine and hot rocks bender?

     

    They both seem like poorly though out solutions that require looked back at the documentation every time you want to change something. IMHO a better design would be to use bitmasks with constants for each button.

     

    function recieveButtonEvent (event) {

      if (event.buttons == (LEFT | RIGHT)) alert ('The left and right buttons were both clicked.');

      else if (event.buttons == (MIDDLE | RIGHT)) alert ('The middle and right buttons were both clicked.');

      else if (event.buttons == LEFT) alert ('Only the left button was clicked.')

      else if (event.buttons & MIDDLE) alert ('The middle button was clicked, and possibly some other buttons');

    }

     



  • @TheChewanater said:

    IMHO a better design would be to use bitmasks with constants for each button.

    You may have overlooked the MS way you're quoting above:

    LEFT=1
    RIGHT=2
    MIDDLE=4
    

    There you go, now your code is directly usable in IE.



  •  @da Doctah said:

    @hoodaticus said:

    @tgape said:
    What does either of them do with an 11 button mouse? 
    I hope that's rhetorical.
     

    They have mice with more than eleven buttons.

    They call them "keypads".

    Or they call them the Razer Naga

     



  • @DaarkWing said:

    @da Doctah said:
    @hoodaticus said:
    @tgape said:
    What does either of them do with an 11 button mouse?
    I hope that's rhetorical.
    They have mice with more than eleven buttons.

    They call them "keypads".

    Or they call them the Razer Naga.

    They call me MISTER Tibbs!!



  • @da Doctah said:

    They have mice with more than eleven buttons.

    They call them "keypads".

    Your keypad has xy-coordinates? That's awesome.

    But seriously.. A friend of mine had a keyboard (can't remember the brand) with a scroll-wheel. The best is, the driver software allowed you to configure it for scroll-switching between open windows. Pretty great.

     



  • @PSWorx said:

    How often do you read this in a specification?

    @. said:

    many aspects of HTML appear at first glance to be nonsensical and inconsistent.

    HTML, its supporting DOM APIs, as well as many of its supporting technologies, have been developed over a period of several decades by a wide array of people with different priorities who, in many cases, did not know of each other's existence.

    Features have thus arisen from many sources, and have not always been designed in especially consistent ways. Furthermore, because of the unique characteristics of the Web, implementation bugs have often become de-facto, and now de-jure, standards, as content is often unintentionally written in ways that rely on them before they can be fixed.

    Sounds like a description of 99% of all software.

     

     



  • @DaarkWing said:

     @da Doctah said:

    @hoodaticus said:

    @tgape said:
    What does either of them do with an 11 button mouse? 
    I hope that's rhetorical.
     

    They have mice with more than eleven buttons.

    They call them "keypads".

    Or they call them the Razer Naga

     

     

    Holy Moses, that makes the Nintendo 64 controller look like a paragon of simplicity.  So, how long until somebody rigs that up to dial their phone?



  • @tgape said:

    What does either of them do with an 11 button mouse?
    If, by some [i]miracle[/i], you have a 5-button mouse that doesn't have special-sauce drivers, "X1" means adding 8 to the value, and "X2" means adding 16. Almost all mice with more than three buttons come with special drivers nowadays, though, which entirely replace the press of one of those extra buttons with some other sequence. The browser would have no way of knowing that a mouse button was pressed.



  • @DaarkWing said:

    Or they call them the Razer Naga.
    That only has 17 buttons. Open Office Mouse has 18 of them!



  • @Zecc said:

    A friend of mine had a keyboard (can't remember the brand) with a scroll-wheel. The best is, the driver software allowed you to configure it for scroll-switching between open windows. Pretty great.
    The first mouse with scroll wheel I bought had this as standard functionality while you were holding the side button, and the drivers for Genius mice allowd you to configure this on any of their mice until they completely rewrote the drivers and made them unusable them 5 or 6 years ago. Still, I was able to replicate this functionality with PowerPro, since it feels like I'm missing a limb when I'm on a machine that doesn't support this (I also like being able to scroll the window under mouse pointer without having to focus that window).
    @TwelveBaud said:
    If, by some miracle, you have a 5-button mouse that doesn't have special-sauce drivers, "X1" means adding 8 to the value, and "X2" means adding 16. Almost all mice with more than three buttons come with special drivers nowadays, though, which entirely replace the press of one of those extra buttons with some other sequence. The browser would have no way of knowing that a mouse button was pressed.
    Actually, side buttons (which normally act as back/forward) are seen by applications as buttons 4 and 5 when you're not running any special mouse software (or when that software is configured to treat those buttons as back/forward).



  • @ender said:

    @DaarkWing said:
    Or they call them the Razer Naga.
    That only has 17 buttons. Open Office Mouse has 18 of them!

    Is that really a joystick on the left side?

    TRWTF are console ports which apparently have never heard of thumb buttons. (I'm talking to you, FEAR 2!)



  • @fatbull said:

    TRWTF are console ports which apparently have never heard of thumb buttons. (I'm talking to you, FEAR 2!)

    They ignore thumb buttons on purpose because they're hard to hit. Well, typically.



  • @blakeyrat said:

    They ignore thumb buttons on purpose because they're hard to hit. Well, typically.
    This just means your mouse has them in an inaccessible place (a few Microsoft's mice I tried had them in such places that it'd be better if they didn't bother with side buttons at all).



  • @ender said:

    @blakeyrat said:
    They ignore thumb buttons on purpose because they're hard to hit. Well, typically.
    This just means your mouse has them in an inaccessible place (a few Microsoft's mice I tried had them in such places that it'd be better if they didn't bother with side buttons at all).

    Silly me. When you said "console ports" I assumed you meant a game ported to a console.


  • Garbage Person

    @blakeyrat said:

    Silly me. When you said "console ports" I assumed you meant a game ported to a console.
    I'm not sure when the last time that happenend was. It's ALWAYS the other way around these days - even for 'dual-development' titles, the only machines you'll find in the test lab are xboxes unless it's VERY late in the development cycle.

     

    In modern PC gaming parlance, a console port (more typically 'fucking console port' is a game that fails to conform to any PC interface standards at all - for example not allowing mouse usage in the menus or telling you "DO NOT TURN OFF THE PC WHILE THE GAME IS SAVING"



  • @Weng said:

    In modern PC gaming parlance, a console port (more typically 'fucking console port' is a game that fails to conform to any PC interface standards at all - for example not allowing mouse usage in the menus or telling you "DO NOT TURN OFF THE PC WHILE THE GAME IS SAVING"

    Yeah, but if you're playing it on PC, then it's the PC port of the game, yes? If I was playing Prince of Persia on my Mac SE instead of the Apple ][, I'm playing the Mac port of Lemmings, yes?

    When did this terminology get flip-flopped? Because that's confusing as shit.


  • Garbage Person

    @blakeyrat said:

    When did this terminology get flip-flopped? Because that's confusing as shit.
    When Halo got old enough and started being game journalists. Or Or something. A "console port" is a console game ported to PC. If you're porting the other way, the destination platform is specified ("XBox port" "PS3 port" "Wii port"). "Mac Port" is even correct. To make things even stupider, a game with multiple initial development targets (XBox and PS3) has an XBox and a PS3 port - even if they're the only two targets.

    Yeah, it's stupid and inconsistent, but that's the MO of the entire gamining industry.



  • @Weng said:

    @blakeyrat said:

    When did this terminology get flip-flopped? Because that's confusing as shit.
    When Halo got old enough and started being game journalists. Or Or something. A "console port" is a console game ported to PC. If you're porting the other way, the destination platform is specified ("XBox port" "PS3 port" "Wii port"). "Mac Port" is even correct. To make things even stupider, a game with multiple initial development targets (XBox and PS3) has an XBox and a PS3 port - even if they're the only two targets.

    Yeah, it's stupid and inconsistent, but that's the MO of the entire gamining industry.

    It's not that hard. A port for a platform is a "[platform] port", with the only exception of a PC port which is frequently called "console port" as in "port from console", as in "this game is playable on the PC but designed for consoled". And port can both mean "Version/build for this platform" and its original meaning (a game existing for a platform which is then recoded for another platform)

    Also a port for consoles is usually called exactly that "port to/for consoles", never seen "console port" used as if it was a port for consoles.


  • ♿ (Parody)

    @dtech said:

    It's not that hard. A port for a platform is a "[platform] port", with the only exception of a PC port which is frequently called "console port" as in "port from console", as in "this game is playable on the PC but designed for consoled". And port can both mean "Version/build for this platform" and its original meaning (a game existing for a platform which is then recoded for another platform)

    Also a port for consoles is usually called exactly that "port to/for consoles", never seen "console port" used as if it was a port for consoles.

    </head stops spinning>

    Brian: Excuse me. Are you the Judean People's Front?
    Reg: Fuck off! We're the People's Front of Judea


  • @boomzilla said:

    But more importantly, are we talking about snorting the hot rocks?

    But most importantly, WTF are hot rocks?



  • @Weng said:

    In modern PC gaming parlance, a console port (more typically 'fucking console port' is a game that fails to conform to any PC interface standards at all - for example not allowing mouse usage in the menus or telling you "DO NOT TURN OFF THE PC WHILE THE GAME IS SAVING"

    You mean my tendency to yank the power strip out of the wall as soon as I get remotely bored with a game isn't atypical?



  • @blakeyrat said:

    The problem with that thinking is that some of the designed parts are actually more fucked up than the ad-hoc parts. Like the specification for determining which mouse button was pressed during an event.

    Anything JavaScript-related is totally ad-hoc, because it was first implemented as a browser-specific extension, than another browser added almost-but-not-completely-incompatible version and only than it began to be standardized.



  • @Bulb said:

    @blakeyrat said:
    The problem with that thinking is that some of the designed parts are actually more fucked up than the ad-hoc parts. Like the specification for determining which mouse button was pressed during an event.

    Anything JavaScript-related is totally ad-hoc, because it was first implemented as a browser-specific extension, than another browser added almost-but-not-completely-incompatible version and only than it began to be standardized.

    That's in the DOM spec.


Log in to reply