Coding 2024-03-02

By Max Woerner Chase

Okay, let's see where I am now.

At the level I'm currently considering, the most complicated logic is "there's an optional subtitle node, and I want to properly handle all of the nodes that are not subtitle." I've got the vague sense that I'm doing something wrong with my design, which is pretty much just in my head right now. Like, I'm currently leaning towards, there's some kind of dependence between the subtitle property and the other attribute. It feels to me like the current draft is wrong, because it's a relatively monolithic setup, and adapting it to the more complicated requirements means I need to duplicate and rework a lot of it.

Let's see if I can divide this up a little...

Hm. I can certainly pull apart different ideas and make the individual units of code smaller, but it's not yet clear if I have the pieces I need to build back up what I want. Thinking about it, the problem I was having before was kind of that I had two monoliths...

Okay, I consolidated a bunch of logic into a compound cached property, and then wrote additional properties to pull out distinct parts of it. This seems like a useful thing to do in this code, for whatever reason; I have some of this in the general Node code as well.

Anyway, with that, plus just knocking out all of the simpler child relationships quickly, I have the tree structure just about handled. Next, I need to get the rest of the data for each node, and then I can work on presentation logic. At that point, it should be ready to move into proper testing.

But for now, I need to sleep.

Good night.