Building and running GnuCash in Docker

Introduction

I have written about GnuCash a few times before. I have been using GnuCash version 2.6 for nearly 2 years now. A lot of the features that were added after this version weren’t really useful for my use-case, so I never upgraded. Also, the binary that is distributed through the Ubuntu App store / apt-get repositories is v2.6. Versions after that were not published to the aptitude repositories, for some reason. (A lot of software packages do this)

Recently, I ran into a very strange bug. I wanted to report this bug to the GnuCash team and get their feedback on if this was something that they had seen before. To avoid reporting a bug on an old version which was no longer being supported actively, I got the latest version of the GnuCash code and started a long, uphill battle to build it locally! This post is a summary of that experience.

For those who are looking to run the latest version of GnuCash inside Docker, you can get this Dockerfile and build the Docker image. The command to run it on an Ubuntu 18.04 LTS host is given at the top of the Dockerfile.

Read More

On Hope and Independence

Note: This post is different from the typical posts that I are on this blog. It is about something that made me think when I watched a TV show recently. I will explain the set-up of a story I heard on the show. After that, please take some time to think about what you would do if you were the character in that story. Then, move on to the next section which will show the original ending of the story, and the ending that came to my mind right before I heard the original ending on the show (there’s a pause in the show).

The set-up

Once upon a time, there was a girl who was very sick. There was a tree outside her room that she saw everyday through a window. Seeing the leaves on the tree fall off, she told her father that when all the trees had fallen off of the tree, she would die too.

Her father, hearing this, decided to do something about it.

At this point, take a moment. What would you do if you were the little girl’s father?

Read More

How to Take Smart Notes (Ahrens)

I read this book after seeing Sreejith’s 5-star review. It was a habit-changing book for me.

The most important take-away for me was the difference between a writer and an archivist. As I have been reading more and more non-fiction books in the past couple years, I realized that there were several connections that I was noticing but wasn’t really making on paper anywhere. I was making notes about separate pieces of literature, but I wasn’t really connecting them. My behavior was that of an archivist.

To move into a writer’s mindset I realized that I have to start thinking about how anything I read is changing my mindset and actually write my thoughts down (apart from the things that have already been said by the author).

Read More

Using Emacs - A trial

I have been used Vim for a while now. In university, my Vim usage was mostly related to the work I did in student groups. This probably came out to about 20-25 hours a week, on average. I used it to write my bachelors and masters thesis in LaTeX, which was probably the smoothest workflow I could have had for writing something that was about 80 pages long. Once I started working, my usage increased to nearly 40-45 hours a week. I was writing notes and code in Vim every weekday.

With this increased usage, the problems with Vim really started coming to the surface.

Read More

Notes and Review - Lean In (Sandberg)

There are a million reviews of this book out there, I don’t think I have anything new to say about the book. I do want to look at how Sandberg approaches the root cause of the issue that she deals with in this book: not enough women in leadership roles.

She begins by dividing the barriers into two categories: Internal and External. This was a very useful framework to think about the issue and try to improve the situation by making structural changes. The book is full of anecdotes, her conversations, and her advice to several groups of people. It is also relentlessly researched, there are no assertions or gut feelings in this book, everything is based on numbers from... Read More

Notes and Review - The Odyssey (Homer) (Wilson translation)

Review

I heard about this new translation on the Ezra Klein show. Madeline Miller made a very convincing pitch for why this book is relevant today, and why everyone should read this book; especially, the new translation by Emily Wilson. I was looking for something complex to read, that would keep me occupied for the 5 day extended vacation from May 2nd to May 7th (here in Japan). That was my main reason for picking this book up.

The story was simple, it was told at a beautiful, exciting clip. The story moves forward with this incredible, hard-to-believe speed. I am glad I read this book!

Read More

Notes and Review - A Game As Old As Empire (Hiatt)

Review

This book is everything that it claims to be on the book jacket. It “uncovers the inner workings of the institutions behind these economic manipulations”. In particular, it looks at some of the incredibly global institutions that are name dropped in a lot of contexts: World Bank, International Monetary Fund and the World Trade Organization. There are several stories here about loans that were given to countries which were supposed to build schools or upgrade the city hall building of a bustling city or one of a myriad of other reasons but never did that or help the people the money was supposed to help in any way.

I must admit that it was a pretty shocking revelation at several points. In particular, we get stories from the people in the field, the rank and file of organizations like the World Bank who are going abroad to assess if a given loan should be sanctioned or a banker who used to work in an island that was being used for offshore banking.

Read More

Notes and Review - Sapiens (Harari)

I have been hearing about Sapiens since April 2018. A friend in university read that book and told me that it was really good and that it changed the way they thought about a lot of things. I wanted to read the book but it was never very high on my list. This past Friday, I read a profile of the author, Yuval Noah Harari in the New Yorker. This profile intrigued me because it told the story of a university professor and a historian and even a philosopher who had some very strange principles and said things that I had honestly never heard before. These two quotes sealed the deal for me:

In “Sapiens,” Harari writes in... Read More

Converting GNUCash's XML file to Ledger's DAT format

Note: What follows is a meandering account of why I wrote a Perl script to convert GNUCash’s XML file to Ledger’s plaintext format. This script was the result of this process.

I have been using GNUCash to maintain my personal finances for about 4 years now, and especially since I started working, I have used a single GNUCash book for my expenses. Before that, I used to close my accounts every year or half year and start a new book. Apparently, this is not the recommended way to use GNUCash.

The more I have used GNUCash, the more I have become familiar with the data entry system. In general, I try to enter all my transactions by saving receipts and categorizing everything appropriately. If ever I have the feeling that a particular month or quarter I spent too much on a given category (bought too many clothes / too much electronics shopping) I pull up the Expense barchart report that GNUCash has in built support for. The default report is pretty good, and gives one a good idea of how they are doing with their money.

Read More

More tools!

Here’s a list of some of the repositories I created on Github recently:

Vim plugins  
MarkdownLinks.vim 2020-02-02T03:54:14Z
PersistentScratch.vim 2020-01-02T09:56:07Z
Scripts in bash / perl / etc  
gospec 2020-01-25T12:08:24Z
json-where 2019-09-23T07:45:08Z
gnucash-xml-to-ledger-dat 2020-02-11T11:35:33Z
launchdarkly-prereq-graph-gen 2019-06-01T08:02:52Z
Firefox add-ons  
wealias-firefox-add-on 2019-02-05T13:49:12Z
open-circleci-workflows-firefox 2019-08-24T07:13:19Z
Misc  
stern 2019-03-21T14:47:12Z

I realized that I have been building a lot of tools lately. In particular, I have gotten into writing Vim plugins and forking and editing the tools I use often so that they have the options I want, but will probably never be merged into the tool’s repository itself.

Read More