Coding 2020-03-20

By Max Woerner Chase

I was mostly doing not-this-hobby-code today, so I just now quickly put together the layout of the common state class I worked out last night. In doing so, I discovered that some of the state I'd been tracking in LineState, I should not have been.

So, I'm kind of pondering how to update stuff, when all of the states are going to wrap a helper class that contains twelve attributes, some somewhat complex. Now, to start with I'm going to just keep nesting calls to dataclasses.replace, but it's fun to imagine more involved implementations, like having a helper method that takes all attribute names and does dispatches on them. Or a helper that, rather than mapping names to values, maps names to functions that transform the value.

More value for now in getting the flow of data correct, which it right now... isn't. Anyway, I let things go late, so I should once again wrap up a short post.

Good night.