Navigation Links & Writing Update

I’ve been very quietly working in the background for some time, and there’s a lot for me to catch up on here on this blog.

On a personal note, I am, at the time of this writing, about two days out from my second Pfizer Covid vaccine jab. My symptoms were, fortunately, relatively mild. On the other side of this, I am confronted with an enormous backlog of life activities that have been on hold because they were infeasible or logistically impossible, so that will be eating up a chunk of my time throughout the rest of May. I’ll be celebrating the two-week mark by volunteering at my first powerlifting meet ever, which is doubly exciting.

As for writing, I have decided to do one more revision pass on Intersection Thirteen. I am now planning to publish it on June 4. After that, I want to do another editing pass on Chronicles of Ytria, then devote effort once more to The Ghost King, so that it can be my published novel of 2022. If I don’t at least complete the draft this year, that will likely not be possible.

In terms of this site, I’ve been quite busy. As I noted prior, I ran into some problems writing automated tests over significant portions of this site’s code. The problem was that there was no way to test the functions without actually reading and writing to the production database, and I refuse to let my tests do that. What I thought I could do is set up a test database and have all test functions run through that, but without any utility in Rust to “prepare” all test code to point to such a database, I hit a wall.

That problem was solved when I discovered the Faux library via the author’s post on the Rust subreddit. Another solution to the problem I faced was to force all the code that reads and writes to the database to do nothing instead, in essence replacing the database implementation with a kind of “mock” database stand-in. This worked like a charm. It also incited an enormous code clean up effort. When I built this site, I was learning the Actix server framework for the first time. As a result, the bits of the site I wrote earlier were a lot messier than the ones I wrote later. When I went through and introduced Faux over the database layer and wrote tests over the rest, I also cleaned up a lot of the mess I had left for myself during my early learning. This was multiple weekends’ worth of effort.

None of that work had any impact on the outward presentation or behavior of the site. However, I recently had the experience of wanting to walk backwards in time through posts looking for something that I knew I had written, but not could not remember which post I had written it in. Since accomplishing that turned out to be practically impossible, I decided to implement one user-facing feature: the navigation links you can now see beneath each blog post’s breadcrumb.

I have also planned out a few other features that I want to implement over the course of the next couple of evenings and weekends. Expect a post about those soon.

Categories:
Tags: