entropy-arbitrage/2020-03-16-dev-ides.md
2020-03-16 07:10:46 -04:00

5.5 KiB

layout title date categories tags summary thumbnail offset
post Developer Journal, Ides-Adjacent 2020-03-16 07:08:32-0400
programming
project
devjournal
Progress on assorted projects /blog/assets/Vincenzo_Camuccini_-_La_morte_di_Cesare.png -25%

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]({% post_url 2020-03-09-post-bicker %}), 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).