Goodbye to the tables arf_note, arf_project and arf_user. They were remnants of something Sergey and I worked on back in 2005. arf_project and arf_user were unused and have simply been dropped. But confusingly, arf_note had been repurposed for Pete's Log. For a period of time, I had apparently lost the credentials for the database user that can create tables. So when I implemented Person markup I just reused the unused arf_note table for that feature. Which isn't confusing at all since neither the table nor column names make any sense for that feature. Anyway, I've long since recovered the credentials to add and edit tables. Today I finally renamed arf_note and its columns to something more sensible.
On the topic of Person markup, I have made that functionality available only to logged in users.
What reminded me of this messy arf situation is that I was actually trying to add a new table for a different purpose, namely I want the ability to assign multiple topics to a log entry. MySQL isn't really my native dialect of SQL anymore, so I was confused for a moment when it wasn't letting me add foreign key constraints to my new table. So after a quick crash course of everything that's changed in MySQL over the past couple decades, I learned that MySQL didn't really support foreign keys when I implemented most of Pete's Log. Most of my tables are "MyISAM" and I need them to be "InnoDB" in order to support foreign keys. Since I like referential integrity and had completely forgotten Pete's Log doesn't have it, I decided to review all my tables (since the more recent ones actually are InnoDB) and start converting them. And that's when I rediscovered the arfs. Good times.
This MyISAM->InnoDB exercise also involved a brief revisit of klue4. Nothing is ever easy. Who knew nothing on this website had any foreign keys? Anyhoo...
So after a few detours, log entries now support having multiple topics. I have gone back through the last couple dozen entries and updated a couple of them. Still undecided if I want to modify any older entries. Topics were introduced in August 2000, along with entry titles. While working on the code, any time I got frustrated with how messy it is (and it is messy), I just reminded myself that I'm actually very happy that code I wrote 20+ years ago is still serving me as well as it is.
There've been a few other log enhancements lately as I find time for them:
- Made some updates to the history text
- Added an "On This Day" feature
- Made some enhancements to the stats page
- Added a flag to mark entries as test entries. Found that of the 51 log entries I've marked as private to date, 30 were test entries.
On a different topic (see what I'm doing here?), there have also been a few updates to my desk since the office tour:
Work gave me a VOIP phone, so to make that fit, I bought another monitor stand of the same kind. Then I decided I needed extra lighting, so of course the obvious way to do so was Neopixels, another ESP8266, and a toggle switch mounted to the front left corner of the left monitor stand. I'm quite pleased with the result.
Here's the toggle switch up close in all its absurd glory: