this post was submitted on 26 Jul 2025
139 points (97.9% liked)

Software Gore

1181 readers
1 users here now

A community for posting software malfunctions

Deliberately bad software or bad design is not software gore, it must be something unintentional

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient and shear it



founded 2 years ago
MODERATORS
top 20 comments
sorted by: hot top controversial new old
[–] xia@lemmy.sdf.org 29 points 6 days ago (2 children)

Repeat after me: "Don't use floating-point numbers for currency values."

[–] swab148@lemmy.dbzer0.com 8 points 6 days ago (1 children)

I still wanna see someone get naneinf money in Balatro

[–] SuperSpruce@lemmy.zip 4 points 5 days ago

With the cryptid mod you probably can

[–] hperrin@lemmy.ca 3 points 6 days ago

Instead, use arrays.

int[] total = […itemsPriceArrays.flatten()];
[–] Etterra@discuss.online 4 points 5 days ago

Remember to take your payout in the form of cash.

[–] scrubbles@poptalk.scrubbles.tech 30 points 1 week ago* (last edited 1 week ago) (2 children)

Finance developers know the hell that is money and precision. I've worked fintech for years and god, so many gotchas.

I got a tech screen for a company that was brilliant. The question was "take these transactions (from a file) and add them to a database.

To any decent engineer they would see that and say "sure thing! Easy let's do it!"

To me, a senior fintech engineer though I was like "oh dear God, let's see if we can even get a quarter of this done"

(For those who have not gone through the trial by fire that is handling money in professional code, you've been warned, I'll leave just the few off the top of my head in spoilers below.)

gotchas from that problem

  • What currency are the transactions in?
  • are all of the transactions in the same currency?
  • will I need to support currencies with other precision's? (3, 4, 0 decimal places? More?)
  • do we accept transactions that are not precise to their currency? (If they say $4 is that valid? Or is that an error because they should have sent $4.00)
  • what currencies do we accept? Can we accept every currency, or do we have a list of acceptable currencies?
  • if we accept multiple currencies do we accept the money into an account or do we need to exchange it?
  • how do I validate that the transaction accounts are valid?
  • what if one transaction is invalid? Do we still accept the rest of the file? Should we reject the entire file in case their system is wrong?
  • which parser are we using? Is it precise? (Most parsers parse through float or double to get into the language, and are not precise)

Money is not easy friends

[–] Rozz@lemmy.sdf.org 6 points 6 days ago

As a UX designer I totally believe all of that. I've seen that in other industries.

[–] aeronmelon@lemmy.world 11 points 1 week ago (2 children)

Technically correct, that is beneath the total.

[–] finitebanjo@lemmy.world 3 points 6 days ago

If the Subtotal is -7e43 and the Total is 283.96 doesn't that mean anon's flight cost 7e43 + 283.96? Honestly, one hell of a discount.

[–] Zachariah@lemmy.world 2 points 1 week ago

No, it totally dominates the total.