Caro's weblog

My hammock must contain yarn

I often need reminding that sometimes the best way to solve a problem is to step away. Just let the ideas sit in the back of my brain, churning away, or actively ruminating on them without actually being at my keyboard writing code (or indeed blog posts!). Or, as Rich Hickey put it1, spend some time in my "hammock".

The perfect hammock time for my brain, the activity that best facilitates the kind of productive mind-wandering I'm looking for is spinning. No, not the kind on an exercise bike, the kind where I make yarn! Knitting something simple can also work, any kind of crafting with just the tiniest level of brain engagement, moving my hands in a predictable, rhythmic way. Something that takes enough concentration to keep me awake while background processing. Unlike Rich, I don't often have the time to take a full sleep to come up with an answer, but nor do I work on problems at anything like the scale of designing a programming language!

There's a fairly predictable sequence of things that go into thinking around a problem for me. I'll start with a whole bunch of reading on and around the problem, probably far more than I really need. I'll then get overwhelmed with the amount of conflicting information, tradeoffs and choices I've come across. At some point later, I (or a colleague or my partner) will notice that I've been banging my head against the keyboard, and I'll go take some "hammock time".

Hammock time starts with thinking about nothing, just calming down and doing things with my hands, letting my brain disengage a bit. My thoughts will stay quiet for a bit, while (I assume?) I'm consolidating all the inputs I had about the thing I'm stuck on2. Then, my inner monologue will have a debate about the pros and cons of all the options, how they fit with what my needs and skills are and the like. Eventually, that will quieten down, and I'll be able to get back to working with a much clearer idea of how to make progress, and a much calmer and more focussed mind.

This whole sequence might take an hour or two, or a day or more. I'm very lucky that my work situation usually allows for me to take this kind of time for deep thinking and understanding, but I wish I was better at noticing when I need to take hammock time rather than staring at my screen and being confused.

I guess it's more common to see this kind of problem-solving pattern with a nap, walk or shower in the middle, but crafting with yarn works best for me. But hey, if I run into a particularly tricky problem, I might just get an accidental pair of socks along with a deeply-considered answer.


  1. in his talk "Hammock-Driven Development" from ClojureConj 2010. I'd highly recommend watching this talk on YouTube. It is somewhat legendary in the Clojure community, but great for anyone wanting to think more about approaches to problem solving in software development.↩︎
  2. usually, or hopefully. Sometimes, my brain will decide it's solving a different problem from yesterday or last week, then I'll pick up that strand of thinking and make progress there if deadlines allow.↩︎

This post brought to you by the (difficult to acquire) Oiseaux de Nuit by Duo Tanghe Coudroy, from 2010, the same year as Rich Hickey's talk.

Discuss on Mastodon