La morte di Cesare

This was a tight week, as I needed time to spend some of my otherwise-discretionary time on other issues.

Background Generator

As I predicted last week, dynamically scaling the Leaflet map on my Background Generator project was easy. I needed to set the initial zoom as far in as it goes (13 for MapBox, I believe), save the six markers to an array, and then add the following code.

var group = L.featureGroup(markers);
map.fitBounds(group.getBounds());

The first line turns the markers into a ā€œgroup.ā€ The group can then be used to find the bounds and then fit the map to the bounds.

Iā€™m also intending (as probably mentioned before) to add a small optional inclusion panel, so I also added some CSS to plan for that.

Miniboost

As a quick warning, this project may not come to anything, in the long run, due to some possible flaws in the underlying library Iā€™m planning to use. On the other hand, I think I can work around the problem; itā€™ll just be more overhead than should be necessary.

But let me take a step back.

After a surprisingly-extensive comparison, a few years back, the note-taking program I settled on is Boost Note. It looks nice enough, stores content as markup, and is mostly easy to work withā€”moving notes between categories is sometimes a mess. I have a script that commits and pushes my latest changes to a git repository every night with decent messages, too, so that I donā€™t need to worry about keeping things up to date.

However, especially as my main computer ages, Iā€™m finding that I increasingly butt up against one big issue: As an Electron app, it gets to be heavy on system resources, so I canā€™t reliably run it full-time and running it at all sometimes causes me grief.

Since the data is easily specified and unencrypted, though, it seems like I should be able to hack together a lighter-weight program that only handles the basics of letting me read and update notes. I donā€™t typically need fancy formatting on display or export features, just the ability to tab over to the program, type out some thoughts on what Iā€™m reading or working on, and know that the changes saved. Fight now, I do this by searching the note files and editing manually, but thatā€™s clumsy enough that Iā€™m probably going to forget whatever it was that I planned to write.

Miniboost, then, will hopefully be that lightweight system. The plan is to implement this using Proton Native, which maps a React-like syntax on to Qt native components.

The one problem Iā€™m having in experiments is that Reactā€™s state doesnā€™t seem to be flowing correctly. Hopefully, I can get some feedback on that issue (I would love to discover that Iā€™m just doing something wrong) before I decide to implement this using a heavy library like Redux.

Blog Updates

Early in the week, I decided that I should pre-generate empty posts for the Star Trek between now and the end of the series, both as a reminder and to force myself to make decisions like whether I want to do end-of-season roundups. Incidentally, including those season summaries and the seven (counting the first chunk of Generations) original-cast movies, Iā€™ll be done with the original cast on March 10th, 2022. Decisions on whether I want to progress from there will probably be made around then, because thatā€™s already a long commitment.

In any case, while generating the posts was an interesting task (Iā€™ll document some aspects of that process on Wednesday as a tech tip), I realized that Jekyll was taking around twenty seconds to rebuild my blog locally. On publication, I donā€™t care about the time, but twenty seconds between making a change and seeing the change as I edit is too long.

I wonā€™t get into the details, here, but Jekyll has a handy --profile option that produces a nice table of which templates are taking up the most time. In my case, there was a block of code thatā€¦I honestly canā€™t actually figure out why I wrote it. That was taking up a good chunk of time. And the other issue was not filtering a list up-front.

Now, the build time is generally down to four seconds, which I can live with.

I also made some changes to generating the template for my weekly Twitter roundup to manage time zones properly and updated some of the styling.

Bicker

I had some mostly-inconsequential changes for Bicker, like refactoring the colors in the SASS file and fixing a small, potential bug in the Message modelā€™s paragraph-management code.

Next

Iā€™m probably looking at more Miniboost, obviously, and Iā€™m investigating another project that you should see some background for on Sunday.


Credits: The header image is La morte di Cesare by Vincenzo Camuccini (1802).