16

You can always tell if someone is a programmer by asking them:

Is zero equal to zero or equal to 1?

Non devs say 0, devs say 1

Comments
  • 3
    I just... What?

    Ive been sitting here for a good 5 minutes????
  • 4
    I don't get it..

    (0 === 0 || 0 === 1)
    //true

    even if it was..

    (zero = 0 || zero = 1)
    //zero=0

    Unless your just saying "or" and don't mean it in the sense of an operator.. but still..
  • 7
    And I thought I was a programmer
  • 1
    I say bullshit (just for the lols)
  • 0
    Non devs will say zero is equal to zero.
    Devs will also say zero is equal to zero.
    Why should anyone say zero is equal to 1?
    Look at my name. I must know that ;-)
  • 4
    @DivByZero I didn't think it was that difficult, but apparently I was wrong...

    0 is false, 1 is true, assuming C notatation

    0==0 or 0==1

    is just

    1 or 0

    Which is 1

    So the answer is 1, or true
  • 2
    @brod yeah, and true is 1 in languages like c, which is why they would say 1
  • 1
    @SecondThread oooooohhhhhhhhhhh 😯 I see
  • 2
    @azous my reply to DivByZero explains it, if you don't get it...

    Maybe not as good of a joke as I thought though 😢
  • 0
    I don't get it. Even a non-coder knows nothing isn't the same as one of something.
  • 1
    @SecondThread I got that (true) or (false) = true. But why should a non dev think that (true) or (false) = false? That logic is the same for devs and non devs.
  • 0
    @DivByZero Agreed, even other coders would say 0.
  • 1
    @SecondThread I imagined it the first time, but on some languages true can only be true 😛
  • 0
    Oh man so much assumptions, about operators and integer to boolean binding. For example python has opposite logic. Also some language ad Ruby has two or operators ( literal "or" and "||")
  • 0
    This only has to do with logic. It's not a matter of being a dev or not, it's a matter of correct logical reasoning.

    P = zero is equal to zero
    Q = zero is equal to one
    Thus, the logical fornula would be P or Q. So the proposition is indeed true as one of the operands is true.
Add Comment