Live data from Hacker News

Spanish traders set the standard for GnuCash database design

handson.money

71–80 of 85 posts

Re: Spanish traders set the standard for GnuCash database design

#72
post #65

Reminds me a bit of how in the UK the guinea coin ceased to circulate decades ago but it's still used for bidding on racehorse auctions. 1 guinea = 1.05 pounds You purchase the horse in guineas, seller gets paid in pounds, auctioneer keeps the missing 5% as commission.

That's fascinating, I remember my Dad telling me you would pay for something in guineas as a sort of tip, but I never knew it was for horses (this is in Australia).

Re: Spanish traders set the standard for GnuCash database design

#73
post #35

Earlier quoted context omitted.

> I wish banks have their APIs open There needs to be a lot of investment in training and safe defaults though. Most people are not ready to automate even a little of their banking like that. I would even prefer banks had the option to push data to trusted feeds than having open APIs you could call on your own.

Only need a read only API for financial analysis. I definitely do not support an API for doing financial transactions. That will result in so much hacking and theft.

Yup or restrict API usage to trusted providers. In Brazil, we have a system called Open Finance [1] which allows you to connect bank account, so you can see investments, money spent, credit card spending and limit, etc. from your other bank accounts. Some local personal finance systems integrate into Open Finance to pull all of this data for you.

[1]: https://openfinancebrasil.org.br/

Re: Spanish traders set the standard for GnuCash database design

#74

Earlier quoted context omitted.

I seem to remember that we were aware that fractional commodities were going away, but exact rational values would still be important to be able to represent historical holdings and transactions.

In hindsight do you think it was an right decision or too "pure"?

I guess I don't really have an opinion about that. Certainly an exact representation of decimal numbers was essential, and was something we needed to implement at the time, but going to a fully rational numeric stack was arguably overkill.

The current value of held assets in another currency isn't really "counting" any more, it's a prediction of the outcome of some future transaction that hasn't happened. So I'm less concerned about exactly computing it than I am in never making a mistake in assets that I am counting, i.e. keeping in one account and only incrementing and decrementing the amount when a transaction occurs.

Re: Spanish traders set the standard for GnuCash database design

#75
post #66

I would like to use finance tracking products like GNUCash. But I don't have the patience to download the csv for half a dozen accounts every month (Products like plaid are a no go from a basic security perspective). I am in Canada, and there seems to be no hope that I will have API access to my bank accounts anytime soon. Also, did I mention how much it annoys me that the transaction description differs between the…

Import-only is the lazy way. :) If you want, GnuCash also has features to support manually entering each transaction as it occurs . Then GnuCash has features to match up financial institutions data exports against your transaction splits, see the discrepancies, and then reconcile against their PDF statements. It's a way of life, but you always know what money you have, where. Although that sounds like something for w…

When I was a poor student, I carried around a small notepad in my pocket and a pencil and wrote down every transaction. Only way I ensured discipline to not waste money and then go hungry later.

But now I am ruined by smartphones, which are way too slow to type in every transaction manually.

Re: Spanish traders set the standard for GnuCash database design

#76

Side question: I'm surprised by the explanation of the 8 in the "real de a a ocho" because " traders counted gold doubloons on their fingers, skipping their thumbs. " (and the link to investopedia has a similar explanation). But from https://en.wikipedia.org/wiki/Doubloon > Spanish American gold coins were minted in one-half, one, two, four, and eight escudo denominations, with each escudo worth around two Spanish do…

Yeah, I thought about it when I first saw the coin cut into pieces - https://www.pirateglossary.com/glossary/pieces-of-eight But then why didn't they cut it into 10 pieces - https://etc.usf.edu/clipart/40600/40610/pie_01-10a_40610.htm ?

8 pieces is easier for a human than 10. You halve it, then again, then halve the remaining quarters. For 10 you'd need to work harder to get the angles right and that's a lot harder.

Re: Spanish traders set the standard for GnuCash database design

#77
post #68

Storing money as an integer is OK but I've never liked APIs that required financial amounts to be integers. Amounts always eventually need to be displayed to a human as a decimal.

displaying as a decimal is nondestructive, whereas doing math with a decimal is asking for trouble

Yeah this is exactly what I do under the hood. All the data is stored as Ints, charts use double for speed, views use decimal to display stuff properly in the user locale.

P.S. Doubles are absolute evil for calculations:

    @Test
    func test() {
        var a = Decimal(100.4449315513924) * 100 // It's me being dumb, not noticing that
        let b = NSDecimalNumber(decimal: a).intValue
        #expect(b == 10044) // Expectation failed: (b → -8402) == 1044
    }

Re: Spanish traders set the standard for GnuCash database design

#78
post #65

Reminds me a bit of how in the UK the guinea coin ceased to circulate decades ago but it's still used for bidding on racehorse auctions. 1 guinea = 1.05 pounds You purchase the horse in guineas, seller gets paid in pounds, auctioneer keeps the missing 5% as commission.

That's fascinating, I remember my Dad telling me you would pay for something in guineas as a sort of tip, but I never knew it was for horses (this is in Australia).

My grandpa always called horse racing in general "the guineas", but I always assumed it was "the ginnies" for some reason.

Re: Spanish traders set the standard for GnuCash database design

#79
post #68

Storing money as an integer is OK but I've never liked APIs that required financial amounts to be integers. Amounts always eventually need to be displayed to a human as a decimal.

displaying as a decimal is nondestructive, whereas doing math with a decimal is asking for trouble

Because decimal types are still vanishingly scarce as a built-in in modern languages.

Storage as an integer often adds complexity because of currency reforms. Decimals can and have been dropped in the past.

Re: Spanish traders set the standard for GnuCash database design

#80

Side question: I'm surprised by the explanation of the 8 in the "real de a a ocho" because " traders counted gold doubloons on their fingers, skipping their thumbs. " (and the link to investopedia has a similar explanation). But from https://en.wikipedia.org/wiki/Doubloon > Spanish American gold coins were minted in one-half, one, two, four, and eight escudo denominations, with each escudo worth around two Spanish do…

Yes, my historical understanding is definitely that it could be split into two easily, not that we counted with our fingers skipping the thumb (Spaniard here).
Post reply on HN