Double-entry Bookkeeping for Programmers