A User's view of Hledger

Learning about hledger

needs, strategies and spending

Here’s something for this Thoughtful Thursday posting: I recently ran across a story of someone who applied the idea of needs and strategies to their spending. If you are not familiar with this concept it’s that we have needs and then strategies for trying to meet those needs. One key idea is that there can be multiple strategies for one need. And not all strategies will have the same result. For example, one strategy can be more effective than another strategy. Consequently, when looking at a need that you have, it’s worth asking the question: Is there a better strategy for meeting this need.

In the above-mentioned story, a person noted a lot of spending at restaurants and bars. When they though of their need for this, the answer was socialization. However, the spending wasn’t helping their budget, and the food and drink that they were consuming wasn’t helping their health. Once they realized that their restaurant and bar spending was to meet the need of socialization, they looked at alternatives for socializing. In the end, they joined sports groups to satisfy their need for socialization. This also had the result of lowering their expenses and calorie intake as they quit going out so much for eating and drinking.

My take away is that asking “What need am I trying to fulfill?” when looking at the more costly items in my budget is worth asking and thinking about.

hledger helps with taxes

I live in the U.S., so that means it’s tax filing season. This is one of those times when I am rewarded for using hledger. For example, I needed to find a total of certain tax payments that I made in 2023. Not only was I able to get the answer quite quickly from hledger, but the report reminded me of one payment that I might easily have overlooked.

cleaning up capitalization

In previous blog entries, I mentioned changing expense categories to lowercase, except for names that always needed to be capitalized. Thus, I wanted “expenses:groceries,” rather than “Expenses:Groceries,” for example.

I wrote a program for this, and it worked fine. However, I recently noticed a case that I hadn’t included. The word “Assets” was still capitalized. Since this was the only word I needed to change, I could easily handle it with search and replace.

However, what if there are some instances where “Assets” should remain capitalized? I used one of my favorite Emacs modes: Occur, which listed every line with the word “Assets,” but hid all the others. This way, I could quickly look through the lines, confirming that indeed every one of those instances needed changing.

Once I was confident that all those needed changing, I could run the replace command, replacing all. Done.