959

Me: 1 is something, 0 is nothing, NULL is the absence of things
JuniorDev: wut
Me: You've got pizza in a box, that's 1. If there's no pizza in the box, that's 0. If there's no pizza and no box, that's NULL.
JuniorDev: OOH so there's no object to reference if I ask for a slice!
Me: *small tear*

Always explain things in terms of pizza. Always.

Comments
  • 92
    Nice explanation. Bet a lot of devs, including me, will yearn for a slice after reading your rant.
  • 13
    Thankfully, I just had some pizza.
  • 20
    As someone wanting to get into dev, this is very helpful...now I want pizza 😑
  • 13
    I. Want. Pizza. Now.
  • 3
    so good 😂
  • 3
    @Jumpshot44 You bet I will
  • 4
    I'm hungry and that didn't help hahahah
  • 3
    Pretty much sums up what's wrong in NULL.
  • 10
    i came for rant and ended up ordering 🍕
  • 5
    read this while starving. it didn't help.
  • 2
    wtf it really worked, I got hungry as well and we are ordering pizza just right now 😄
  • 1
    This is brilliant! Particularly given that this is a concept that many fail to grasp, I think you've just cracked the best possible way of explaining it ever :D
  • 2
    Why have you made me want pizza!!
  • 5
    If you have never ordered a pizza, that's undefined 😅
  • 4
  • 2
    @undefined what kind of sorcerer are you? 😱
  • 1
    @molynerd Thanks for your useful rant!! Can you please add what is undefined? I was asked the difference between NULL and undefined recently in a interview..
  • 1
    Jst ordered pizza🍕😜
  • 1
    My little ceasers vision is activating!
  • 3
    @prashanth that would be "if we've decided to get food, but haven't chosen the kind, it's undefined"
  • 4
    🍕🍕🍕🍕🍕🍕🍕🍕🍕🍕🍕🍕
  • 0
    What if there’s a pizza and no box?
  • 1
    @imaduck Then you'll get a nullref exception if you try to put the pizza in the box?!
  • 0
    And undefined is like as if pizza was never invented? Or something
  • 0
    It's not entirely correct anyway. There are five kinds of null: TBA, N/A, DNC, UNK and 0.

    Nulls are metavalues.

    TBA (to be advised) we don't currently know but we do know that we will know.
    N/A (not applicable) field is meaningless in this context.
    DNC (do not care) user chose not to provide this information.
    UNK (unknown) we don't know and we don't even know why we don't know, whether we might eventually know or even whether there's anything _to_ know.
    I argue that 0 (zero) is a null because in addition to 0 bananas on my desk there is an infinity of other things present on my desk in 0 quantity. It's a metavalue indicating absence and it usually has contextually implied type.
Add Comment