Working remotely: A surfer’s guide

I never really know what to say when people ask me how I manage to make remoting work. The reality is, there are any number of ways it can be done. What works for me is a healthy obsession with riding waves.

Doing some napkin math with a friend, we figured I have spent about three hours actually standing up on a wave. That is seven years of surfing, two times a week, two hours in each session, and about ten seconds per session spent standing on a surfboard.

We (surfers) put in a lot of preparation around those ten seconds. Outside the two hours spent in the water, there is countless hours spent on transport, checking the forecast and preparing the gear. And mental surfing of course.

No one would surf if they were only in it for each 10-second-instance of joy. Ostensibly, there must be something else we get from the experience.  It’s the only way of making sense of the lengths we go to for the perfect session.

The same logic must apply to working remotely.

Working remote means I can find best waves available. This is my core motivation. My theory is that a strong motivation is what makes remoting work. I’m not saying that you need to be a surf addict – the motivation can come from anywhere!

Remote work is often more challenging than being in the office. Overheads around communication mean you need to put in an extra effort to be available and be a part of all the important discussions.

The counter of this is that remote work can be extremely beneficial for certain types of work. Tech writing, research and programming happen to be very easy to do while not in the office.  Because it is easier to communicate the wrong message when remote, a lot more effort goes into clarity of communication.

My inaugural remote office was the spare room of my flat in Hamilton. Raglan was a 45 minute drive.  I was surfing in perfect conditions while the typical crowds were relegated to boardrooms and worksites. The perfectly consistent green waves of Indicators and Manu Bay were my second office.

Manu Bay

Spending 8 hours a day alone in a home office can be isolating. Although it’s extremely rare to go more than 2 hours without pair programming or video-calling  a colleague, it can be difficult not having someone in the room to share the experience.  I had a lot more social energy with this change in routine. It created a new flow to the workday. At the end of the day I was always keen to meet a friend and use some social energy. This is something I struggle with when working in an office.

Indian Ocean perfection, arriving under an equatorial sun, breaking on a colourful reef drew me to spend two months working from South East Asia in 2016.

An iced coconut replaced morning coffee. I was surrounded by digital nomads. It is equal parts motivating and distracting being in the community. They have a lot of empathy for getting work done – it’s not uncommon to be up at 3am for client meetings. The people here play hard, but they work hard too. Everyone naturally understands that the key to this insane lifestyle is about keeping the work machine going.

So what makes it all work? A high level of motivation. The motivation can come from anywhere, but if you have that in place, and you can address surrounding issues, it is something that anyone can achieve.

Media Suite supports my surfing life. Extreme flexitime comes with higher standards of transparency and communication.  Sometimes, this means compromises such as working nights, weekends and weird hours. Without delivering results, this level of freedom will not work. The team, client and your colleagues all need to be onboard with your plans.

The future of work is remote. It is good for the environment, it is good for people, it is good for your organisation.

The Simulation Game

Recently, I read Alan Turing: The Enigma – a Turing biography by Andrew Hodges. While his whole life was pretty remarkable, one of the most important parts was his cryptanalysis work at Bletchley Park trying to crack the Enigma code.

In the book, there is a fair amount of detail about how the Enigma machines work. However, reading descriptions didn’t really help me understand the workings, so, because I like wasting my precious little free time, I thought I’d try to write a simulator using Javascript.

Me, deciding to write a simulator.
Me, deciding to write a simulator.

A bit of explanation: Enigma machines were used by the German armed forces to encrypt and decrypt their messages throughout World War 2. They look like this, which you might have seen already if you’ve watched The Imitation Game.

M4 Naval Enigma Machine
M4 Naval Enigma Machine

You’d configure the machine by turning the dials (rotors) at the top to the day’s code book settings and then start typing on the typewriter. When you hit a key, one of the letters above the typewriter keys would light up showing what that character is getting encrypted or decrypted to. It’s a simple electrical circuit that lights up a lamp but the path gets scrambled as the electrical signal passes through the rotors. Each rotor randomly connects an input letter to an output letter.

'Borrowed' from Wikipedia
‘Borrowed’ from Wikipedia

So the trick to the machines is that every time you hit a key, the rotors would shift (rotor stepping). The rightmost one would turn every key press and the others would click over every full revolution of the rotor on their right (think of a car’s odometer).

Once you’ve got your encrypted message you can send it over the radio to your buddy in a U-boat and he can rerun the process on the encrypted text, recreating the original message. The number of combinations that could be used in configuring the Enigma is so great that it would have been impossible to crack with any means available at the time – that is, even after understanding how the machine works and exploiting its flaws. However, due to mistakes machine operators made and slack operating procedures, messages were routinely broken throughout the war. Despite knowing that information was being leaked, German High Command put it down to more traditional means (spying). They considered the code unbreakable.

The Javascript Simulator

So, when simulating it, I first had to find the wiring for the rotors in the machines – lucky for me there is a lot of detail on the subject. I soon had some code for a rotor that could perform letter substitution for each of the rotor types, however the devil is in the detail and this is why building a simulator rather than reading about them helps to understand how they work.

In addition to the current position of the rotor (the Grundstellung or Ground Setting) there are a few more ways to increase the randomness of the system:

  • Wiring in the rotor can be offset (Ringstellung or Ring Setting).
  • The rotors can be removed and placed in different orders (Walzenlage or Wheel Order).
  • The reflector can be changed (Umkehrwalze or Reflector Wheel).
  • A plug board (Steckerbrett) can be used to perform another layer of letter substitution (Steckerverbindungen or Plug Connections).

Also the rotor stepping has some quirks (steps before substitution, turnover notch location(s), double-stepping, thin rotors). The ring settings and double stepping, in particular, took me a while to wrap my head around.
So, eventually I got it working reliably, with lots of testing against Louise Dade’s existing simulator. To get a flavour for the code here’s the function to read a letter in the machine and returning the substituted value.

So let’s see if it works! This is an actual Enigma message from WW2 run through the simulator.

OK, It looks like garbage, but hear me out
OK, It looks like garbage, but hear me out

So despite it looking like gibberish, this is the actual decryption. It’s hard to read because a) the Enigma doesn’t support punctuation or numbers, b) there are lots of abbreviations and shorthand, c) has a few typos, and d) it is in German. Conveniently, the site that provided the message also shows how it can be formatted into readable German and provides a translation.

Grand Admiral Dönitz succeeding Hitler, sent 1 May 1945
Grand Admiral Dönitz succeeding Hitler, sent 1 May 1945

Anyway, I’ve embraced my inner-geek and now know more than will ever be useful on how an Enigma machine works. My original idea was to build upon this and construct an interface using SVG that will allow you to see the machine and visualise the substitutions. I’m still keen to do this but for now it’s a hacked together jQuery/Bootstrap UI. Another idea is to try and build a simulator for the Bombe that Alan designed to crack the Enigma messages.


Try it out at

Umkehrwalze: C
Walzenlage: β III I IV
Ringstellung: L T A G
Grundstellung: X O K L
Stekkerbrett: DY, LG, PB


Find the code here: