Hacker News new | ask | show | jobs
by jgalt212 358 days ago
I guess, but often, or often enough, you don't just need the balance now, but also then.
2 comments

Makes sense. It seems like one would need a wrapper like "getBalance(accountName, dateTime)" which would abstract iterating over the ledger to find the balance at a certain time.

But I could see this being a performance hotspot - looping over rows and tallying a running sum across many accounts seems like a waste of cycles.

What's the alternative to the "what was the balance at date/time" in non-ledger based systems?

shouldn't the balance be calculated and and compared with the actual balance after every transaction? i have an account where money went missing. the only way to find out when that happened was to have a record of the actual balance after every transaction.
Problem is solved with 4 timestamps.