Live data from Hacker News

Accounting for computer scientists (2011)

martin.kleppmann.com

41–50 of 51 posts

Re: Accounting for computer scientists (2011)

#41

Earlier quoted context omitted.

> I do my budget in double-entry. I have a short term budget in GNUCash in the form future dated scheduled transactions, but for more strategic stuff I have an annual budget spreadsheet, which among other things, models income taxes. Increase 401k contributions, and the sheet says I owe less tax. The GNUCash budget tooling is... less useful.

I agree that the GnuCash budget tooling is not useful. I created separate "Budget" accounts (for every budget category) that are Liability accounts, and I also created a "Budgeted Money" Expense accounts. Updating the budget for the month is done by debiting Budgeted Money and crediting the account for the particular budget I want. Then when doing a transaction, on top of the debits and credits that would be there, I…

> This is not for everyone, probably yourself included, but it does work for me.

Sounds a bit like accrual based accounting, which indeed is not for me ^_^

Re: Accounting for computer scientists (2011)

#42

The fundamentals of accounting (in particular double-entry bookkeeping) are simple, but they're often presented or understood as a series of unconnected facts that must be memorized. It doesn't have to be this way! Start with this identity: Equity = Assets - Liabilities This is self-evident: the owners of the company have a claim on the company's assets, but only after any liabilities (like debts to other companies)…

Isn’t the balance sheet changes between two points in time the cash flow statement?

The P&L is based on transactions on Income accounts. The balance sheet is a point in time view of BalanceSheet accounts.

For example: CASH is balance sheet. However REVENUE is an income account type.

The income statement is the changes between to points in time of all balances of Income accounts.

Re: Accounting for computer scientists (2011)

#43
This is the article I always share with new joiners at Tebi: www.tebi.co

We’re building an accounting software system. And on top of that a POS system, inventory management, expense tracking etc.

But at the core it’s a double entry financial journaling system.

I love how Kleppmann bridges the fields of computer science and accounting.

I’ve even build graph visualizations of our journals and ledgers using Kleppmanns technique.

Re: Accounting for computer scientists (2011)

#45
post #42

The fundamentals of accounting (in particular double-entry bookkeeping) are simple, but they're often presented or understood as a series of unconnected facts that must be memorized. It doesn't have to be this way! Start with this identity: Equity = Assets - Liabilities This is self-evident: the owners of the company have a claim on the company's assets, but only after any liabilities (like debts to other companies)…

Isn’t the balance sheet changes between two points in time the cash flow statement? The P&L is based on transactions on Income accounts. The balance sheet is a point in time view of BalanceSheet accounts. For example: CASH is balance sheet. However REVENUE is an income account type. The income statement is the changes between to points in time of all balances of Income accounts.

The balance sheet's components each capture distinct aspects of a company's finances. While you've mentioned 'income accounts', these actually fall under the Equity section.

A balance sheet has three primary segments, corresponding to the accounting equation:

  - Assets
  - Liabilities
  - Equity
Specifically, you seem to be focusing on:

--Assets: Cash and cash equivalents--

This indicates a company's liquid position. To understand cash flow changes over a given period, compare the differences in 'cash and cash equivalents'.

-- Equity: Retained earnings–-

This reflects accumulated income. To gauge profit changes over a time frame, observe the variations in Retained Earnings. (This is accurate provided no dividends were distributed during that period.)

Re: Accounting for computer scientists (2011)

#46
post #36

Earlier quoted context omitted.

In my high school in South Africa, we were made to take accounting for a time. The entirety of what I remember of the experience can be summed up thusly: A. Equity = Assets - Liabilities B. Test time! Here's something we've never talked about before: try to guess which side it goes on!

If you want a gentler introduction to B, you could spend 5 mins on this, which I created ~5 years ago: https://www.oppia.org/explore/pepGU0qbyoUm

I enjoyed that, thank you.

Re: Accounting for computer scientists (2011)

#47
post #16

I'm eternally interested in learning more about accounting, but I think this is missing crucial information to actually explain what "accounting" is while laying on this patronizing anti-intellectual "accountants use hard words" writing style. 1. What are you trying to solve by "doing accounting"? After reading this article, it seems like it's some sort of arbitrary aesthetic, like people who think the point of organ…

Hi rendaw, I made an account just to reply to you because I think your questions are excellent ones.

I am a CPA by background. While much of my professional work today involves programming and working with data, I continue to work primarily in accounting and finance contexts because it is the type of work that I find most interesting.

I don't have a ton of time right now but let me at least answer your first question "what are you trying to solve by doing accounting?". At its core double-entry accounting is a control system (e.g. safeguarding the resources / assets of a corporation by tracking their use). The most important control is that debits must always equal credits. You might understand that in the context of a balance sheet, however it's important to recognize that double-entry accounting systems record business events by way of journal entries. A valid journal entry must include two or more accounts where the sum of debited amounts always equals the sum of credited amounts (if you want to understand why that is a rule I can talk about that in another post). It is a simple & rigid rule, however it still affords enormous flexibility in terms of being able to precisely express business events.

All financial statements are derivative of a series of time ordered journal entries. This series of entries is known as the general journal (not the general ledger which is more often talked about). The general journal is basically just a log of business events. Business events recorded in the form of journal entries are discretely understandable, although you often need the context of other entries to be sure about what's actually occuring.

It's also very important to recognize that this log of journal entries is append-only and immutable. If a mistake is made you never go back a delete an old journal entry, you just make a new one to correct it (sometimes called an adjusting entry). This preserves the ability to review journal entries and intuitively understand what a business is doing over time.

For example, when a company makes a sale you might see a journal entry where accounts receivable is debited and the sales account is credited. A week later you might see a journal entry where cash is debited and accounts receivable is credited, reflecting that the amount for the sale made a week earlier was collected.

This concept of an immutable time-ordered log of events is / was a powerful and useful idea for some obvious and not so obvious reasons that I could talk about for days.

I believe this blog post is also valuable to read and it specifically mentions accounting data structures (I believe it is fairly well known) https://engineering.linkedin.com/distributed-systems/log-wha...

Can talk more later if anyone is interested.

Re: Accounting for computer scientists (2011)

#49
post #23

Accountants use jargon in the same way that programmers do - to succinctly express commonly known and understood concepts. They do not use 'hard words'; if the words are 'hard' it's because the reader lacks the domain knowledge that accountants have been trained in. The fact is that double-entry bookkeeping does not use negative numbers. Where confusion might arise is in the meaning of 'debit' and 'credit'. 'Debit' o…

> 'Debit' only means 'the left hand side', and 'credit' only means 'the right hand side'.

Well, it is a bit more than that. It is the two sides which must balance, so you put them on those sides in order to make them balance. For example, you would put assets and expenses on the debit side, liabilities and revenue and capital are on the credit side, so they will be added up because e.g. you would earn money (a asset) in the debit side and the equal number of revenue on the credit side, so you can see that they are equal.

Of course you could consider them addition and subtraction (in either order; the diagrams in the article use the convention that debit is positive and credit is negative, while you seem to be using the opposite convension) and then consider that they add up to zero, which is mathematically equivalent to the description above.

The diagrams in the article is another way; the arrows are pointing toward the debit side in these diagrams (so the Sales and Capital are shown as negative because they are in the credit side). ("Now, by convention, accountants flip the sign on all of the blue and pink nodes’ balances" is also because they are in the credit side.)

Or the "matrix accounting" that I had made up, where the balance is represented by the equation (which doesn't have any reference of "debits" and "credits", etc):

   = 0
( is considered to vary over time and represents the financial state vector. (It is a kind of projective space.))

Re: Accounting for computer scientists (2011)

#50
I had previously thought of the similar idea, making diagrams similar to the ones in that article.

The article does not mention "debit" and "credit", although that is what they are doing; the arrows point toward the debit side, and they are using the convention of debits being positive and credits being negative. (Since the sales amount is a credit amount and the amount of money you have is a debit amount, so the sales amount appears negative due to this.)

Post reply on HN