Hammock Driven Development
🏝️

Hammock Driven Development

I sometimes enjoy playing my 88-key weighted digital keyboard, even though I wouldn't consider myself a pianist. During one of my play sessions, I came across a challenging piece that I knew how to play in terms of which notes and in what order. However, my fingers seemed to resist following my mind's instructions. Eventually, I began failing to perform previously mastered segments, leaving me frustrated and tired.

I abandoned the keyboard in defeat. A few days later, I decided to try again. Surprisingly, the notes flowed easily from my mind to the keys! It was astonishing how effortlessly my body and mind worked together and how much calmer my thoughts were. Although I had experienced this before, it was remarkable how quickly my proficiency had developed without realizing it.

I experience a similar paradox in computer programming. The solution to a coding problem can prove elusive until it becomes clear through sudden inspiration. This experience is so common that Rich Hickey, the creator of the Clojure Programming Language, coined the term "hammock driven development" during his talk at Clojure Con[1] to describe a problem-solving and software development approach that exploits this effect. The approach encourages deeply contemplating and thoroughly understanding a problem before writing code. Instead of rushing into the "doing" phase of work, Rich suggests spending time on the "thinking" phase. This approach helps unlock insights that make completing the task easier.

During the "doing" phase of work, we actively engage both body and mind. Our minds generate ideas and concepts, and we consciously interact with them. We may experiment or prototype to produce more ideas or refine the ones we already have. In this phase, we may find ourselves stuck and believe we must do more to find a solution. The world widely recognizes paragons of productivity as those dedicated to keeping their nose to the grindstone; but lived experience, especially in the creative world, begs to differ.

Now consider the "thinking" phase of problem-solving. In this phase, we offload our problem-solving to subconscious brain processes. This less understood phase is where hammock driven development occurs. Despite what the name might suggest, hammock driven development is more than relaxation and doing nothing. Relevant information must be presented to the subconscious, followed by an intentional rest period to allow the subconscious to work.

Neuroscientists attempt to explain this phenomenon by measuring unconscious brain activity that happens when we intentionally stop thinking about a problem. They have even shown that it leads to better problem-solving outcomes.[2] Despite the mysteries of our minds, let us take advantage of these periods of reprieve to enter prayer and avoid the vanity of our efforts without divine blessing. Taking deliberate breaks during work is essential; it helps to maintain a balance between toil and leisure. Perhaps God exemplifies this notion perfectly when he rests on the seventh day of creation.

Unless the Lord builds the house, those who build it labor in vain. Unless the Lord watches over the city, the watchman stays awake in vain. It is in vain that you rise up early and go late to rest, eating the bread of anxious toil; for he gives to his beloved sleep.

Psalm 127:1-2

Revised Standard Version Catholic Edition

[1]: https://www.youtube.com/watch?v=f84n5oFoZBc

[2]: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3831563/