Coding 2022-10-09

Tags:
By Max Woerner Chase

I got MOTR to run on the new branch as well as it's going to, after fixing up a lot of code and tests. And now I'm figuring, why not just hit the rest of the TODOs next, and clean everything up as well as I can?

This is a little unfortunate. I did a bunch of work earlier today, but now I'm writing it up at the last moment, so I'm just kind of like "Yeah, I did a lot of stuff, a few hours ago, so it's not fresh in my mind any more."

I do remember that I did run into some issues with how I was doing mocking, but it was fortunately pretty isolated, and I came up with a not-great solution that's good enough. The fundamental issue there is that I didn't have "code that I owned" at the place that I wanted to mock. Actually, that does suggest a possibility for addressing this in a more principled way: create an internal-ish helper function that wraps the third-party code in question, and mock that. Before I get into that, I should see if there's a better way to write the tests in question.

See, one thing that I ended up discovering while I was fixing test code, is that I've let the test code kind of lag behind how I want to use this stuff, and when I make the sensible updates to make it consistent, it also gets a bit more robust to the changes I was making, which is fortunate.

So, here's the general idea for what kind of changes I want to make next:

That seems like a lot, but all of these quality improvements should hopefully make it easier to handle writing new tests against the "release" topic's code. Not in any kind of direct material sense, just that I won't get distracted going "But the code could be so much better", because it already is.

Anyway, I let things go too late, so I'm going to cut things off awkwardly and abruptly.

Good night.