Organizing Ledger

Ledger is a double-entry accounting system that stores data in plain text. I began using it in 2012. Almost every dollar that has passed through my world since then is tracked by Ledger.1

Ledger is not the only plain text accounting system out there. It has inspired others, such as hledger and beancount. I began with Ledger for lack of a compelling argument in favor of the alternatives. After close to a decade of use, my only regret is that I didn’t start using earlier.

My Ledger repository is stored at ~/library/ledger. This repository contains a data directory, which includes yearly Ledger journal files such as data/2019.ldg and data/2020.ldg. Ledger files don’t necessarily need to be split at all, but I like having one file per year. In January, after I clear the last transaction from the previous year, I know the year is locked and the file never gets touched again (unless I go back in to rejigger my account structure).

The root of the directory has a .ledger file which includes all of these data files, plus a special journal file with periodic transactions that I sometimes use for budgeting. My ~/.ledgerrc file tells Ledger to use the .ledger file as the primary journal, which has the effect of including all the yearly files.

$ cat ~/.ledgerrc
--file ~/library/ledger/.ledger
--date-format=%Y-%m-%d

$ cat ~/library/ledger/.ledger
include data/periodic.ldg
include data/2012.ldg
include data/2013.ldg
include data/2014.ldg
include data/2015.ldg
include data/2016.ldg
include data/2017.ldg
include data/2018.ldg
include data/2019.ldg
include data/2020.ldg

Ledger’s include format does support globbing (ie include data/*.ldg) but the ordering of the transactions can get weird, so I prefer to be explicit.

The repository also contains receipts in the receipts directory, invoices in the invoices directory, scans of checks (remember those?) in the checks directory, and CSV dumps from banks in the dump directory.

$ tree -d ~/library/ledger
/home/pigmonkey/library/ledger
├── checks
├── data
├── dump
├── invoices
└── receipts

5 directories

The repository is managed using a mix of vanilla git and git-annex.2 It is important to me that the Ledger journal files in the data directory are stored directly in git. I want the ability to diff changes before committing them, and to be able to pull the history of those files. Every other file I want stored in git-annex. I don’t care about the history of files like PDF receipts. They never change. In fact, I want to make them read-only so I can’t accidentally change them. I want encrypted versions of them distributed to my numerous special remotes for safekeeping, and someday I may even want to drop old receipts or invoices from my local store so that they don’t take up disk space until I actually need to read them. That sounds like asking a lot, but git-annex magically solves all the problems with its largefiles configuration option.

$ cat ~/library/ledger/.gitattributes
*.ldg annex.largefiles=nothing

This tells git-annex that any file ending with *.ldg should not be treated as a “large file”, which means it should be added directly to git. Any other file should be added to git-annex and locked, making it read-only. Having this configured means that I can just blindly git annex add . or git add . within the repository and git-annex will always do the right thing.

I don’t run the git-annex assistant in this repository because I don’t want any automatic commits. Like a traditional git repository, I only commit changes to Ledger’s journal files after reviewing the diffs, and I want those commits to have meaningful messages.

Notes

  1. I do not always track miscellaneous cash transactions less than $20. If a thing costs more than that, it is worth tracking, regardless of what it is or how it was purchased. If it costs less than that, and it isn't part of a meaningful expense account, I'll probably let laziness win out. If I buy a $8 sandwich for lunch with cash, it'll get logged, because I care about tracking dining expenses. If I buy a $1 pencil erasure, I probably won't log it, because it isn't part of an account worth considering.
  2. I bet you saw that coming.

Isolation Report, Day 2020.07.29

One hundred and thirty nine days of Operation Fuck Off I’m a Hermit Now. Bacon and chocolate supplies restocked.

All systems nominal.

Link Log 2020-07-19

Wireless is a trap

I want my tools to be predictable – to have consistent performance and fail in ways that I understand. Wireless protocols are inherently more complex (because many devices share the same airspace) and have more different ways to fail, so they’re much less predictable than wires. For me, the convenience often isn’t worth that cost.

Peer-Reviewed Scientific Journals Don’t Really Do Their Job

In many ways, journals don’t even pretend to ensure the validity of scientific findings. If that were their primary goal, journal policies would require authors to share their data and analysis code with peer reviewers, and would ask reviewers to double-check results. In practice, reviewers can only judge the science based on what’s reported in the writeup, and they usually can’t see the details of the process that led to the findings. (This is kind of like asking a mechanic to evaluate a car without looking under the hood.) And for really important discoveries, you might expect journals to recruit an independent team of scientists to try to replicate a study from scratch. This basically never happens.

How Normie Minimalism and Farmhouse Chic Took Over Contemporary Design

The fetishization of and association with regional manifestations of a labor past is what ties together the minimalism of the industrial loft to an aesthetic that has been increasingly dubbed “modern farmhouse.” Just as the loft romanticizes the backdrop of 19th century urban industry, the modern farmhouse romanticizes the similarly Steinbeck-ian plight of the agricultural worker. It makes sense that an aesthetic marketed towards suburban homeowners would be based off agricultural work, since the history of the suburbs from the Garden City movement to gated communities is based off escape from urban plights and the further-flung expansion into greenfields, or previously agricultural, areas. This fetishized and aestheticized use of the motifs of agriculture also enabled marketing to areas such as the regional South, whose economic production still revolves around agriculture and which never urbanized to the same extent – or in the same way – as the Northeast.

Handmind in Covidtide

Moreover, one of the effects of Covidtide, I think, is that by forcibly breaking some of our technological habits it creatively destabilizes others. To have any one thoughtless pattern of life disrupted is to be put into a frame of mind that allows you to contemplate the deliberate disruption of a different thoughtless pattern. Thus all the people who, after three months of baking bread, are now saying that they’ll never go back to buying their bread from the supermarket. They probably will buy bread from the supermarket; but they’ll know what they are doing, and why. And this is useful knowledge.

The Conspiracy Singularity Has Arrived

The strain of living in this particular time, with a dragging, devastating pandemic and a global uprising against police brutality and racial injustice, crashing together at the highest speed, has accelerated something that’s been going on for years. Call it the conspiracy singularity: the place where many conspiracy communities are suddenly meeting and merging, a melting pot of unimaginable density. UFO conspiracy theorists and QAnon fans are advocating for drinking a bleach solution promoted by anti-vaxxers. QAnon groups and Reopen America groups alike promoted Plandemic, a film clip jam-packed with conspiratorial claims about the causes and spread of COVID. The Freedom Angels, an anti-vaccine group based in California, are among the many such groups joining anti-lockdown protests, using language that feels heavily drawn from the Patriot movement: They’re calling stay-at-home orders “tyranny,” addressing their followers as “Patriots,” and positioning themselves as “a new civil rights movements.”

Dead and Alive: Beliefs in Contradictory Conspiracy Theories

Thus, we predict that for someone with a conspiracist world-view, nearly any theory that assumes deception by officialdomin its explanation for a world event and stands in opposition to the “mainstream” account will garner some agreement. This relationship may hold even to the point that people who believein a world governed by conspiracy are likely to endorse contradictory conspiracy theories about the same topic. Just as Adornoet et al. (1950) found positive correlations in endorsement of contradictory stereotypes, we expect to see positive relationships between endorsement of contradictory conspiracy theories about the same event. For example, the more that participants believe that a person at the center of a death-related conspiracy theory, such as Princess Diana or Osama Bin Laden, is still alive, the more they also tend to believe that the same person was killed, so long as the alleged manner of death involves deception by officialdom.

Aquatic Park

I've started mounting my bike lights via shock cord.

The previously mentioned Orfos Pro LED flares ship with Velcro One-Wrap for mounting. This works well enough, but lately I’ve decided I prefer using shock cord and cord locks. The cordlocks add a little weight to the system, but this setup mounts to all the things I want to mount the lights to, and makes it very easy to tighten. After tightening the lights don’t move around at all, where with the Velcro they would move a little on a bumpy road. This system is also quick to attach and detach, which I appreciate when parking, and can be more easily manipulated when wearing full-fingered gloves.

Orfos Pro Shock Cord Mount

  • Orfos Pro Shock Cord Mount
  • Orfos Pro Shock Cord Mount

Prepare

There’s always a prevailing mystique in any civilization. It builds itself as a barrier against change, and that always leaves future generations unprepared for the universe’s treachery. All mystiques are the same in building these barriers – the religious mystique, the hero-leader mystique, the messiah mystique, the mystique of science/technology, and the mystique of nature itself. We live in an Imperium which such a mystique has shaped, and now that Imperium is falling apart because most people don’t distinguish between mystique and their universe. You see, the mystique is like demon possession; it tends to take over the consciousness, becoming all things to the observer.

Frank Herbert, Children of Dune

Link Log 2020-06-30

A Non-Euclidean View of California as a Cold Place to Be

I don’t think we’re ever going to get to utopia again by going forward, but only roundabout or sideways; because we’re in a rational dilemma, an either/or situation as perceived by the binary computer mentality, and neither the either nor the or is a place where people can live. Increasingly often in these increasingly hard times I am asked by people I respect and admire, “Are you going to write books about the terrible injustice and misery of our world, or are you going to write escapist and consolatory fantasies?” I am urged by some to do one – by some to do the other. I am offered the Grand Inquisitor’s choice. Will you choose freedom without happiness, or happiness without freedom? The only answer one can make, I think is: No.

The Long Shadow Of The Future

It’s generally a mistake to make long-term forecasts in the midst of a hurricane, but some outlines of lasting shifts are emerging. First, a government or society’s capacity for technical competence in executing plans matters more than ideology or structure. The most effective arrangements for dealing with the pandemic have been found in countries that combine a participatory public culture of information sharing with operational experts competently executing decisions. Second, hyper-individualist views of privacy and other forms of risk are likely to be submerged as countries move to restrict personal freedoms and use personal data to manage public and aggregated social risks. Third, countries that are able to successfully take a longer view of planning and risk management will be at a significant advantage.

Punishing the Innocent

For the ones doing the mobbing, ruining the lives of innocent people is not a bug in their program, it’s an essential feature. There can be no reign of terror when only the guilty are punished.

Hardcore UFOs

In his 2018 book New Dark Age, James Bridle identifies the conspiracy theory as an essential coping mechanism of late modernity. He writes, “Surrounded by evidence of complexity, the individual, however outraged, resorts to ever more simplistic narratives in order to regain some control over the situation.” Bridle’s observation has proven especially useful lately, with even the most composed of us experiencing a prolonged sense of collective powerlessness in the face of a global pandemic.

Wireless is a trap

I want my tools to be predictable – to have consistent performance and fail in ways that I understand. Wireless protocols are inherently more complex (because many devices share the same airspace) and have more different ways to fail, so they’re much less predictable than wires. For me, the convenience often isn’t worth that cost.

So this is the famous JavaScript

Tank Hill

Link Log 2020-06-14

Stochastic Resonance in Reading

It’s when the current environment lies outside the scope of your attention, when you neither seek nor expect any connection to it, that you make room for random resonances to form.

How Google Docs became the social media of the resistance

“Hyperlinks are the most succinct and quickest way to access things, and you can’t do that on Facebook or Twitter.”

Garbage Language: Why do corporations speak the way they do?

In an environment of constant auditing, it’s safer to use words that signify nothing and can be stretched to mean anything, just in case you’re caught and required to defend yourself.

A Portrait of Eliane Radigue (Institute for Media Archaeology, 2009)

Derailleurs - an introduction

Deport Racists Mouse

Searching Books

ripgrep-all is a small wrapper around ripgrep that adds support for additional file formats.

I discovered it while looking for a program that would allow me to search my e-book library without needing to open individual books and search their contents via Calibre. ripgrep-all accomplishes this by using Pandoc to convert files to plain text and then running ripgrep on the output. One of the numerous formats supported by Pandoc is EPUB, which is the format I use to store books.

Running Pandoc on every book in my library to extract its text can take some time, but ripgrep-all caches the extracted text so that subsequent runs are similar in speed to simply searching plain text – which is blazing fast thanks to ripgrep’s speed. It takes around two seconds to search 1,706 books.

$ time(rga -li 'pandemic' ~/library/books/ | wc -l)
33

real    0m1.225s
user    0m2.458s
sys     0m1.759s