james mckay dot net
because there are few things that are less logical than business logic

Posts tagged: blog

Design refresh

I updated the design of my blog over the weekend.

My main goal was to switch back to a new, responsive version of my original blog theme, with its orange and blue colour scheme. Since the start of this year I’d been trying out a variety of off-the-shelf WordPress themes to give me a responsive (and therefore more SEO-friendly) design, but I was never really satisfied with any of them, so orange and blue is back, with its first major design refresh since 2011.

I’d thought that making it responsive would be a massive undertaking, but in the end of the day it only took me a couple of hours on Saturday morning. I was helped greatly in this by the fact that I was already using Less CSS as a pre-processor. I was also able to use Google’s mobile friendly test tool to quickly identify and fix the issues that needed fixing.

If you shrink the window down to below 400 pixels, you’ll see that that the text in the header starts to shrink with it to fit. I’d seen a few other sites do this, and it turns out to be very simple to implement, using a combination of media queries and viewport units. In case you’re interested, here is the Less CSS mixin that I’m using to achieve this:

.responsive-font-size(@size, @resize-below) {
    font-size: @size;
    @media screen and (max-width: @resize-below) {
        font-size: unit(@size * 100 / @resize-below, vw);

I’ve also restored my old blog posts, together with most of the comments and attached pictures, from a backup that I’d forgotten that I had. In the process of doing so, I’ve updated all the internal hyperlinks and image locations to point to https:// URLs on my blog; this was needed to eliminate mixed-content security warnings in the browser address bar on older posts that contained images. I achieved this quite simply and elegantly by using sed on the output of mysqldump to perform an appropriate find and replace before reloading. The exact command to use is left as an exercise for the reader.

Behind the scenes, I’ve moved it onto a $5/month 512MB DigitalOcean droplet. This is all you need for a blog that only gets a hundred or so hits a day, and a bit of load testing with Apache JMeter suggested to me that it should be able to handle a spike from Hacker News if necessary — apparently hitting the HN home page can get you about 6,000 hits an hour. I’ve scripted the server setup using Terraform and I’ve also got a couple of scripts to backup and restore the data. This means that I can tear down and rebuild it very quickly if need be, in accordance with the modern best practice of treating your servers as cattle rather than pets.

If you have any problems with it, or if anything doesn’t look right, please let me know. If you want to be reminded what the old version looked like, here are some archive.org snapshots for 2007, 2010, 2011, 2012, and 2016.

New blog on creation and evolution

In the past few months I’ve written a couple of posts here on my blog about my forays into the creation and evolution debate. However, since I’d rather keep this blog focused on subjects related to my professional work with software development, DevOps, and this Parliament-as-a-service startup that I’m working at, I’ve started up a separate blog to act as a brain dump for everything that I’ve learned about the subject over the past couple of years.

At the moment I’ve got it set to publish a new post every Monday every week through until September.

In case you hadn’t already figured out, my position on the matter is 100% evangelical Christian but also 100% old-earth. I’m sorry folks, but the earth simply isn’t six thousand years old, it’s as simple as that. The Bible does not require it, and the evidence does not support it and can not be re-interpreted to support it without descending into absurdity or dishonesty or both.

I’m generally tending to focus more on the physical sciences side of the debate — dating methods, geochronology, astronomy, and so on. Not being a biologist, I don’t tend to have much to say about evolution itself. Not unless you’re making claims about it that are blatantly clueless, such as that it’s “only a theory,” or that it contradicts the Second Law of Thermodynamics, or that mutations can’t produce new information, or that there are no transitional fossils, or silly straw man arguments about cats not turning into dogs. All I ask is that you make sure that you know what you are talking about, and that your facts are straight.


Over the past eight years or so, I’ve posted over two hundred entries here on my blog. Most of these are now out of date, many of them reflect approaches to software development that I no longer endorse, and some of them are outright embarrassing. In addition, some of them are pretty personal and I’m not that comfortable with having personal stuff posted on a public Internet site. I’ve decided, therefore, that it’s time for a reboot.

I’ve taken my blog offline on a couple of occasions in the past, but it’s never stayed offline for long, since some of my old posts are actually worth keeping and/or a good reference. So now I’m trying a different approach. I’ve unpublished all my blog posts to date, with a view, at some point in the next few months, if I get the time, to maybe going through them and re-treading (or rewriting) some of the content that I think worth revisiting. I may also write one or two new posts too, so watch this space.

However, I’m giving this a very low priority for now. I have a pet project that I’m trying to get off the ground, which is occupying most of my commuting time (when I’m not asleep on the train), and I have other things on my plate as well at other times. I’m also very conscious of one of the big risks of blogging: namely, being seen as something of a prima donna. In particular, if you are spending more time blogging about programming than working on your hobby programming projects, your priorities are totally wrong. For that reason, my more contentious and argumentative posts in particular are gone for good. There’s far too much of this kind of thing going on in the software development world and I don’t want to be a part of it.