Accounting for Computer Scientists
Published by Martin Kleppmann on 07 Mar 2011.
Every educated person really ought to have a basic understanding of accounting. Just like maths, science, programming, music, literature, history, etc., it’s one of those things which helps you make sense of the world. Although dealing with money is not much fun, it’s an unavoidable part of life, so you might as well take a few minutes to understand it.
Sadly, in my opinion, most accountants do a terrible job of explaining their work in an accessible way; it’s a field full of jargon, acronyms and weird historical legacies. Even “Bookkeeping for Dummies” makes my head spin. Surely this stuff can’t be that difficult?
(We computing people are probably guilty of the same offence of bad explanations and jargon. The problem is, once you have become intimately familiar with a field, it’s very hard to imagine how you thought about things before you understood it.)
Eventually I figured it out: basic accounting is just graph theory. The traditional ways of representing financial information hide that structure astonishingly well, but once I had figured out that it was just a graph, it suddenly all made sense.
I’m a computer scientist, and I think of stuff in graphs all the time. If only someone had explained it like that in the first place! It would have saved me so much confusion. So I want to try to fix that. If you like graphs, then by the time you reach the end of this article, you should know everything you need in order to understand the financial statements for a small company/startup (and even calculate them yourself, in a spreadsheet or programming language of your choice).
It’s really not that hard. Let’s go!
Accounts = Nodes, Transactions = Edges
Say you go to the bagel shop and buy a Super Club bagel for $5 on the company credit card. You also visit some random Silicon Valley startup and buy one of their surplus Aeron chairs, second hand, for $500 (by writing a cheque from the company account). Those are two transactions. Each transaction is an edge in our graph, and the edge is labelled with the amount.
... continue reading