3 ms·
I thought the proper way to implement something like this was: - fixed point instead of floating point numbers for currency. - have a journal with transaction
by 29athrowaway 6y ago
I thought the proper way to implement something like this was:
- fixed point instead of floating point numbers for currency.
- have a journal with transactions such as withdrawals and deposits, plus a "checkpoint" at one point in time where you store the computed balance.
e.g.: your balance is = starting balance for today + today withdrawals + today deposits