My Attempts at Website Optimisation and the Results

Having decided to move leepenney.com to a static site (using Hugo), I thought I would try and make a few improvements to help boost page loading times and share both my methodology and the results of what I did.

Measuring Progress

I decided to use three different services to track my progress:

  1. Google’s PageSpeed Insights
  2. Web Page Test
  3. GT Metrix

The site would remain on the original host, part of my package supplied by Vidahost, so DNS and server times should be consistent.

Round 1

Removing Unused CSS Styles

I started with a simple one: removing unused CSS styles from the stylesheet. You always end up with unused ones over time, more so in my case as I think I adapted it from a WordPress theme of some sort.

Method: I used the Audit tab in Chrome’s Developer Tools to do this. Continue reading…

Going Static with Hugo

One of the options, when I started looking around for an alternative to my home-brew blogging engine back in 2003/4, was Movable Type. It generated static files each time you hit publish. It was slow and seemed a little antiquated, so I opted for WordPress (then at version 1.2, which shows how long I’ve been using it) because dynamic was obviously the future.

Static is Back

There’s been plenty of noise about the re-rise of static sites lately, mainly due to Static Site Generators — software or engines that take content (often in Markdown format) and some templates and generates plain old HTML files.

There are a number of benefits to this approach that seem to be appealing:

  • You can host it anywhere, every web server and host supports HTML
  • Fewer security concerns to worry about
  • No upgrades to install
  • You can create process flow for versioning and deployment
  • You can write content in your favourite text editor
  • Speed

It’s not like static site generators went away, but with the growth of services that can now be delivered on the front-end (dynamic content, comments, etc) they’re re-emerging as an alternative for certain types of sites. Continue reading…

Reviving My Nexus 7

A while back I was lucky enough to receive a Nexus 7 (2012) as a Christmas present (read my review). I have quite a few tablets and this isn’t my daily driver, but it sits beside my bed as it’s handy to check emails or the weather when I wake up. It’s also great to catch a YouTube video or listen to some songs before settling down for the night. So it gets used every day.

It rarely ventures elsewhere in the house, let along out and about. I prefer the bigger tablets for those sorts of things. Still, it’s a handy addition. That’s why I was becoming a bit disillusioned with its performance.

It started out as super fast and snappy, as you’d expect. It’s a Google device so has got all of the OS updates. Over time it’s become not just slower but almost unusable. It was getting to the point that I was tapping icons multiple times because the delay was so long I didn’t think it had registered. Chrome kept crashing on me too.

I looked at the options to speed it up. Restarts didn’t work for long, if at all. It seemed absurd to simply  write it off and consign it to the rubbish pile. This isn’t an old device. In the end I knew I was going to have to look at a new ROM to help speed it up. Continue reading…

A New Desktop Build

A few months back, my desktop PC died. I had a birthday not too far away and I was struggling with present ideas, so I figured I could make do with a cobbled-together machine until then. Truth be told, I had been thinking about a new machine for a while, mainly because the old one kept hitting a brick wall, I think because of my obsession with keeping a lot of tabs open. So the collapse of the old one presented an opportunity.

My old mini-ITX build was doing the job other than that though. So I was looking at more RAM (my suspicion for the occasional hang-ups) and I also wanted it quieter. The old mini-machine was a little noisy.

Requirements

I tried to sum up my requirements and I came up with:

  • Quiet
  • Plenty of RAM
  • New SSD
  • Able to drive my 2560×1600 screen and a 1900×1080 second screen, with scope for 4K support in the future
  • Small form factor

I decided I could lose the optical drive.

My experience with my HTPC has taught me two things when it comes to noise:

  • The only silent things have no moving parts
  • A large enough (120mm) fan spinning slow enough may not be silent, but is largely inaudible

So I wanted passive if possible, with maybe a couple of case fans if necessary. Continue reading…

Introducing HA-Pen

In a previous post I wrote about my search for a cheaper home automation solution, where I explained how I used a Raspberry Pi and a cheap 433Mhz transmitter to control some RF sockets. I mentioned in that article how I was spurred to try again after reading about using the Pi-mote from a company called Energenie.

I wasn’t convinced I could get my simple transmitter working so, for the princely sum of £19.99, I ordered a Pi-mote starter kit as a backup. The kit comes with the Pi-mote (which you can buy separately) and a pair of RF sockets (which, again, you can buy separately).

Using the documentation on the Energenie site, and leaning on the work of the Pi Foundation’s Amy Mather, I was able to knock up a bit of Python to allow you to switch sockets on and off using the command line.

My existing home automation solution used a Telldus TellStick with a PHP web interface, which simply called a command line tool to toggle sockets on and off.

For reasons that are now lost to me, I decided to re-write that setup in Python, switch over to using the Pi-mote and integrate the calls into the app itself. I also improved the interface so you no longer needed to edit tables to add timers or sockets, moving everything into JSON config files for ease of reading and to lighten the overhead. It proved to be quite a journey, but finally HA-Pen was born.

HA-Pen web interface

The main interface of HA-Pen

Continue reading…