Coding 2020-10-01

By Max Woerner Chase

Putting "I win" as a commit message seems to have glitched up either pijul or my terminal a little, but the point is, specifying the aliases I want documented as autodata rather than letting them be collected as "genericalias" seems to basically do what I wanted done, at the slight cost of kicking those documentation entries out of order. The moral of the story is, if you can't do a thing, do something else.

Anyway, I added some documentation and switched configuration files into pyproject.toml, in part thanks to FlakeHell, which I am extremely underutilizing, but at least it does what I initially wanted it to. I'll see later what else I'd like to do with it.

After that, I started documenting probably the most complicated module in the project, which just barely justifies its existence versus how complicated it is. Basically, and this whole thing will probably provoke multiple "well, there's your problem" reactions, I rolled my own classes for converting streams to/from bytes and base64 and hex encodings. At first, I was hand-coding the control flow inside the iterators, but that's kind of a pain, since you have to do various fiddly bits of bookkeeping in the base64 case. By making the logic generic, I was able to undo the hand-rolling iteration synchronization I'd done, and offload the question of "which bits go where" onto the runtime.

Where the problem comes in, from my perspective, is that this "generic bitstream iterator" concept predates the rewrite to make all iteration repeatable. This meant that I had to convert some of my boilerplate code for interacting with this, into a wrapper class. So, there's a bunch of code in there, (over 100 lines, with no documentation), and I'm looking at it and thinking "Before I even get to documentation, how much of this code should actually exist in the current form?" It's possible that "Before" is a bad assumption, and I should be trying to document stuff to get insight on what needs to change, but I'm not sure.

I had kind of a rough night in other regards, for some reason, so I'm not going to push myself, but tomorrow I'd like to figure out what I'm going to do with this module.

Good night.

(PS If my coworkers are reading this, there's a chance that they're boggling at my getting freaked out by "only" 100 lines. Well, this is small hobby code, and if I tried singlehandedly imposing my standards on our codebases, I would not have time for anything else. That's not hyperbole.

Also, there are some longer files in this project, but they have a much higher ratio of API surface to LoC, and some of them are documented.)