The Lone C++ Coder's Blog

The Lone C++ Coder's Blog

The continued diary of an experienced C++ programmer. Thoughts on C++ and other languages I play with, Emacs, functional, non functional and sometimes non-functioning programming.

Timo Geusch

5-Minute Read

Good programmers are supposed to be lazy, right? The way I interpret this statement - because none of the software engineers who I know could be considered lazy - is that we like to automate repetitive tasks. You know, tasks like checking if you’ve made any changes to your blog and then building the blog and deploying the changes automatically. Which is what I’ve done, and in this post I’ll show you my minimalist setup to do so.

Timo Geusch

2-Minute Read

Right, if you and your RSS reader can read this, the first stage of the migration of my blog to a static site has successfully completed and you’re now reading the new site. There’s still some more tweaking to do, but I broke it up into multiple milestones to minimise the overall risk of the migration.

The next steps are mostly under the hood, where I clean up some of the oily bits and make sure things are running well and keep running that way. The main work remaining is migrating all content to a new web server, which is just one VM size bigger than the current one. The server is running FreeBSD and uses ZFS, and ZFS benefits a lot from having as much RAM available as I’m willing to pay for. Plus, I’m using this as an excuse to script up the (re-)creation of the server via Ansible so it at least moves from “pet” status to “livestock” status.

Timo Geusch

4-Minute Read

One “biggie” that was holding up this blog’s migration to a static site was getting a comments system up and running, followed by importing the existing comments. I had picked Isso a while back as it allows for easy import of existing comments from WordPress. I really didn’t want to depend on a third party comment hosting service like Disqus. I also didn’t want to use Staticman, mainly because it has dependencies on other services like Github or Gitlab. So Isso it was as that allows me to host everything on my own server.

Timo Geusch

2-Minute Read

Now that I’ve got the static site up and running, it’s obviously time to switch over immediately, right? Not to fast. After QA’ing my deployment process in production, it was time to check how the two compared from a performance perspective. I like to use several different tests, starting with Pingdom, then using PageSpeed Insights for more details.

The Pingdom speed test gave it a thumbs up, but they’re not running the currently dominant search engine. Fortunately said search engine also offers performance check tooling. This wasn’t quite the thumbs up I had hoped for, though. While the mobile performance is similar - in other words, equally unimpressive - the desktop performance is pretty good for both sites. The WordPress site still has a slight advantages, but after some initial tweaks like disabling highlight.js (the static site uses the basic Hugo highlighter), the static site is pretty close.

Timo Geusch

4-Minute Read

Straight from the “make work for yourself because there aren’t enough hours in the day already” files.

I’ve mentioned before that I am self-hosting this blog rather than using a hosted instance. I hosted the WordPress instance on FreeBSD and it’s been running quite well for a while, but during a double FreeBSD port upgrade to WordPress 5.0.1 and PHP 7.2 – after the php 7.0 port had been discontinued – broke the blog. php-fpm failed regularly with a signal 10, but I wasn’t able to figure out why in a hurry, so I started looking at alternatives.

Timo Geusch

1-Minute Read

My apologies for the sudden instability of my blog. I’ve managed to make a hash of an update on the main Wordpress site when trying to update to a newer PHP version and had to switch to the Jekyll “backup” site that isn’t quite production ready yet.

Comments will be available in due course, at the moment I’m trying to get the static site fully functioning and the various RSS feeds going again.

Timo Geusch

2-Minute Read

Farewell, Digg Reader

Unfortunately, Digg announced that Digg Reader is shutting down tomorrow. While I never used Digg Reader as my main RSS feed reader – I’ve got a paid subscription to Feedly – I was very happy to use it as a backup reader for those feeds that weren’t always that great at adhering to the RSS feed standard (I’m looking at you, bringatrailer.com) as it was more forgiving when it parsed feeds. Unfortunately it appears to be another one of the “feed readers are dying” incidents that seems to have started when Google Reader was shut down. There weren’t really that many alternatives in the first place unless one wanted to self host.

Timo Geusch

2-Minute Read

I’ve been experimenting with converting this blog to Jekyll or another static blog generator. I’m sticking with Jekyll at the moment due to its ease of use and its plugin environment. The main idea behind this is to reduce the resource consumption and hopefully also speed up the delivery of the blog. In fact, there is a static version of the blog available right now, even though it’s kinda pre-alpha and not always up to date. The Jekyll version also doesn’t have the comments set up yet nor does it have a theme I like, so it’s still very much work in slow progress.

To export the contents from WordPress to Jekyll I use the surprisingly named WordPress to Jekyll exporter plugin. This plugin dumps the whole WordPress data including pictures into a zip file in a format that is mostly markdown grokked by Jekyll. It doesn’t convert all the links to markdown, so the generated files need some manual cleanup. One problem I keep running into is that the exporter dumps out certain UTF-8 character entities as their numerical code. Unfortunately when processing the data with Jekyll afterwards, those UTF-8 entities get turned into strings that are displayed as is. Please note I’m not complaining about this functionality, I’d rather have this information preserved so I can rework it later on. So I wrote a script to help with this task.

Timo Geusch

1-Minute Read

I switched jobs in October last year and getting up to speed in the new role did take priority over anything else, so I had to put a few other endeavours including this blog on hold for a little while.

The publishing frequency will still be lower than previously, but as I have moved from a mostly managerial role back to a pure software engineering role, I will be able to post more articles in line with the original intent of the blog, ie more C++-related articles and of course, the usual smattering of “look what cool feature I found in Emacs”.

Timo Geusch

2-Minute Read

Another metablogging post, but this may come in handy for people who like to produce blog posts in bulk and schedule them for publication in WordPress at a later date.

In my case, my ability to find time to blog is directly correlated to my workload in my day job. That’s why you see regular gaps in my posting that may last for a few weeks to a month or two.

Recent Posts

Categories

About

A developer's journey. Still trying to figure out this software thing after several decades.