ChatGPT DALL-e image of a rabbit in a cave, sepia tone, facing a maze with a computer that needs some care and attention.

Minor Reboot

Why the reboot?

4 years since this website had new content!

So this website has kicked along for the past couple of years, since I shifted from hosted to static. To be honest, it could have kicked along for quite some more time without any need for me to lift the lid and blow out the cobwebs of this site.

This post also comes alongside (albeit a week after it was technically written) a new image that fellow Fauxtographer and Potatoshopper Dave suggested I push ahead with the new image.

Somehow I managed to find myself forgetting during the time since this site was last updated, that the server that runs the WordPress installation (Webmin on a Raspberry Pi) was configured to run FPM/FastCGI (one or the other), so that setting individual PHP versions and settings wasn’t done through the “normal” method I had remembered. This resulted in me realising that I was running EOL version of PHP (7.4) and that I was overdue to upgrade to 8.x. That change triggered some old plug-in conflicts, which then sent me down another rabbit hole.

Pluging the Plugin

I ended up forking the problematic plugin and updating the offending WordPress compatibility issues. I needed this plugin to continue to have the images in the photoblog be hosted by BackBlaze B2 (still the best value in my opinion). It was in the process of updating the code here (helped by ChatGPT and Github Co-Pilot, as I will discuss later) where I stumbled across something I knew of, but had avoided because it was in the ‘technically too hard’ basked. But now, armed with armies of LLMs behind me, I felt brave enough to take on the challenge of automating the manual set of tasks it took to publish > crawl > fix > upload, the price I pay for wanting to host content created by a dynamic, database-driven CMS, in a static HTML+CSS format.

Static, but with moving parts

Publishing the site now is much more of an onerous task than simply pushing the “Publish” Button in the admin-console of WordPress. That happens as normal on my developer server, but to create a static version requires a crawl of the entire site, saving that to a local folder to run some further search and replacements on (to swap-out the dev sub-domain for www), and then publishing that to Github, which in turn triggers a build in Cloudflare. I’m sure I could optimise this flow more to be more self-contained on the dev server itself, or even as a plugin similar to the previously referenced WP-Static.

I used to run each of those tasks mostly manually, but after reading the reference to Gulp in the plugin (to automate the release build and compile), I tackled that myself. Even with Github Co-Pilot and ChatGPT, I spent the better part of two days trying to get all the Gulp actions to work in sequence. The main problems were:

  1. some gulp tasks using outdated import methods, this in the end require specifying which versions were being used through a
  2. a large amount of time spent on search and replace – trying to do this in a single pass was overly complicated until another task was used to remove a redundant step in updating a CSS file. I also wasted hours in trying to remove comments for a replacement to WGET (HTTrack) until realising WGET was still the way to go.
  3. talking of CSS, it was the desire to remove unused CSS rules from a bloated old theme that I use, that triggered the use of Gulp – initially to leverage the Purify-CSS task.

AI and the “Loop-of-Uselessness”

Ultimately, it’s been the radical progress in the sophistication and availability in the past four years in Machine Learning, LLMs and more that enabled me to be able to solve most of the problems I came up against. That being said, when the first answer wasn’t 100% correct, the second was less likely to be so, then you were suddenly plunged into a loop-of-uselessness where, no matter how or what you asked, the answer was a different version or a repeat of the earlier wrong answer. I found myself in this loop a few times when trying to solve errors in code or run-time error evaluation. Then it simply became a return to old Googling to save the day (more-often-than-not from the same websites that were used to train the LLMs like StackExchange).

Interestingly, I found the creation of the image used for this post probably the best example of how frustrating this loop could be. Much of the original images were meant to be of an old computer with dust. However, when I tried to get the shot zoomed out in the frame, every request I made to remove a persistent window in my virtual office was meant with an adamant declaration that the image AI Generator had removed such window, despite it being blatantly obvious.

Anyway, it’s been fun to brush off the dust and reacquaint myself with seriocomic.com again. We’ll see if the reboot lasts longer than a walk down the maze of complexitity and rabbit-holes of large-language models.

+

Well done!

You clicked the ‘+’! Well done you!

I’ve been wondering if anyone ever clicked that thing, now I know – thanks!

Some pages you might like…