Little bit of everything!

Avid Swiftie (come join us at !taylorswift@poptalk.scrubbles.tech )

Gaming (Mass Effect, Witcher, and too much Satisfactory)

Sci-fi

I live for 90s TV sitcoms

  • 25 Posts
  • 423 Comments
Joined 1 year ago
cake
Cake day: June 2nd, 2023

help-circle
  • Correct, JSON can handle any precision, because it’s just dumped as a string anyway, just not enclosed in the "". However, as you mentioned, as soon as it comes through the parser it’ll put it into an underlying float value. In C# I create a save high precision attribute that will take the value and put it directly into a decimal. In JS I’m sure there’s some way to do that, but that parser is way less extensible compared to C#. However, this also all assumes you know the client will parse it correctly, overriding the default behavior. Safest is to just send it as a string, and then create your parsers to automatically send to and from strings



  • The fun differences between the perfect world of theoretical and the realistic. Everyone thinks of computers as perfect - but it’s not until you’re asked to solve “How do you store decimals using only 0s and 1s?” does it start to click. Not as easy. It’s why I’m hesitant to hire bootcampers into my roles. Bootcamps are great, and they get more people coding, but you don’t learn that theory behind the scenes - you don’t really know what the computer and operating systems are doing. For 90% of the time it doesn’t matter, it’s abstracted away - but that last 10% man, that can really fuck up an entire system.