Developer Journal, Ides-Adjacent
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).
By commenting, you agree to follow the blog's Code of Conduct and that your comment is released under the same license as the rest of the blog.
Tags: programming project devjournal