256

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

you are viewing a single comment's thread
view the rest of the comments
[-] scrubbles@poptalk.scrubbles.tech 25 points 7 months ago

All of us fintech devs however, know the true horrors. Make everything a string, lest ye end up in precision hell

[-] flamingo_pinyata@sopuli.xyz 28 points 7 months ago* (last edited 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 1 points 3 weeks 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/

load more comments (2 replies)
load more comments (9 replies)
this post was submitted on 30 Jun 2024
256 points (97.1% liked)

Programmer Humor

32707 readers
35 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS