Refactoring Shadows

/images/_0ea3bb3c-1413-4dcc-acaa-4a3a518df36b.jpeg

Remember that time I said that setting up a git repo is one of the first signs of life in a coding project? Well one of the next signs is when you’ve learned enough about the tools you’re building to see that you’ve been doing it wrong…

◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇

A feeling of dread has been slowly creeping up on me for a few days now, which I’ve been persistently able to ignore, but today I finally caved in to the inevitable and started a rewrite.

The tool in question is the shadow maker. The system was almost completed, but every time I had to tweak the code, I could see that I was making it increasingly fragile. Too many special cases and exceptions were piling on, and I was getting progressively less sure with each change where things were happening and where to actually make the edits: an irrefutable indication that I was now working more with spaghetti than sculpture.

But I’m pretty pleased with the rewrite, which one again feels compact, efficient, and logically organized. Hopefully it will be wrapped up before bed tonight and I’ll be able to resume forward progress tomorrow.

Meanwhile, I’ve also realized that my git repo actually needs to be split in two: one for the pipeline tools that generate the site, and one for the site contents. The content repo will be used to snapshot changes to the site and to deploy updates to my hosting service, but by keeping the pipeline repo separate, it will be easier to use it to run additional sites, if I ever want to, or to share the system with others, without also having to give them my entire website.

These are not revelations to anybody who works with code, but they’re still fun milestones in the evolution of a growing project and I like to celebrate the little things too.


Read More


/images/_23ba29e4-1877-41f8-a5d6-2ca440ff91ab.jpeg

Testing for Gold

For something as crucial as a financial tool, I want to be sure that plim is always extracting an accurate model of my finances from the data files I’ve download from my financial service providers. So, to ensure that new code never breaks that “ground truth,” I’ve added a simple golden file regression testing system, which gets automatically run every time I check in code changes with git.

By carefully curating a set of testing data that illustrates tricky situations and then hand-verifying that the model built from them is correct, I can ensure that plim will faithfully handle the weird cases, even when they occur in live data.

/images/_e1b23d38-68ca-45eb-bf1b-56bd12ad0ce3.jpeg

Obsidian-fu

Refactoring the shadowmaker has become a bigger headache than I had originally anticipated, but it’s for the long-term health of the system, so I’m sticking to my guns. This weekend added further drama when I finally stopped running away from frontmatter and embraced it for all my metadata. Sure, scattering #ch-command directives throughout the body of the notes was insane, but fixing it is going to mean more than just adding a few metadata fields. I may have to completely change the way I use Obsidian.

/images/_e42c8a8a-b127-431f-b414-425c5d17a2dd.jpeg

Ontology-2.0

While trying to integrate the many episodes of CaveTV into the site, I realized that the ontology was getting cramped. It needs to be revised to better distinguish between internal projects, external brand identities, multiple deliverables within a brand, and distinct showrooms.

What follows is the scheme we devised for what the abstractions are, how they should be tagged in Obsidian, and how the files will be managed within Hugo.