<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dominic Rodger</title><link>https://www.dominicrodger.com/</link><description>Recent content on Dominic Rodger</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><lastBuildDate>Fri, 08 May 2020 21:09:28 +0100</lastBuildDate><atom:link href="https://www.dominicrodger.com/index.xml" rel="self" type="application/rss+xml"/><item><title>Hugo Port</title><link>https://www.dominicrodger.com/2020/05/08/hugo-port/</link><pubDate>Fri, 08 May 2020 21:09:28 +0100</pubDate><guid>https://www.dominicrodger.com/2020/05/08/hugo-port/</guid><description>I&amp;rsquo;ve been getting tired of keeping my WordPress plugins up to date for the sake of some very old blog posts, so I figured it was time I switched back to a static site generator. Last time I did this, I used Pelican, this time around I&amp;rsquo;ve picked Hugo, mostly for the chance to play with a shiny new thing.
Migration wasn&amp;rsquo;t very complicated - I got most the way there by exporting my WordPress site as an XML file, and then this repo did most the heavy lifting.</description></item><item><title>On Library Closures</title><link>https://www.dominicrodger.com/2019/01/09/on-library-closures/</link><pubDate>Wed, 09 Jan 2019 09:31:33 +0000</pubDate><guid>https://www.dominicrodger.com/2019/01/09/on-library-closures/</guid><description>Update (July 2019) Essex County Council committed in July 2019 to not closing any libraries in Essex until at least 2024, see this news story.
Our local library, a short walk from our house, is closing. The local council is soliciting feedback, and at the end of a long series of questions there was a comments box. I thought I&amp;rsquo;d take the opportunity to write something. I imagine my words went into the void, so I&amp;rsquo;m sharing them here.</description></item><item><title>Let's Encrypt &amp; iTunes podcasts</title><link>https://www.dominicrodger.com/2016/02/29/lets-encrypt-itunes-podcasts/</link><pubDate>Mon, 29 Feb 2016 06:56:51 +0000</pubDate><guid>https://www.dominicrodger.com/2016/02/29/lets-encrypt-itunes-podcasts/</guid><description>Update (April 2018): Apple appear to have fixed this in late 2016 - see this article from feed.press.
Two podcasts I run have disappeared from the iTunes podcast store. After a few baffling evenings spent debugging a rather frustrating &amp;ldquo;Can&amp;rsquo;t read feed&amp;rdquo; error, it turns out the problem is fairly simple.
The iTunes Store&amp;rsquo;s support for SSL is a bit disappointing, to say the least. To get a podcast into the iTunes store, you need to make sure your SSL set-up is supported by Java 6.</description></item><item><title>Managing nginx configuration files</title><link>https://www.dominicrodger.com/2016/01/22/managing-nginx-configuration-files/</link><pubDate>Fri, 22 Jan 2016 21:12:40 +0000</pubDate><guid>https://www.dominicrodger.com/2016/01/22/managing-nginx-configuration-files/</guid><description>I run quite a few websites now, and I decided it was probably time I stopped editing nginx configuration files on the server, reloading nginx, and seeing what happened. I came across a post from Tyler Gaw, which explained a setup fairly close to what I wanted. My setup&amp;rsquo;s a little different, so I thought I&amp;rsquo;d write about how I got it working.
First off, I put this line in the http block of /etc/nginx/nginx.</description></item><item><title>nginx &amp; letsencrypt.sh</title><link>https://www.dominicrodger.com/2016/01/14/nginx-letsencrypt-sh/</link><pubDate>Thu, 14 Jan 2016 22:25:11 +0000</pubDate><guid>https://www.dominicrodger.com/2016/01/14/nginx-letsencrypt-sh/</guid><description>I&amp;rsquo;ve started using Let&amp;rsquo;s Encrypt a lot, for all my domains in fact. Previously, I&amp;rsquo;ve been using letsencrypt-auto, and stopping my webserver every time I want to renew a certificate. This is probably fine (all the sites and domains I run are low traffic, and can afford to be down for 30s or so when certificates need renewing every few months), except a flaw in my process for renewing certificates meant I took my webserver down for 12 hours or so.</description></item><item><title>Setting up Digital Ocean to run WordPress</title><link>https://www.dominicrodger.com/2016/01/04/digital-ocean-and-wordpress/</link><pubDate>Mon, 04 Jan 2016 19:50:43 +0000</pubDate><guid>https://www.dominicrodger.com/2016/01/04/digital-ocean-and-wordpress/</guid><description>I&amp;rsquo;ve recently started launching WordPress sites - starting with Talitha, and now this site. In my haste to move a few sites that seemed like they&amp;rsquo;d work better as WordPress sites, I appear to have over-loaded my single Digital Ocean droplet, so it&amp;rsquo;s time to spin up a new one.
As ever with Digital Ocean, they have an incredibly good tutorial on setting up WordPress on Ubuntu1, but since I like automating things, I thought it was worth recording the steps I took (partly for my reference).</description></item><item><title>Moving away from Cloudflare</title><link>https://www.dominicrodger.com/2016/01/01/moving-away-from-cloudflare/</link><pubDate>Fri, 01 Jan 2016 15:58:26 +0000</pubDate><guid>https://www.dominicrodger.com/2016/01/01/moving-away-from-cloudflare/</guid><description>I was a very happy user of Cloudflare for a year or so, primarily after hearing about Universal SSL, following a failed attempt to get an SSL setup which SSL Labs approved of. I felt uneasy about it - it seemed like I was intentionally MITM&amp;rsquo;ing all my sites by passing them through Cloudflare&amp;rsquo;s network.
Whilst I trust Cloudflare1, I didn&amp;rsquo;t like the idea that they could (if they wanted) take a look at every authentication attempt on my site.</description></item><item><title>Travis and tox revisited</title><link>https://www.dominicrodger.com/2015/04/14/tox-and-travis-revisited/</link><pubDate>Tue, 14 Apr 2015 06:00:00 +0000</pubDate><guid>https://www.dominicrodger.com/2015/04/14/tox-and-travis-revisited/</guid><description>Two years on, and I still love the combination of tox and Travis. I still write changes to my tox.ini and .travis.yml files separately, despite having written a tool for this. It occurred to me yesterday that there was a better way of writing this now - since tox now has a command for listing out what environments are set up (something which I think didn&amp;rsquo;t exist when I wrote the original Python script).</description></item><item><title>Prototyping with staticjinja</title><link>https://www.dominicrodger.com/2014/06/14/staticjinja/</link><pubDate>Sat, 14 Jun 2014 20:52:00 +0000</pubDate><guid>https://www.dominicrodger.com/2014/06/14/staticjinja/</guid><description>I&amp;rsquo;ve started building a website for a friend of mine, who works for an organisation called Talitha.
I wanted to get something up and running quickly (since I figured a website was better than no website), so I just started playing with Bootstrap. From there, I had an idea of what I wanted the site to look like, and all was well. I threw up a single page site that introduced the organisation a little bit.</description></item><item><title>Firefox &amp; Bootstrap 3 Glyphicons</title><link>https://www.dominicrodger.com/2014/01/19/firefox-bs3-glyphicons/</link><pubDate>Sun, 19 Jan 2014 18:09:00 +0000</pubDate><guid>https://www.dominicrodger.com/2014/01/19/firefox-bs3-glyphicons/</guid><description>I&amp;rsquo;m currently working on a site which uses Bootstrap 3, and makes significant use of glyphicons. As of Bootstrap 3, glyphicons are back to being web-font based. They look fine in Chrome (which is my main desktop browser), and in Safari on iOS, but I recently noticed they didn&amp;rsquo;t work on my Android phone.
Initially, I thought it might be an Android problem, but then I spotted that they didn&amp;rsquo;t work in desktop Firefox either.</description></item><item><title>Easy testing with Travis and tox</title><link>https://www.dominicrodger.com/2013/07/26/tox-and-travis/</link><pubDate>Fri, 26 Jul 2013 06:20:00 +0000</pubDate><guid>https://www.dominicrodger.com/2013/07/26/tox-and-travis/</guid><description>I love tox - it&amp;rsquo;s a great tool for checking that your Python packages are installable, and that you support all the various configurations of Python versions and other package versions that you think you do.
It&amp;rsquo;s also quite a neat way of checking your documentation builds properly, and that your code remains PEP 8 compliant1.
I also love Travis, since it helps me accomplish much the same thing as tox, but does so in an automated way, with every push.</description></item><item><title>Using code coverage to find bugs</title><link>https://www.dominicrodger.com/2013/05/20/coverage/</link><pubDate>Mon, 20 May 2013 16:50:00 +0000</pubDate><guid>https://www.dominicrodger.com/2013/05/20/coverage/</guid><description>Yesterday, I found two bugs whilst looking at a code coverage report.
I tend to think that shooting for 100% code coverage adds unnecessary overheard - often the last few percent doesn&amp;rsquo;t give you much benefit, and takes a disproportionate amount of time to reach, but it&amp;rsquo;s useful to at least understand why particular lines of code aren&amp;rsquo;t hit by your tests. Perhaps those lines are dead code, or perhaps - as was the case for me yesterday - it&amp;rsquo;s because your code is broken.</description></item><item><title>Turtles all the way down</title><link>https://www.dominicrodger.com/2013/05/01/turtles/</link><pubDate>Wed, 01 May 2013 19:19:00 +0000</pubDate><guid>https://www.dominicrodger.com/2013/05/01/turtles/</guid><description>One of the programming lessons I find myself re-learning again and again is this:
It&amp;rsquo;s turtles all the way down 1.
When I first started my current job, just after graduation, I was working in a frontend development rôle. The app I was working on involved storing customer data in a proprietary database system, and from time to time, I&amp;rsquo;d get stuck.
Perhaps data wasn&amp;rsquo;t being saved in the way I expected, or perhaps operations on the database were slow in ways I didn&amp;rsquo;t expect.</description></item><item><title>Installing PIL on 64-bit Ubuntu</title><link>https://www.dominicrodger.com/2013/04/21/pil-64-bit/</link><pubDate>Sun, 21 Apr 2013 20:30:00 +0000</pubDate><guid>https://www.dominicrodger.com/2013/04/21/pil-64-bit/</guid><description>I&amp;rsquo;ve just got a new laptop, and wanted to avoid messing around with symbolic links in order to install PIL in a virtual environment. I&amp;rsquo;ve just discovered patch, and thought I should automate my process of installing PIL (a process which previously involved me making a trivial edit to the setup.py file).
This is obviously not particularly revolutionary, but I thought it was quite neat, so thought I&amp;rsquo;d share it. The script (which is just bash) looks like this:</description></item><item><title>Bulk Upgrading Django Sites</title><link>https://www.dominicrodger.com/2013/03/30/upgrading-django/</link><pubDate>Sat, 30 Mar 2013 10:32:00 +0000</pubDate><guid>https://www.dominicrodger.com/2013/03/30/upgrading-django/</guid><description>A new version of Django was released a couple of days ago. I&amp;rsquo;m currently at 11 sites using Django, so upgrading them all manually (which I did last time) is a pain.
To help me out, I wrote a tiny Fabric script to spin through my sites, check if they&amp;rsquo;re using the version of Django that was upgraded, and if they are, upgrade them.
Simple Sites It&amp;rsquo;s worth noting that this only works because all of my sites are fairly low traffic, and I don&amp;rsquo;t mind too much just taking them offline for a minute or two.</description></item><item><title>Using a local cache for pip packages</title><link>https://www.dominicrodger.com/2013/03/11/local-pip-cache/</link><pubDate>Mon, 11 Mar 2013 22:47:00 +0000</pubDate><guid>https://www.dominicrodger.com/2013/03/11/local-pip-cache/</guid><description>I do a lot of development without an internet connection1, so being able to install packages into a virtual environment without a connection to PyPI is pretty useful.
I&amp;rsquo;ve got a couple of aliases in my .bashrc which help with this2:
alias pipcache='pip install --download ${HOME}/.pip-packages' alias pipinstall='pip install --no-index --find-links=file://${HOME}/.pip-packages/' The first downloads the packages to my local cache, the second installs them from the cache.
Usage is probably fairly obvious:</description></item><item><title>Automated Deployment of Django Sites</title><link>https://www.dominicrodger.com/2013/02/03/automated-deployment/</link><pubDate>Sun, 03 Feb 2013 20:43:00 +0000</pubDate><guid>https://www.dominicrodger.com/2013/02/03/automated-deployment/</guid><description>I tried out Fabric a while ago, but never really got anywhere with it.
Time passed, and I forgot it existed, and wrote my simple scripts for automating deployment of my various sites, using Paramiko. It was incredibly tedious, but meant I could deploy my sites from whatever computer I was on, provided I had a checkout of my code.
Then I re-discovered Fabric, and realised I was about to throw away a lot of code.</description></item><item><title>Supporting Markdown in upcoming Django releases</title><link>https://www.dominicrodger.com/2013/01/16/django-markdown/</link><pubDate>Wed, 16 Jan 2013 18:48:00 +0000</pubDate><guid>https://www.dominicrodger.com/2013/01/16/django-markdown/</guid><description>Upcoming releases of Django will remove django.contrib.markup, but I still want to use it. I looked around for alternatives (perhaps a third party app?), before deciding to roll my own.
Here&amp;rsquo;s why:
It&amp;rsquo;s ridiculously easy. It means I can enforce which extensions are turned on[1. I always enable nl2br, which makes newlines act like newlines. Generally, most users of my sites are non-technical, and find &amp;ldquo;end a line with two spaces for a linebreak&amp;rdquo; confusing.</description></item><item><title>Forays into Responsive Design</title><link>https://www.dominicrodger.com/2012/12/26/responsive-beginnings/</link><pubDate>Wed, 26 Dec 2012 20:09:00 +0000</pubDate><guid>https://www.dominicrodger.com/2012/12/26/responsive-beginnings/</guid><description>A good friend of mine alters cards for Magic: The Gathering for fun and profit. Previously, he posted them on his Twitter feed, along with a brief description, but that doesn&amp;rsquo;t provide a great way of seeing at a glance the sort of things he does - a place to point people who ask for examples of his work.
Initially, I suggested Flickr, but it didn&amp;rsquo;t do quite what he wanted.</description></item><item><title>Moving to Ubuntu for mobile development</title><link>https://www.dominicrodger.com/2012/07/09/ubuntu-netbook/</link><pubDate>Mon, 09 Jul 2012 16:46:00 +0000</pubDate><guid>https://www.dominicrodger.com/2012/07/09/ubuntu-netbook/</guid><description>My web-development office is a fast-moving place.
It averages around 50 miles per hour, and I work on a laptop normally squished between two people on the train to and from the office.
When I happen to have a spare moment to build websites at home, I tend to use my desktop, which is running Ubuntu. I do my editing in emacs, where I&amp;rsquo;ve gradually got things set up more or less as I like them.</description></item><item><title>Avoiding database queries with Haystack</title><link>https://www.dominicrodger.com/2012/07/05/order-n-haystack/</link><pubDate>Thu, 05 Jul 2012 16:20:00 +0000</pubDate><guid>https://www.dominicrodger.com/2012/07/05/order-n-haystack/</guid><description>Order(n) is a pretty bad idea. Originally, my SearchIndexes for Haystack looked a bit like this:
class RegularEventIndex(indexes.SearchIndex): text = indexes.CharField(document=True, use_template=True) Then, when someone ran a search, and I wanted to display a result, I&amp;rsquo;d load up a template (which template I loaded depended on grabbing the model name, as recommended in the docs), and any attributes of the model I wanted to display required doing a database lookup to fetch the data, like this:</description></item><item><title>Faster Django Tests</title><link>https://www.dominicrodger.com/2012/06/10/faster-django-tests/</link><pubDate>Sun, 10 Jun 2012 06:11:00 +0000</pubDate><guid>https://www.dominicrodger.com/2012/06/10/faster-django-tests/</guid><description>A long while ago, I discovered that running Django tests is much faster if you use SQLite, and if you turn off South (this now seems pretty obvious, but at the time was a bit of a revelation to me).
Since then, I&amp;rsquo;ve come across a better way of setting this up, to avoid having a test_settings.py:
# If manage.py test was called, use SQLite import sys if 'test' in sys.</description></item><item><title>Travis, You Are Awesome</title><link>https://www.dominicrodger.com/2012/04/29/travis-you-are-awesome/</link><pubDate>Sun, 29 Apr 2012 11:27:00 +0000</pubDate><guid>https://www.dominicrodger.com/2012/04/29/travis-you-are-awesome/</guid><description>I came across Travis CI this week, and it&amp;rsquo;s awesome.
I&amp;rsquo;ve got a bunch of tests for django-magazine, but I&amp;rsquo;m not very good at running them. It turns out that unit tests aren&amp;rsquo;t very useful if you don&amp;rsquo;t run them, so I wanted to make sure that every time I pushed code to it, the tests run. Enter Travis CI.
Easy Unit Testing for Reusable Apps django-magazine is a reusable app - that is, it doesn&amp;rsquo;t ship with settings files, so you can&amp;rsquo;t run its tests just after installing it[1.</description></item><item><title>I Know Nothing</title><link>https://www.dominicrodger.com/2012/04/20/i-know-nothing/</link><pubDate>Fri, 20 Apr 2012 21:52:00 +0000</pubDate><guid>https://www.dominicrodger.com/2012/04/20/i-know-nothing/</guid><description>See, I know nothing! — Manuel
I distinctly remember being 17 years old, I&amp;rsquo;d just finished re-launching a site for a charity I was involved with1, and I confidently declared that I knew all there was to know about building websites. And I believed it.
At the time, I was building sites in PHP, and like every other 17 year-old learning PHP, I&amp;rsquo;d built entirely my own system for managing the site.</description></item><item><title>Getting Better at Testing</title><link>https://www.dominicrodger.com/2012/04/12/getting-better-at-testing/</link><pubDate>Thu, 12 Apr 2012 18:18:00 +0000</pubDate><guid>https://www.dominicrodger.com/2012/04/12/getting-better-at-testing/</guid><description>I started with unit testing about 4 years ago. I started writing what were probably integration tests, when I was working on the database backend of our application. The tests I wrote were designed to make sure that our process which saved data actually saved data.
Saving data involved creating a document, calling save on it, which would save it in the file system-based database, which would hit the file system.</description></item><item><title>Starting with Pelican</title><link>https://www.dominicrodger.com/2012/04/07/starting-with-pelican/</link><pubDate>Sat, 07 Apr 2012 08:39:00 +0000</pubDate><guid>https://www.dominicrodger.com/2012/04/07/starting-with-pelican/</guid><description>In about 1998, I was building a website for a friend. The site was entirely static. I&amp;rsquo;d already learned the hard way about the pain of trying to keep lots of separate static HTML files visually consistent.
To build the site, I used a system (whose name has since faded from memory) which took as its input some template files, some files containing the content, and combined them together to build a website.</description></item><item><title>Starting Over</title><link>https://www.dominicrodger.com/2012/04/07/starting-over/</link><pubDate>Sat, 07 Apr 2012 06:58:00 +0000</pubDate><guid>https://www.dominicrodger.com/2012/04/07/starting-over/</guid><description>Every once in a while, I want to start again.
I currently have 6 different sites using Kaléo, a bit of software I wrote for managing Church websites, which I&amp;rsquo;ll write about another time. The code is stored in a private git repository, and synced out to 6 different places every time I need to make a change.
Most these changes are fairly simple, and upgrading each site looks roughly like this:</description></item><item><title>Test-Driven Development with Django &amp; South</title><link>https://www.dominicrodger.com/2011/01/11/test-driven-development-with-django-south/</link><pubDate>Tue, 11 Jan 2011 00:00:00 +0000</pubDate><guid>https://www.dominicrodger.com/2011/01/11/test-driven-development-with-django-south/</guid><description>I&amp;rsquo;d basically given up on attempting test-driven with Django, given the project I&amp;rsquo;m currently working on uses models with a lot of South migrations. Just building the database and running the migrations could take a minute or so when running manage.py test, and resetting the database to a clean state meant the test suite would take several minutes to run.
I&amp;rsquo;ve had an idea in the back of my mind for a while, and today I finally got around to making it work.</description></item><item><title>About</title><link>https://www.dominicrodger.com/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.dominicrodger.com/about/</guid><description>I&amp;rsquo;m Dom - I&amp;rsquo;m a professional C++ programmer, Python dabbler, and dad to four children.
This blog is mostly me occasionally writing up my experience of re-publishing this blog in another format.
I&amp;rsquo;m a Christian - I go to Central Baptist Church in Chelmsford, where I help run the website, and help run kids&amp;rsquo; groups.
You can find me on GitHub, or on Twitter as @dominicrodger.</description></item></channel></rss>