gypsydave5

The blog of David Wickes, software developer

How to code (almost) everywhere

‘Always be coding’ was a piece of advice I was given early on when I was learning to be a developer, but it struck me today how incredibly easy it can be. The trick is to treat your computer like a newspaper or a novel. And the way to achieve this is to reduce the barriers (both mental and physical) that prevent you from writing.

With the requirements for a development environment being just a laptop - internet connection optional - you can start to hack on a problem anwhere you have access to a lap (preferably your own). That’s anywhere you can sit down.

The only other physical limiting factor is how fast you can take out and put away your laptop. Reducing the friction involved in starting (and stopping) coding not only increases the time you have to dedicate to it, it opens up new places you can code, and allows you to form interesting new habits. Essentially you will become able to code in quick, short bursts when that becomes possible.

I use a simple soft case by Plemo which has a pair of integrated carry handles. I usually stash the case and Mac in my backpack, but the handles help me carry it on its own for quick access if I know I’m going to be stopping and starting a lot - say when changing trains on a commute. The Mac wakes up from sleep in about 2-3 seconds.

This all means that I can dip in and out of coding with the ease of reading a newspaper when travelling, when waiting for someone, when grabbing lunch - it’s easy to pick up and put away in a matter of seconds. This means you can now code in shorter bursts - think of them as ‘microsessions’.

A side benefit of this is that you will spend (even) more time thinking about code when away from the keyboard. The gaps between each will be filled with thoughts about what you just did and what you will do next. It encourages an increased refection on your practice as a result of the natural pauses and interruptions that occur in life, and not the artificial ones that are generated by techniques like Pommodoro.

Try taking your laptop everywhere for a week and see what the shortest viable time to do something useful on it is. I’ve managed to get something worthwhile done between two stops on the tube.

(And if you can’t sit down you can always do some Clojure on your phone).