TrickJarrett.com

Wednesday, July 27th, 2022

« Previous Day Next Day »

Insomnia into Code

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.

7/27/2022 7:42 am | | Tags: glowbug, javascript, programming

Take it with a grain of salt, but 538 has switched to believe Democrats will win the Senate in the midterms

It is far from a big win, but they now project a 51-49 split in favor of the Dems. And, as always, it's a projection based on polling data, it could still be wrong.

7/27/2022 7:49 am | | Tags: us politics, democrats

The Gray Man (3.5 out of 5 shades of gray)

I wouldn't call it great. It's a good first step for a new action franchise. It sets up the myserious "Six" and dumps him into action against his handlers. They've already greenlit a sequel and I'm not mad about it. Am I clamoring for it? Not really. But I'm a sucker for action movies.

7/27/2022 7:57 am | | Tags: movie, review, netflix, film

Daily Rituals - 3 out of 5 cups of tea

I finally finished this book. It's a string of entries about the habits and routines of famous artists, authors, architects, etc. I started out reading every entry but by about halfway I began skipping entries for people I'd never heard of. But it was still interesting to be able to compare Isaac Asimov to Stephen King to other great authors, etc.

It's firmly infotainment, no shocking revelations - the vast majority of entries boil down to "Put in the hours to get the work done" no matter the type of art or work they do. Very few claim to be driven purely by bolts of brilliance rather than dogged determination and work habits.

7/27/2022 8:02 am | | Tags: review, book

"The Great Naturalist John Burroughs on the Art of Noticing and What Artists Can Learn from Naturalists"

Maria Popova's blog is among my favorites as she highlights wisdoms, insights and takeaways from great minds. Today's post from John Burroughs is no exception:

Noting how one eye seconds and reinforces the other, I have often amused myself by wondering what the effect would be if one could go on opening eye after eye to the number say of a dozen or more. What would he see? Perhaps not the invisible — not the odours of flowers nor the fever germs in the air — not the infinitely small of the microscope nor the infinitely distant of the telescope. This would require, not more eyes so much as an eye constructed with more and different lenses; but would he not see with augmented power within the natural limits of vision? At any rate some persons seem to have opened more eyes than others, they see with such force and distinctness; their vision penetrates the tangle and obscurity where that of others fails like a spent or impotent bullet.

Please go read the full entry for her highlights and quotes from the great naturalist.

7/27/2022 8:18 am | | Tags: wisdom, naturalist, john burroughs, philosophy

"We don't do that here"

Came across this blog post about the use of that phrase in a professional setting and I love it. I'm going to remember it as something to pull out as part of correcting and aligning culture for groups.

7/27/2022 10:19 am | | Tags: language, culture

GM Anish Giri vs GM Judit Polgar


Anish Giri is one of the current best players in the world. Judit Polgar is the best female chess player ever. We get a wonderful video of them playing against each other, and the editing is fantastic as we get narration from both players.

7/27/2022 10:38 am | | Tags: chess, anish giri, judit polgar

Pigs can breathe through "intestinal breathing" which does not use the lungs

My first question is why this was something that was found out, but apparently pigs can survive if they have air pumped up their, erm, well - into their intestines.

"It's so impressive because we never thought of breathing from the gut, but it's possible," Takanori Takebe, an author of the study and a doctor at the Tokyo Medical and Dental University, told VICE World News.

7/27/2022 12:04 pm | | Tags: pigs, oxygen, biology, weird science

Mayim Bialik and Ken Jennings to be permanent Jeopardy Co-hosts - Surprising approximately no one

7/27/2022 12:08 pm | | Tags: jeopardy, television, game show

The Best Horseshoe Pitcher Ever (2010)


Alan Francis has a claim to the best athlete ever. As of this video, he had won the Horseshoe world championships 7 of 8 years from 2003 to 2010. I'm pleased to report he has continued to absolutely dominate. Since 1993, and except 2021 when the tournament was canceled, he's won it 24 times. Brian Simmons was won it three times in that period, and Walter Ray Williams Jr. won it in 1994. Other than that, it's been all Alan Francis.

7/27/2022 12:17 pm | | Tags: horseshoes

"The Seattle Times Company launches The Ticket, a calendar and ticketing site for the Puget Sound region"

Several notable bits here:

First, they hire an editor from The Stranger to run it. Second, that it is a calendar and ticketing service.

The Seattle Times Company is launching a new regionwide calendar and ticketing platform on August 18th called The Ticket. Powered and promoted by The Seattle Times, The Ticket is a lively, opinionated entertainment website covering all the exciting events and things to do in Seattle and the Puget Sound region.

The site is created by the Seattle Times Content Studio and will be led by Chase Burns, formerly an editor at The Stranger. With his experience as a successful entertainment reporter and editor in Seattle, Burns is perfectly positioned to help The Seattle Times Company create a compelling, visionary entertainment website for the Seattle area. He has assembled a team of experienced local writers, reporters and videographers to help him create The Ticket.

[...]

The Ticket will include event listings and planners featuring things to do across five key regions in Seattle. Readers can access content through weekly email newsletters, social media channels and navigation from seattletimes.com.

7/27/2022 12:29 pm | | Tags: seattle, pacific northwest, washington state

Custom Paths

Making tonight an early night after yesterday's (admittedly) productive insomnia. After work, went out to do a quick bit of errands with the wife, and after we got home and watched What We Do in the Shadows I got back into my code.

Mostly finished my taxonomy rewrite - There is still more to do, but we're back to parity with the previously (badly) written page and we've added the ability to define hierarchy in the tags. Though the backend doesn't yet do anything with that information. That's phase 2 of this bit of work.

Custom paths - Unlike Wordpress and most other blog engines, this CMS was conceived for links and Twitter-esque posts (the very first name of this blog engine was 'Blips' before I moved to 'Glowbug' as its name.) I've been expanding Glowbug's capabilities as I use it more, but due to this original design concept I didn't give posts their own pages by default.

Most of them exist only on the main index (while they're new) or on date archive pages. However, I did eventually add the functionality for standalone posts - but, again, I opted for maximum simplicity at first. Every post is given a unique hash string identifier (for example, this post's hash is 'fa340ae8'), and up to now that string has been used when generating the page urls. Simple.

Tonight I started the code to allow me to set custom paths. It's probably 60-75% of the way done. I can add them. And when I publish it sets the URLs correctly across the site. But the work, as always, remains on the admin side. Things like the paths still don't show up correctly in the admin panel, or needing to be able to edit paths once published, or when I have a post drafted but not published, that currently doesn't handle paths properly. But - we're getting there.

Delete ghost posts - As part of the above work, I uncovered an overlooked bug. The way the site published posts has, up to now, been entirely additive given that file paths were all fixed. No generated html files were being deleted. Again, this structure was perfectly find under the original design specs. But adding standalones is when this became a bug. Once a standalone post was published specifically.

Standalone posts could live on as ghost posts after I deleted them in the blog's database. Because, the way it was written, even if I deleted it from the database, it's generated html file would remain. I fixed this by adding code to remove any standalone files when a post is deleted. I still need to catch when a post path is changed after publish, and some other corner cases. But as we have a userbase of 1, I can be confident that that is not a major problem I'm going to run up against in the short term.

And that's it. I'm calling it quits for the night. Sending out the day's newsletter and heading to bed to read until I fall asleep and make up for some of last night's sleep debt.

7/27/2022 8:49 pm | | Tags: programming, glowbug
« Previous Day Next Day »