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…”

    • flamingo_pinyata@sopuli.xyz
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      7 months ago

      Just reminded me of an argument trying to explain that arithmetic with floating point numbers is not always correct to a coworker who was a mathematician just starting in software dev.

      In a mathematicians mind the fact that an arithmetic operation can produce inaccurate result is just incomprehensible

      • wischi@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        2 days ago

        Floating point numbers and arithmetic is not inaccurate. They are actually very accurate but a lot of developers have inaccurate assumptions about them. They can’t exactly represent base 10 decimals. That’s the only inaccuracy. If you have two floating point numbers and you let’s say add or multiply them the result is always the closest floating point representation of the real result.

        The list of misconceptions wouldn’t reasonably fit in a comment, but if you are really interested and have a few minutes you could give that a read: https://zeta.one/floats-are-not-inaccurate/