Scroll to top

12/02/2026

The home on the web of Colin Walker.
Find out more on /about, say /EHLO, or tune in to the daily RSS feed.

2026/02/12#p1

There has definitely been a shift in my focus recently. I've not been able to get going on music since moving the studio, concentrating on the blog — especially messing around with the code — instead.

Add starting the randomelements site to that, and we've got a total change of direction.

It's always a fallback position. If things are getting on top of me or I'm feeling down, I revert to code.

I have been struggling recently. My wife says she's seen me slipping since the new year. A downward slide always goes hand-in-hand with a drop in creativity.

I went to bed last night thinking about taking a break from Bluesky for a while. I'm not 100% decided on that yet but I think I'm probably going to do so.

# This change, however, has resulted in a significant change on the site under the hood: I have copied the WordPress method of handling connections.

WordPress handles database connections via the wpdb class, which acts as a wrapper for mysqli. It creates an instance of the class and assigns it to the global variable $wpdb. Each database query then references $wpdb. This ensures that a single connection is made to the database and reused for each query.

With the help of Codex, I have altered my connection class to behave in the same way, setting up a single connection, assigning it to the global variable $dbconn, then using that on each query, e.g. $dbconn->read($query)

Combined with the recent posts cache, this significantly reduces the load on the database.

No comments yet
Leave a reply



You can also:

Click here to reply using email Reply by email Send a webmention Send a Webmention



Close