good robots do what they're told

Refactoring in 10 Minutes

I recently created a free place online to collect training materials and videos around eXtreme Programming. I’m creating or curating a set of live workshops, check it out at

The first video on the site gives an introduction to refactoring and some examples in Java from chapter 1 of Martin Fowler’s book. The source code is on GitHub.

Type Classes in Scala

Type classes provide ad-hoc inheritance which means that we can use them to create polymorphic functions that can be applied to arguments of different types. This is a fancy way of saying that we can create common behaviour for classes without resorting to traditional (extends) polymorphism.

From the Neophytes Guide, Daniel Westheide describes type classes, slightly paraphrased, as follows.

Home Brew Temperature Logger

Using a Raspberry Pi Zero, some cheap components and some custom software, you can build a data logger to track ambient temperature in your home for around £10. Track days, weeks and months worth of temperature data and display some pretty graphs via the web.

'The "temperature machine" in action'

Pi Console Lead

Without an ethernet port, the Pi Zero doesn’t lend itself to being setup without a monitor and keyboard. This post shows how to configure your wifi using the Adafruit console lead without having to plug in a monitor or keyboard.

The Adafruit Console Lead uses the PL2303TA (a USB-to-serial/parallel converter chip) to talk to the Pi over GPIO pins 8 and 10 via USB. You can use this kind of USB to serial communication on plenty of devices but with the Pi, it’s handy to use the screen application to effectively open a “telnet-like” terminal to your Pi.

Pair Testing Doesn’t Work

Either when looking for work or looking to recruit, I’ve been doing pair tests in one form or another since 2008. I’ve only recently come to the conclusion that they just don’t work. At least not reliably.

I’m left wondering why we still use “pair tests” for recruitment. Is it to see how candidates problem solve? How they’d be to work with? The only way to assess these things is actually to do them. Pair tests are a poor simulation. If you want to see how someone works, work with them. Don’t pretend to work with them.

Easily Switch JDK on Mac

I have several versions of Java installed on my Mac. Trouble is, I can never remember where any of them are. So switching Java versions using the JAVA_HOME environment variable was always a pain. Then I discovered the handy java_home command.

/usr/libexec/java_home -V

It shows the Java versions are available and where there are. For example, on my machine, the output looks like this.