I've been using Beancount for the past few years and consider it to be one of the tools that have had an outsized impact on my productivity. The amount of power it gives me so I can track my personal finances, while maintaining simplicity, is truly impressive.
Beancount belongs to a class of tools that implement double-entry bookkeeping within the framework of plaintext accounting. But what exactly do these terms mean? In this blog post, we'll take a quick look at plaintext accounting.
What is Accounting?
Accounting is a broad term, but for the purpose of this article, we'll limit our definition to the one that Wikipedia provides: the process of recording and processing information about economic entities. Thus, if you're tracking the flow of money from one account to another, that process can already be considered part of Accounting.
To maintain simplicity, we'll narrow our focus further to "personal accounting". Throughout this article, whenever we refer to "accounting," we'll specifically mean tracking the flow of money for individuals.
What is Plaintext Accounting?
Plaintext Accounting means exactly what's written on the box – accounting using plaintext files.
Accounting software often has a reputation for being complex and not particularly beginner-friendly. A full fledged understanding of accounting requires significant domain knowledge, which in turn can make accounting software seem cluttered and confusing, especially for individuals who want to manage their finances at a much smaller scale.
Plaintext Accounting introduces a minimalistic approach to this concept, employing the idea that the data should be stored in plaintext files. When an application is built around the principles of Plaintext Accounting, it typically means that it stores the data in plaintext files and provides a suite of tools (often command line) to work with such files.
Why use plain text files?
Plaintext files are files that contain unformatted text, meaning they contain characters that are readable without any special interpretation or encoding. Plaintext files – because of their simplicity – are highly portable and can be opened with a wide range of text editors across different operating environments.
There are several advantages to conducting accounting inside plaintext files.
One of the most significant advantages is simplicity and portability. Plaintext files are among the simplest data formats available. The characters written in such a file are readable without any special interpretation or encoding. You can view the contents without needing any specific program installed; any text editor, even the most basic one, would do. Exactly this simplicity is also what makes the format highly portable.
Another advantage is that plaintext files are easily readable by both humans and
computers. Typically, software programs use specific formats optimized optimized for
computer reading when saving data to disk. For instance, when you're saving a Microsoft
Word document to disk, you're likely using the .docx
format, which is actually a
.zip
file containing multiple .xml
files. In contrast, when you save a document
using Notepad, the format is .txt
which can be read by any other text editor.
Tools in the Plaintext Accounting ecosystem
The Plaintext Accounting ecosystem has been growing since 2003, when Ledger was first introduced. There might certainly have been similar ideas and concepts (and maybe even implementations) floating around before that. But Ledger seems to have set things in motion back then.
At the time of this writing, the most popular tools in the Plaintext Accounting ecosystem include Ledger, hledger, and Beancount.
Ledger is the "OG" of plaintext accounting tools. It's written in C++ and goes all the way back to 2003. It's still going strong and has a very active ecosystem behind it. hledger is another powerful and user-friendly double-entry bookkeeping tool that utilizes plain text files for data storage. Developed in Haskell, it is largely compatible with Ledger. Beancount, yet another popular tool in this ecosystem, is written in Python, had its first release in 2008 and is supported by a strong community.
All three tools mentioned above benefit form active development and strong communities. If you wish to choose the tool that started it all, opt for Ledger. If you're a Haskell developer, hledger might be more suitable due to your familiarity with the language. Similarly, if you're comfortable with Python, Beancount is an excellent choice to get started.
Conclusion
In this article, we had a look at the fundamental of Plaintext Accounting, giving you a foundational understanding of the topic. As promised at the beginning of this blog post, we'll continue the journey in the next article by diving deeper into Double Entry Bookkeeping. Watch this space for updates!