Pete's Log: Distractions
Entry #3022, (Meta)(posted when I was 47 years old.)
So the "dynamic" content is roughly 95% done. Things like Pete's Log and KLUE4 and my media gallery and shiny new guestbook. I'm quite pleased.
So I've been reviewing my objectives for what must be done before I go live with esgeroth.org version 19.53.0 (19 and 53 are the first two prime factors of Pete's Number—I like my version numbers to be arbitrary).
- Unit testing:
- 100% of tests pass ✅
- >50% of classes are covered (currently at 38%)
- >25% of lines of code are covered (currently at 22%)
- Static Analysis finds 0 errors (not quite)
- Linting finds 0 issues (not quite)
- All currently live URLs on esgeroth.org must continue to work
So those last few bullets have revealed a few things: so far I've been running static analysis and linting only on the "dynamic" bits of the site. Recently I expanded that to the static content as well and it was a bit of an eye-opener. 2022-2023 Pete came up with a clever scheme to incorporate the static content without having to modify it, but it turns out that only truly works for the content that is 100% static. A good number of those files turn out to have a line or three of PHP code in them.
I also discovered I had punted on how to handle my history pages that don't use the site styling. So I've been working on resolving those issues. And naturally finding rabbit holes to distract me.
On the history front, I found on the Wayback Machine an archived copy of a file diary.html titled "The emporiul Journal" with three entries from early 1997. This briefly led me to consider renumbering all my log entries so I could claim Pete's Log started in 1997. I resisted. I might also have briefly investigated what implementing negative entry numbers might entail. Alas. For the curious, the earliest entry in that file is from March 31, 1997 and reads as follows:
I have discovered that yahoo lists only two columbo web pages, and those two pages no longer exist... a pity... I have therefore decided to make my own columbo web page! (Coming soon, hopefully...)
I never did make that Columbo page, but it does feel like a timely discovery. Annie got me the Columbo box set for Christmas and I've been enjoying it. Columbo, surprisingly, has never been mentioned in Pete's Log before. I associate it with late nights alone in the Keenan basement when I couldn't sleep. It was always comfort watching and I guess it just predated Pete's Log. But not Pete's Diary.
(To nobody's surprise, I never did make that promised Columbo web page, but if we define "soon" as "in the next 30 years" then I still have a year to go)
One of the not-quite-static static sections of the site is my old quotes page, which hasn't been updated since circa 2000. Here my brain decided the best way to deal with the static analysis and linting issues was to make it fully dynamic, and thus now my quotes page is database powered. And so naturally I felt that I needed to update all my quotes with proper citations. And purge the ones that are misattributed and such.
While working on that, I had the form to edit a quote open in one tab, but then opened another tab with the form for a different quote. And then I tried saving the first quote, but my CSRF mitigation prevented me from doing so. It was a curious event, but I was simply pleased that my updated CSRF handling meant that the data I had submitted was not lost.
Then I tried to save the quote in the other tab and it too was stopped by CSRF mitigation; which is when it clicked: my CSRF tokens were clobbering each other when I had multiple tabs open. So what to the untrained eye may have seemed like another unnecessary distraction on the road to getting this new site live was actually a pretty good test of some critical code.
So now my CSRF mitigation code also works when multiple forms are open in multiple tabs. I'm quite pleased.
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.