13

Because fuck you POLA.

Comments
  • 2
    Oh a javascript joke
  • 8
    But you heard of the octal system, right?
    10 is not equal to 8, there's nothing wrong with the console output.^^
  • 2
    @nitwhiz Yes. I know. It’s called a joke. This is not a Stack Overflow post where I’m asking for help.
  • 1
    @diegovincent but why is `10 == 8 -> false` funny?
  • 0
    @nitwhiz
    And 8 == 010 ?
  • 1
    @osx94 About as funny as
    10 == 012
  • 1
    It's general of programming
  • 1
    I think the funny thing is that 01 = 1 but 010 != 10
  • 3
    It's a programming joke for non-programmers.
  • 3
    Alright then... Seems obvious enough for me. I don't get why octal is weird? Or funny.
  • 1
    @deadPix3l it's the fact that js decided to use octal by adding a 0 to the beginning of the number, which is not very obvious
  • 0
    @bigworld12 JS didn't decide anything, that's the notation for octal values the same as 0x is for hexadecimal.

    That might not be very obvious for someone who is currently learning to code. But the joke isn't about someone learning how to program, it explicitly mentions the Principle Of Least Astonishment. Is it astonishing that decimal 10 is not the same as octal 8? Nope.

    Now, is it astonishing that a coder wouldn't know the notation for octal values?
  • 1
    The amount of ego on this rant is astonishing. I love it.
  • 1
    In other languages the notation usually is more explicit. And for any developer who’s paving its way through the learning process of Javascript this seems extremely non intuitive. Of course when you become a better programmer, jokes related with the strict equality operator or the arrow functions defined in the new versions os Javascript just are... not funny. Same with octal notation. If you and the rest of people do not find it find you just can ignore it and the sorting algorithm of this webpage will make the rest.

    But you don’t have to show how amazing you are at programming and how this jokes are made for human beings with less intelligence than yours. What if this is a beginner’s joke... that means this joke does not belong here?

    Sometimes I’m amazed at how much intelligent some people are in the terms of solving problems and how stupid they are at basic manners. I guess is the anonymous factor plus the logical thinking bias clearly present on programmers
  • 0
    You're just butthurt because your joke fell flat.
  • 1
    @ethernetzero yes, I am. In fact, I wanted to know if I could apologize to you for being such an idiot. Would you please pardon me?
  • 0
    @diegovincent Never!

    Now you must flagellate yourself with a Cat6-o-Nine-Tails Ethernet cable whip.
  • -1
    @diegovincent dude don't take this so serious. There are always these nah-that's-not-funny-people, like me.

    But to get down with some facts.. doesn't like every language teach you 0x for hex and 0 for octal as prefix before they even talk about anything else?
  • 0
    @nitwhiz In Python 3, 011 no longer works and you would use 0o11 instead. Extracted from the first google result of Python Octal Notation. At first it was like JS, then, they changed. Maybe because it wasn’t intuitive, maybe it didn’t follow the POLA principle very good.
  • 1
    Actually I didn't see the jock, but I have learn something with your post 🙂
  • 0
    Hilarious post/comments 😄

    Don’t take it personal and instead see if you can learn something from the comments.

    Especially as a programmer, you’ll meet lots of people how don’t find ‘simple’ or !logical jokes funny..

    TBH I’m one of them..
    A joke has to be really good for me to like it..

    Although.. I’m German, what do I know about humor.. so never mind.
Add Comment