14 ms·
Accounting for Developers
- camz 11y agoI always appreciate new ways to make accounting easier. A lot of accounting should be automated because most of it is ministerial. But, I do thinking that financials are something that each person should learn a bit more about. I find it too common that people aren't spending enough time to understand what their financials are trying to tell them. For example, they're generate awesome revenues, but failing to convert it into cash fast enough to meet their debts (statement of cash flows). Always a fan of everyone gaining financial literacy =).
- Pamar 11y agoCan you suggest some light reading on this?
- eru 11y agohttps://martin.kleppmann.com/2011/03/07/accounting-for-computer-scientists.html https://martin.kleppmann.com/2011/03/07/accounting-for-compu... is a good introduction.
- haberman 11y agoThis blog post changed the way I think about accounting in a deep and powerful way.
- buyx 11y agoI found that article to be rather obtuse and very complicated (I think it was an intellectual exercise rather than a primer), but that's my personal opinion. Definitely not the "light reading" GP wanted. A useful primer would, in my opinion, start with the accounting equation, explaining its components, and move on from there.
- tmornini_ey 11y agoIs "that article" our primer of the Martin Kleppmann piece?
- buyx 11y agoI was referring to the Martin Kleppmanm piece on "Accounting for Conputer Scientists". It seems like it was meant as an exercise in mapping accounting to graph theory, but somehow morphed into a go-to tutorial for accounting. Looking at the comments on that website, it has even developed a sort of fanboyism. But IIRC, it led to some "interesting" insights when it was first discussed on HN, like "sales are liabilities". I find the alleged impenetrability of basic accounting to be rather baffling in general.
- tmornini_ey 11y agoThanks, happy you were not referring to our document! :-) Sales (Incomes) are clearly equity, with Expenses being contra-equity. Not sure how anyone could come to any other conclusion, but I'll read the article and it'll probably become clear. :-)
- hDeraj 11y agoI actually did a (rough mvp) hackathon project with a friend that implemented this idea pretty literally: https://github.com/dominodes/dominodes https://github.com/dominodes/dominodes
- tmornini_ey 11y agoThanks!
- bcoates 11y agoAs a former bookkeeper, I should mention that this is technically bookkeeping, not accounting, which vaguely corresponds to the difference between computation and programming. That said, this is very dangerous knowledge; once bookkeeping makes sense like this you will constantly have to resist the urge to yell at people who claim "expenditure X really shouldn't count because it has benefit Y", which is a disturbingly common belief among otherwise smart people.
- scrapcode 11y agoI had an opportunity to be the manager of a multi-million dollar contractor's office. It included bookkeeping among many other things. Never before had I realized the power of cash-flow, but also the destruction. On paper there were many employees that made more annually than the CEO.
- dmak 11y agoCould you elaborate? I would be interested in hearing more
- hluska 11y agoThis may not be what the op had in mind, but I remember my first bookkeeping (mostly AR/AP/payroll) gig. Watching the books was like watching the tide. Cheques from customers seemed to come in waves, and you'd watch the bank account swell. But then, you'd do a monthly payable run and a few days later you'd enter a big payroll with the monthly expense reimbursements. All of a sudden, the funds in the bank account started to dwindle...until the next wave of cheques...
- tmornini_ey 11y agoNice analogy, love it!
- scrapcode 11y agoJust got back to this. But almost exactly. I'd deposit the biggest checks I've ever seen. But they'd be gone almost immediately if we zeroed the AP. It completely changed the phrase of "letting the bills pile up" for me. For what it's worth, I never once payed a late fee. I'd pay the original amount no matter how late and never heard a word from the receiving end's AR department.
- atmosx 11y agoTruth to be told, going by the title I was expecting a sort of handbook for something like ledger[1]. [1] http://www.ledger-cli.org http://www.ledger-cli.org
- Fiahil 11y agoI started going through ledger recently (after a fructuous discovery in a HN comment), and it's truly a great tool with a great documentation for someone not used to accounting!
- jldugger 11y agoBookkeeping wasn't super hard to figure out when I started using GNUCash in grad school. Really the most painful part was importing history from shitty local bank records.
- calpaterson 11y agoI don't import history from my bank - I find manual reconciliation fairly quick and quite useful - but I share your pain with dealing with banks. QIF is a useless format for double entry systems.
- jldugger 11y agoGNUCash lets you do separate import and reconciliation steps. The problem was the bank didn't support OFX. Or maybe even QIF, it was a long time ago and I was naieve.
- mikekchar 11y agoI don't know why, but when I read the introduction to this I suddenly thought, "Hey my production code/tests is a double entry programming system".
- cdcarter 11y agoA neat intro for a project that looks like it could be very neat, but definitely not yet full featured enough to compete in the Quickbooks or even Ledger environment. It's an interesting move to make the docs all google docs, but for readability it really is quite nice! Your homepage talks about great handling of micro-transactions but I can't find ANYTHING about it in the docs. Can you point me to something?
- tmornini_ey 11y agoThanks for your input! We never intend to be competitive with the product layers you've described. We've deliberately built Subledger to enable other developers to build focused custom accounting applications above us. :-) We believe it's time to move beyond one-size-fits-all approach to accounting! :-)
- calpaterson 11y agoI think it's great that someone is trying to teach this topic to software engineers and I accept that it's hard to teach but I think that this document doesn't do a good job. Covering the "balancing" of debits and credits as the starting point is too abstract. GNUCash's (which I use for my personal accounts) guide is unhelpfully down right now, but you can find it here: http://www.gnucash.org/docs/v2.4/C/gnucash-guide/ http://www.gnucash.org/docs/v2.4/C/gnucash-guide/ I also found Accounting Demystified very useful: http://www.amazon.co.uk/Accounts-Demystified-Astonishingly-Simple-Accounting/dp/0273744704/ http://www.amazon.co.uk/Accounts-Demystified-Astonishingly-S...
- nbouscal 11y agoThe post basically read like a summary of the first class in my accounting degree. I would be very surprised if the average software engineer has less tolerance for abstraction than the average accountant. Debits and credits are the foundation on which all of accounting is built. I don't see why you would start anywhere else.
- calpaterson 11y agoWhen you consider how many people leave "Accounting 101" classes without really understanding anything the traditional way starts to look quite bad
- tmornini_ey 11y agoGood point. Do you know or believe it to be higher than most other classes?
- throwaway_97 11y agoI too depised these things when I took accountancy in school but by the second year I had accepted their value and now cannot see how else it could have been better. Debit/Credit is the foundation of double entry. Most people think accountancy = bookkeeping. They dont get Double entry system. It's understandable, it took me a considerable time to grasp it.
- arihant 11y agoAnother great resource is Financial Intelligence for Entrepreneurs: http://www.amazon.com/Financial-Intelligence-Entrepreneurs-Really-Numbers/dp/1422119157 http://www.amazon.com/Financial-Intelligence-Entrepreneurs-R... So far is the only book I know that explains why and not just what.
- z3t4 11y agoStartup idea: Create a bank with accounting tools built in. Also make it easy to receive payments via credit cards.
- the_mitsuhiko 11y agoPretty sure most banks already do that on business accounts. I know mine does.
- scoopr 11y agoHolvi? https://about.holvi.com/en/ https://about.holvi.com/en/
- tmornini_ey 11y agoSubledger would love to help you build that!
- cbhl 11y agoOne simplistic definition of 'debit' and 'credit' that my accounting teacher taught me: 'debit' means 'left', 'credit' means 'right' Then, you just make sure that SUM('left') == SUM('right').
- frivoal 11y agoThat's the easiest way to deal with it. If you can remember that (which is not hard), and where one type of account falls on the left/right spectrum (which isn't hard either, pick whichever you like), then you can figure out the rest. Until you're used to these two words and they speak for themselves, assigning any other meaning tends to lead to more confusion than anything else.
- kinleyd 11y agoI dropped accounting in my 10th grade largely because I made the mistake of trying to get into the "meaning" of debit and credit. Mnay wasted hours there. Finally in grad school I got it - left and right - and accounting has never been a problem again.
- satyanash 11y agoI've always understood it using the 'source' and 'destination' analogy that many unix tools follow. Credit is the source while debit is the destination. Using the source and destination keywords has the advantage of not implying the actual operation to be performed. For eg. credit results in an 'add' operation on an expense account while a 'subtract' operation on an asset account.
- tmornini_ey 11y agoYes, in the article we describe this as from/to. :-)
- hrjet 11y ago> From a mathematical perspective, abnormal balances are essentially negative balances, though in accounting negative numbers should never be used or allowed. This seems like a bad legacy passed down unwittingly. I am not trained in accounting, but been keeping my books for several years now. I have written a ledger-cli clone and have been using it for the last three years for both personal and company accounts. Using signed numbers works perfectly fine during book keeping. I use the Debit/Credit lingo only when I need to show reports to the pesky accountants. (Fortunately, my main accountant doesn't bother me with formalities).
- thaumasiotes 11y agoYeah, the "should" is editorializing. The avoidance of negatives is pretty easy to explain as a simple mistake. From the article: > Luca Pacioli, often referred to as "The Father of Accounting," wrote, printed and distributed the first complete description of double-entry accounting in 1494. From http://en.wikipedia.org/wiki/Negative_number#History http://en.wikipedia.org/wiki/Negative_number#History : > In 1545, Cardano in his Ars Magna did not allow negative numbers in his consideration of cubic equations, so he had to treat, for example, x^3 + ax = b separately from x^3 = ax + b (with a,b > 0 in both cases). In all, Cardano was driven to the study of thirteen different types of cubic equations, each expressed purely in terms of positive numbers. > In A.D. 1759, Francis Maseres, an English mathematician, wrote that negative numbers "darken the very whole doctrines of the equations and make dark of the things which are in their nature excessively obvious and simple".
- tmornini_ey 11y agoNICE! Thanks for those quotes!
- clarkevans 11y agoBookkeeping uses a different reasoning system than you are accustom. I think of it as vectors in a 2-dimensional space (asset/liability, income/expense) -- where each vector has a magnitude and a direction (debit/credit). You can think of "debit" being the head of the vector (where value is going), and the "credit" as being the tail (where it comes from). Transactions are paired, complementary movements in this space -- not plus/minus movement along a single line. Visually, it's much easier to distinguish between a debit and a credit if they are in different columns. A tiny little minus sign won't do it. Of course, you could use color, but, that's not always printable. Parenthesis are OK, but, it makes sanity checks in your head difficult. Of course you could do this transformation a report if you wanted, but really, how often does that happen? Logically, these are actually very different activities. When you debit an asset account, it's representing a kind-of-activity that happens (retained value accumulating). Once you view credit/debit as just plus/minus, you're tempted to neglect the other dimensions of the interaction. To a beginner, debit/credit affect on asset/liability/expense/income accounts seem like an unnecessary distiction, however, the interactions are inverted in their affect. Is minus good or bad? It completely depends upon your perspective. Redundancy is a feature not a defect; it's a checksum. There's always a tendency to simplify the model and elminate the balancing interaction and check. This is possible, of course, and it does simplify the recordkeeping. However, it means that logical classification errors are harder to discover. When (perhaps big) money is at stake, why take the risk? By having 2 complementary transitions in a more complex space, you cause the person making the entry to think... and that's very useful (even if it's tedious or exhausting). Pratically, you have convention/tradition. You're making a choice to use plus/minus for credit/debit is one of the distinctions, you could just have easily use it for asset/liability or income/expense. Why favor credit/debit? While this may not be the best way to solve these concerns, the approach is the incumbant -- most financial people expect this kind of problem to be this way, regardless of the extra complexity involved. Tradition here reduces communication overhead. Even so, the rules arn't passed down unwittingly, they form an approach known to work. I think each generation is welcome to challenge (and they often do challenge) tradition, however, new approaches need significant justification.
- known 11y agoCheck http://en.wikipedia.org/wiki/Hollywood_Accounting http://en.wikipedia.org/wiki/Hollywood_Accounting
- jasim 11y agoDebit is Yin and Credit is Yang. When you receive salary as cash, you record it as a tuple: Yin: Cash Account Yang: Salary Account (amount: $salary) When you spend from that cash, you record it as this tuple: Yin: Dinner Expense Yang: Cash Account (amount: $bill_amount) If you get your salary through cheque, it looks like this: Yin: The Bank Account Yang: Salary Account When you borrow: Yin: Cash Account Yang: The Creditor Friend And vice versa when you pay it back. Now replace Yin with Debit and Yang with Credit, and that's mostly it.
- clarkevans 11y agoWhy is this voted down? The author here isn't being flippant nor religious nor obtuse. Yin/Yang represent the idea that head/tail, good/bad, pretty/ugly are dependent on your perspective. When working with complex information, realizing that you can approach the problem from different perspecives is critical to communication. Look at this poster's history. He's got a track record of thoughtful contributions -- this post is no deviation. Just because you don't understand what he's saying doesn't make his comment incorrect or irrelevant.
- jasim 11y agoThanks Clark for this comment. Downvotes without explanation doesn't help the poster understand what went wrong and fix it in the future. But I suspect it was the Yin/Yang analogy and lack of an introduction that flipped people. The analogy is used to show how both debit and credit have a dual and interconnected relationship than the more simplistic notion of being opposites. If anyone is interested in this way of looking at bookkeeping, here is a lengthier explanation with examples: https://github.com/jasim/bookkeeping https://github.com/jasim/bookkeeping
- tmornini_ey 11y agoThis is a good point jasmine! We'll read that document and incorporate the ideas where they're helpful. Thanks!
- ZainRiz 11y ago
- facepalm 11y agoWhat are good tools for getting started with accounting? Simple needs (just my private affairs)?
- davidw 11y agoIf anyone's interested in Luca Pacioli and the history of accounting, I enjoyed this book: http://davids-book-reviews.blogspot.it/2012/12/double-entry-how-merchants-of-venice.html http://davids-book-reviews.blogspot.it/2012/12/double-entry-...
- mvdwoord 11y agoLies < Damn lies < Statistics < Bookkeeping.
- throwaway_97 11y agoWhat kind of stupidity is this?
- codemac 11y agohttps://en.wikipedia.org/wiki/Lies%2C_damned_lies%2C_and_statistics https://en.wikipedia.org/wiki/Lies%2C_damned_lies%2C_and_sta... A joke?
- tmornini_ey 11y agoIf you're suggesting accounting should be associated with deceit, you've got the cart pulling the horse!
- louithethrid 11y agoEssential knowledge, so when your average clueless buisness major tryies to get you to come up with new metrics and wont buy into other previous useless metrics (codelines checked in etc.) you can invent something funny, that allows you to go back to "real" work. Success never had trouble getting Alimoney-suits.
- buyx 11y agoI did accounting (actually bookkeeping) in high school, as did almost all my school-mates, and it is a very useful skill to have. From understanding debit and credit on a bank statement, to being able to read a balance sheet, accounting is a powerful tool in day-to-day life. South Africa has a bit of an accounting fetish (Chartered Accountants are the gods of the business world here), but it certainly is useful to know the rudiments. We hear about coding being the "new literacy". I am sceptical, but if coding is the "new literacy" then basic accounting knowledge is equally important, in my opinion.
- tmornini_ey 11y agoI agree 100%. Cannot imagine a more valuable high school class than basic accounting. I guess you'd agree with us that building any software that handles money should, by definition, use accounting to do so?
- weddpros 11y agoI've studied accounting at school and I've always hated it since then. To me, accounting is a data model gone wrong. Redundancy, race conditions, unclear semantics, too generic... I've tried countless times to make sense of it (the latest being today when I read the post with great hope), but I always came to the same conclusion: there must be a better way. Yet I know the value of the model as a log to record transactions. We're all confronted to accounting (when we read our bank ledger)... Ask the public, and they'll tell you it's good if there's more money in the credit column than the debit column. This "common wisdom" is false in accounting. What's a debit card? a credit card? What's an account? Isn't it a container for money? not for accountants. Accounting turns many concepts upside down... and I always fail to bend my mind enough to grasp it. I admire accountants for succeeding where I fail so miserably, but they're also responsible for the problem. There must be a better way... I was so bad in accounting at school...
- UK-AL 11y agoIt the other way around. Accounting didn't turn the terms upside down. Accounting invented these terms, but the public has one sided view of it.
- weddpros 11y agoYou're right... thanks
- dragonwriter 11y ago> Ask the public, and they'll tell you it's good if there's more money in the credit column than the debit column. That's because the public is used to hearing the terms used by entities who are using them in the accounting sense, but where the member of the public in question is external to the entity whose accounting the term refers to. So credit -- and outward flow of value -- sounds good, because when the public hears it from another company, its usually because they are the sink to which value is flowing (and debit -- an inward flow -- sounds bad, because the member of the public hearing an external entity use the term is usually the source from whom the value is flowing.) Of course, neither is intrinsically good or bad, they are good or bad relative to a particular actor based on whether the account they refer to is internal or external to the actor. Debit is just inward flow of value to an account, credit is outward flow of value from an account. > What's an account? Isn't it a container for money? That's not a bad approximation; a better approximation would be "a named accumulation of flows of value". > Accounting turns many concepts upside down... and I always fail to bend my mind enough to grasp it. Interestingly, all the concepts you list that the public perceives in a way which you seem to think conflict with the accounting view actually reflect limited subsets of the accounting view from a narrow perspective, which are subsumed within the more general view of accounting. Accounting doesn't turn them upside down, it just broadens them.
- Dowwie 11y agoThis is as good a place as any to mention that this double-entry bookkeeping process, a centuries-old methodology, is long overdue for replacement (but changing a global standard like this may never come to pass). In the early 1980s, an academic known as William McCarthy presented one such alternative known as REA, which organizes accounting into a resources-events-agents model. A little while ago, I asked Mr. McCarthy whether REA was dead and he claimed that it in fact wasn't dead and that work was still ongoing. The thing is, since as early as the 1960s, there has been discussion and publications about event-driven accounting architecture. Pretty crazy, right? Alas, considering IFRS and GAAP span the world's modern economies, it may be safe to assume that hell will freeze over before any viable accounting alternative to double-entry bookkeeping supplants it.
- tim333 11y agoI doubt double-entry book keeping will be replaced but there are many opportunities to build on it. GAAP earnings can give you results that are completely out of sync with whether a business is making it's owners richer or not which is what counts at the end of the day.
- throwaway_97 11y agoWasn't GAAP replaced long time ago?
- deleted 11y ago[deleted]
- ibejoeb 11y agoI don't think double-entry is going anywhere, but guidance certainly is. I pay a lot of attention to this stuff, specifically the convergence of financial accounting guidance. It's not happening at a blistering pace, but things are moving. More and more US companies are reporting under IFRS. FASB and IASB have both done a lot of rewriting in the past 5 years, which is aligning GAAP and IFRS. APAC is really churning. Japan GAAP takes more hints from US GAAP, but many Japanese companies have opted for IFRS. Australia GAAP has some very strange principles, especially around equity compensation, but is beginning to align with IFRS. China, well, I don't really know, but I'm definitely on the lookout for it... I think it's one of the most interesting of uninteresting things.
- seanstickle 11y agoOne of my favorite books is "Algebraic Models For Accounting Systems" -- http://www.amazon.com/Algebraic-Models-For-Accounting-Systems/dp/9814287113 http://www.amazon.com/Algebraic-Models-For-Accounting-System... Fundamentally this book is about the application of abstract algebra to the analysis of accounting systems. Add in APL or J (or Haskell if you must) by way of "Algebra: An Algorithmic Treatment" (http://www.amazon.com/Algebra-algorithmic-treatment-Kenneth-Iverson/dp/B0006WTFW6 http://www.amazon.com/Algebra-algorithmic-treatment-Kenneth-...), and you build a quite rigorous proof-based accounting system.
- boothead 11y agoThanks for the recommendation. If it wasn't $73 I'd definitely grab a copy. Why is Haskell "if you must" though? Are the others better at expressing code algebraically?
- seanstickle 11y agoMostly because I'm an APL snob. Haskell is great.
- tmornini_ey 11y agoWe believe our test suite to be a complete test of the core accounting that we implement. Would be beautiful to have a provably correct implementation, perhaps v4!
- walterbell 11y agoHN thread on triple-entry accounting, https://news.ycombinator.com/item?id=7771712 https://news.ycombinator.com/item?id=7771712
- velvety 11y agodxctfyvgbuhljk
- k_sze 11y agoDid the author forget to secure the other document (Accounting for Developers 103) that is linked to from the first one?
- tmornini_ey 11y agoWe left all three open for commenting, which we've now disabled.
- Roboprog 11y agoIt's funny: I had to write this stuff back in 1985. After that, we did reports and special inventory breakdowns added onto an existing 3rd party system. Still, I guess it helps to know where projected purchases and sales are being logged.
- 0xdeadbeefbabe 11y agoI find the title racist or sexist or both.
- tmornini_ey 11y agoI assume this is a joke, but if not, let's discuss.
- 0xdeadbeefbabe 11y agoThough the headline is obviously doing its job, I'm just not willing to swallow the presupposition that developer people exist in the same way that male and female exist or that Asians exist. Developers as they are called are just people with a range of skills, and the same goes for accountants. I even heard a good accounting school has a program for accountants with a proclivity for programming. I admit the title isn't absolutely fascist, racist, or sexist, but it is some kind of ist, and it is annoying. Maybe accountants, with self congratulatory pride in their profession, feel the urge to divide the world up into neat little categories?
- tmornini_ey 11y agoAre you suggesting that nobody should class themselves as a developer, and/or that as self-identified developers, who I can agree are just people with a range of skills (and I never suggested otherwise), we should not attempt to write a document attempting to explain accounting to other self-proclaimed developers, who, in our decades of experience, tend to have certain viewpoints, vocabulary, and interests in common? Finally, while I'm delighted that you agree the title isn't absolutely fascist (which you never claimed in the original post and suggest in your response it to be partially), racist or sexist, I'm entirely baffled as to why you felt compelled to post a comment stating it in absolute terms in the first place.
- 0xdeadbeefbabe 11y agoDid you say decades of experience? Oh. Ok. Nevermind. I'm just asking myself why not write about accounting, and let the reader decide what group he or she belongs to. The answer is clearly something like, we need a good title.
- crimsonalucard 11y agoaccounting for developers? Does this mean the text is dumbed down or made more advanced?
- itsybitsycoder 11y agoIt means it's teaching (or attempting to teach) the field of accounting using terms, concepts, and styles of thinking familiar to developers, instead of starting from square 1.
- tmornini_ey 11y agoThank you, could not have answered this better myself! Also, it's by-developer, for-developer, so there's a developer's perspective as well. :-)
- tmornini_ey 11y agoHey all! John and at appreciate all the discussion and feedback. We're absolutely delighted to have struck a chord with developers, the intended audience of this piece, and with accountants, who have managed and passed down this technology for 700 years. We're working through the backlog of comments and will reply where we feel we can add some value.
- jasode 11y ago>with developers, the intended audience of this piece, I'm not sure why you feel the document targets developers specifically. I didn't see any text that's a unique bridge to a developer's perspective. For example, a text for "developers" might include examples of video game "tokens" or multi-player "weapons" that can be traded. You'd outline a rudimentary outline of what data structure to keep track of the source and destination of where the tokens went. Or an example would be bitcoin money being subtracted and added to various accounts. Since many developers know bitcoin, maybe map bitcoin ledger concept to accounting concepts. Or explain how they are radically different. Your current document is a generic introduction and one can search & replace "for developers" to "for biologists" and nothing else would have to change.
- tmornini_ey 11y agoThanks for your feedback. We felt it was for developers are we're developers and this is the way we've come to describe and understand it having built Subledger. Your point is excellent and we'll steer toward developers in the future.