Meme transcription:

Panel 1: Bilbo Baggins ponders, “After all… why should I care about the difference between int and String?

Panel 2: Bilbo Baggins is revealed to be an API developer. He continues, “JSON is always String, anyways…”

    • bleistift2@sopuli.xyzOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 days ago

      I’m not sure if you’re getting it, so I’ll explain just in case.

      In computer science a few conventions have emerged on how numbers should be interpreted, depending on how they start:

      • decimal (the usual system with digits from 0 to 9): no prefix
      • binary (digits 0 and 1): prefix 0b, so 0b1001110
      • octal (digits 0 through 7): prefix 0, so 0116
      • hexadecimal (digits 0 through 9 and then A through E): prefix 0x, so 0x8E

      If your zip code starts with 9, it won’t be interpreted as octal. You’re fine.

      • xthexder@l.sw0.com
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        3 days ago

        Well, you’re right. I wasn’t getting it, but I’ve also never seen any piece of software that would treat a single leading zero as octal. That’s just a recipe for disaster, and it should use 0o116 to be unambiguous

        (I am a software engineer, but was assuming you meant it was hardcoded to parse as octal, not some weird auto-detect)