4 ms·
I worked on a retail pricing system that had a sanity check for prices over 10.000. But once we moved to Japan, that sanity check silently stopped all sorts of
by wodenokoto 3y ago
I worked on a retail pricing system that had a sanity check for prices over 10.000. But once we moved to Japan, that sanity check silently stopped all sorts of items from being processed.
- madsbuch 3y agoThis is a classic localisation issue. When I was younger and worked mostly for Danish companies, we always knew that that a system _could_ be utilised in another locale. as such we always tracked currencies, timezone, etc. Starting to work for American companies all that is out the window. An int with the var name "amount" – of cause that is USD!
- pavel_lishin 3y ago> An int with the var name "amount" – of cause that is USD! Or is it cents? Or fractions of cents? Enjoy digging through the source code and commit history (which may sometimes look like db.prices.old.2022.bak.php) to try and figure out what the answer is! Bonus points if at some point, that changed. Extra bonus points if it didn't change everywhere.
- wodenokoto 3y agoOurs wasn’t called just amount, it was called “amount_usd” and represented the local currency. Fun times!