Insomnia into Code

7/27/2022 7:42 am |

I suffered some pretty horrendous insomnia last night (speaking comparatively for myself.) But the good news is I've really been enjoying coding in Javascript and I spent most of that time doing it. I expect later today to be in a pretty dour mood given the lack of sleep and the heat, but I'll survive.

I spent most of last night working on basically a complete rewrite of my taxonomy system for posts. I'm adding hierarchy to tags, and also completely rewriting the way the admin page that manages them works. I'd say I'm about 75% of the way there, and then I'll dig into reorganizing them. Once they are reorganized I'll be changing how they function in the backend when I'm writing a new post (for example, when I choose a tag that has a parent tag it will auto-add that tag to the post), and then I'll be experimenting with how they're displayed on the front end.

This will also likely mean that I begin making the tag archive pages. Which has been on my to do list for a while, but I have just held off.

One of the "gardening" tasks for tags is to go through and catch typos (I had both "conspiracy" and "conspirazy"), or when I use synonyms (I decided last night to use "programming" instead of "coding" and also that when a tag is a verb, I'll use the -ing form of it.)

One feature I realize I need to add in my admin tool is that when I merge tags, rather than simply deleting the old one I should save it and what it's merging into. So, in the future, if I try to add that tag again the system will be able to autocorrect it to prevent the "weed" tag from popping back up. Not doing that now, I've added it to my backlog of things to add. Adding that feature now requires a bit more back-end reconfiguration and I don't want to rabbit hole on this all, I'm hoping to be done with my current run at the taxonomy system later today. Who knows though. Maybe another night of insomnia will make it happen.

The next big thing is figuring out the right level of complexity to enable with nesting of tags. For example, I could group all of the programming language tags under the 'programming' tag - that makes perfect sense. Is it worth grouping all the tags which are names of individuals (Boris Johnson, Joe Biden, Elon Musk, etc.) into a group under 'Person'? I don't think so, at least not as of now. Or I have a slew of "us politics", "us history", "us soccer" - do those go under "USA"? As I'm working on implementing the tag hierarchy, I'm thinking about these things and trying to decide my feelings on them.

After this bit on taxonomy, I think the next "big" feature for the blog is to add a photolog of sorts. I've never been a consistent photologger, though I've tried a few different photologs over the years. I also never really adapted Instagram as a regular place to post. But, I do post photos here from time to time, and I could add an auto-tweet for new photos, etc. It's in the backlog, we'll see when I get to it. I still have another small coding project that isn't part of Glowbug to distract myself with.

As far as my enjoying working in Javascript: What I mean is that I'm enjoying working without any library. Historically I've relied on jQuery when writing complex Javascript, but I've come to realize it isn't needed anymore. The language has come a long way over the years, especially with its growth as a backend language rather than just for browser frontends. I'm doing things with native JS which I never would have been able to do without wanting to gouge out my eyes and it's as elegant and simple as jQuery.

It's just really impressive to dive in and really appreciate how far the language has come. Well done to its maintainers.