Blog

2025 in review

For a lot of people in tech, 2025 was a tough year. Mine was a mixed bag: a lot of good times with family, tempered by some significant work related stress1. Highlights 🏑 Converted part of the garage into a studio / home office. This means my partner and I now both have dedicated workspaces, instead of making do with the kitchen table or a desk in the lounge. 🏊 Swam 1600m unbroken. After struggling to find an exercise routine that wouldn’t aggravate my lower back and knee pain, I found swimming to be both enjoyable and restorative. I set an arbitrary goal of swmming 1600 meters non-stop and managed to hit it during my lay off from work. ⚑ Helped launch a couple of impactful new features at Evnex, including an integration with Amber Electric which allows customers to see the cost of the power they used to charge their EV based on real-time price data from Amber. πŸ‘· Achieved a longer term engineering goal of mine to remove gRPC from our stack at Evnex. Carefully replacing all internal gRPC calls with HTTP before removing the gRPC containers was good practice for getting large, long term engineering projects completed safely. Lowlights πŸ‘‹ I was let go from Evnex after nearly five years. πŸ” A stressful three month job search. πŸ€’ I spent almost five weeks in a row with a continuous series of colds that pretty much laid me out completely. Personal Family We spent New Year’s Eve with my partner’s family at the Marble Hill Campsite. We’d planned to be with my family in Nelson for Christmas day, but I picked up my third round of Covid shortly before we were set to leave and had to cancel the trip. I started testing negative on Christmas Eve, so we shortened and moved the trip to early January. We spent four excellent days with my parents, my sister and her family. I also managed a second weekend trip to Nelson later in the year.

Read more β†’

January 11, 2026

Build-time versus run-time costs

You have two axes to manipulate: build-time costs and run-time costs. The upper-right quadrant is the worst of all possible worlds. Most enterprise software lives here. The bigger and more dysfunctional the organisation, the more likely that they exist in this quadrant. In an ideal world, all software companies would operate in the lower-left quadrant. Things get built fast, and they cost next to nothing to run. Developers are happy, and the business is profitable, in theory if not in practice.

Read more β†’

January 3, 2021

How to set up a development environment for Elm with Docker

I'll do almost anything to avoid writing JavaScript. So I've recently started playing around with Elm, a purely functional language which compiles to JavaScript. If you haven't heard of it already, you should defintely check it out, it's neat. Elm already has some pretty nice tooling around it, but what makes it even nicer is that it's really easy to set up a development environment using Docker. This means when you inevitably run out of time to play with Elm, you won't have yet another language runtime hanging around on your machine to be cleared out when you next have the time (read as: never).

Read more β†’

August 1, 2016

How to mock a method so it returns the argument you pass it

While I was refactoring and adding tests for a pretty hairy method, I found that I wanted to mock out some methods on the object so that they just returned whatever value was passed into them. It turns out that's pretty easy to do, although it took me a little while to figure it out. To save you (and future me) the time, here's how. Given an instance [request]{.title-ref} with a method [complex_method]{.title-ref} which takes a single argument, replace [complex_method]{.title-ref} with a mock which returns the argument unchanged:

Read more β†’

March 23, 2016

CukeUp! AU 2015 Highlights

Recently I was lucky enough to attend CukeUp! in Sydney. It's the first time that the conference has been run in Australia, and I hope it's not the last. I really liked the format, with morning and afternoon talks bookending workshops which ran before and after lunch. Technical conferences can sometimes become a strange kind of spectator sport. The workshops really helped me get out of that mode and get engaged.

Read more β†’

November 30, 2015

Programming books I read in 2014

Practical Object Oriented Design in Ruby (Sandi Metz) This book was the best thing I read about software development all year. I had avoided reading it for a while because I'm not fond of Ruby, but decided to make a go of it after hearing Sandi speak on a couple of podcasts and conference talks she gave on the same topic. This book has made me much more conscious of the design decisions I make in my code, and how to write unit tests that are a help, not a hindrance. I'm looking forward to seeing how things evolve as I try to apply the techniques in production code.

Read more β†’

December 14, 2014

On mixins and the testing thereof

I make pretty heavy use of mixins when writing Django code. Mixins are great because they allow you to share common behaviour across disparate classes (and projects) with very little overhead. Class based views make heavy use of mixins, and I use them in a similar manner to compose views and forms that do a lot with seemingly little code. On the other hand, mixins can be terrible because they can make it difficult to figure out exactly what a class does and what methods it provides. This is the source of many complaints about class based views. I've found that after I got over the initial learning curve, this style of composition has proved very powerful, and well worth the additional complexity.

Read more β†’

August 10, 2014

Storing durations on Django models

I just released a package on PyPI: thecut-durationfield is a Django app that provides model and form fields for working with durations. The durations are stored as ISO 8601 compatible strings, and the model field returns dateutil.relativedelta objects. I've been using it for things like subscription models, where I want to figure out when a customer needs to be charged. The code is up on github, so take a look and if you have any problems, get in touch.

Read more β†’

August 10, 2014

On private and public interfaces in Python

In Sandi Metz's excellent Practical Object-Oriented Design in Ruby there's a section on creating explicit interfaces. Here, I attempt to translate Ruby's public, private and protected keywords to Python-land. According to Metz, these keywords "indicate which methods are stable and which are unstable" and also "how visible a method is". Python doesn't have any direct equivalent to these keywords. All attributes and methods on an object are accessible by any other object. (This can be both a blessing and a curse.) However, we do have a convention that allows us to follow the spirit of Ruby's private and protected keywords.

Read more β†’

March 9, 2014

How to make Django Debug Toolbar display when using Vagrant

Add the following to your development settings: INTERNAL_IPS = (127.0.0.1, 10.0.2.2) By default, Virtual Box sets up its networking such that all virtual machines networking goes through a gateway at 10.0.2.2. By default, Django Debug Toolbar will only be displayed if your IP is in the INTERNAL_IPS list.

Read more β†’

January 18, 2014