How I Build Software: Productivity Patterns
Developing software requires strong creative and analytical problem solving skills. If you want to deliver the best software systems humanly possible, you need to play by your brain’s rules to excel at both these types of thinking.
Through my education in psychology and my personal experiments I’ve isolated the conditions and patterns I believe are most conducive to me being creative and analytical.What works for me ranges from the obvious: taking regular breaks, to the less common: doing house chores or not coding for 3 hours because I simply don’t don’t want to.
Please keep in mind that what follows is what I believe works best for me. Also, any psychology referenced is used to support my beliefs, but does not prove them.
Having a Nap or Doing Housework for Creativity
Most people would agree that taking a break from the task they are working on means they come back rejuvenated and ready to finish the job off. But I doubt many people feel that taking a break makes them more creative — meaning they can find ways to solve a problem that previously they couldn’t think of.
I use breaks to great affect where possible — particularly when I’m at home and free to get my mind in the right place.
If I’ve got an important design decision or I’m completely stuck on a problem, one of my favourite tricks is to go for a long walk, do some work around my home (put some clothes in the wash etc), or visit the park and take inspiration from nature. But my ultimate creativity booster… a cosy afternoon nap.
Whilst I’m away from the computer I’ll nearly always have ideas to solve my problem or help me make progress. Usually I’ll need to take breaks of 2 hours or more, while often I will require multiple extended breaks in a day for optimal creativity — I spend less time working, yet move a lot closer to my goals.
Some Psychological Research Supports This
Cognitive psychologists have done much research around problem solving. There is agreement amongst many of them that the mind has at least two modes of thinking — creative and analytical. You can be in one of these modes at a time, and it takes and switching between them can take time [1].
Creativity is said to involve having an “aha” moment, whereas analytical is more akin to re-arranging pieces of a puzzle. Here’s a more academic definition [1]:
Creativity involves linking ideas previously seen as unrelated. The creative thinker must attend to elements that are relevant to the current problem while recording seemingly irrelevant information that may lead to insight. Thus, creative thinkers should use peripherally presented cues effectively. Good analytic thinking should be characterized by sustained directed attention because solutions to analytic problems require focus on the problem elements.
To clarify, creativity requires broad thinking about many diverse things, whilst analytical requires deep and narrow focus on just a few.
Now think about doing house chores, or going for a walk — your thinking becomes more broad as thoughts enter your mind so drastically different than the programming task you were stuck on. In-line with research [2] & [3] that is likely how you reach “aha” moments.
Sometimes it can take a long time — I’ll get away from the computer for hours and not think about anything tech related. At home I’m free to do this as I please, yet even when severely constrained by working hours, my lunch time trip to the gym has often been my most creative period of the day. Studies have certainly shown exercise may enhance creativity [4] & [5].
The science behind my afternoon nap being creative is that, again, sleeping causes you to think more broadly giving the mind more chance to “stumble” on creative solutions. Some research supports this as well [2].
Enhanced Analytical Skills With a Bit of Peace and Quiet, and a Pencil and Paper
When my problem is very specific, requiring lots of small steps to reach a certain goal, I need to maximise my mental state and environment for analytical thinking. Essentially, I need to be able to chain lots of small steps together whilst evaluating other potential solutions at the same time .
Being successful at this means being able to hold thoughts in your head and reason about them [6]. For me, this means all distractions are out — people moving and talking around me, phones ringing, in fact most visual or audible changes [7].
A distraction-free environment makes me more productive, but alone it still leaves me too reliant on my working memory. To string sequences of steps together and reason about them, there is little better then a pencil and paper to store intermediate steps I can return to if my mind goes blank.
Visualisation of problems is another strategy I use every day, again thanks to a pencil and some paper. I think of this like a game of chess — it’s much easier to play with a board and pieces than to talk using codes which require you to picture the whole layout of the game in your head… and reason about your next move.
I’m not fully comfortable or near optimal productivity when coding if I don’t have a bit of peace and quiet and a pencil and paper close by.
Two Flavours of Motivation Are Both Essential
I also need to be motivated to be productive — both in the long-term and short-term. Long-term means I need to have a reason to be doing it — “I’ll learn something, my employer will pay me, this is really exciting”.
Short-term — “this is a priority and I absolutely and I have to be doing it right now” — is just as important, too. I find short-term motivation is about being in the right mental state — up for a bit of coding, collaboration, or intense problem solving.
Being in the mood to code is less in my control, though. On personal projects, and outside of work, I only do it when I feel like it, yet I can still easily get at least 8 hours a day spread over a 24 hour period. For my employer there is less flexibility, due to official working hours, to get the job done around when I’m at peak productivity.
I have a simple way of measuring my short-term motivation– the easier it is to distract me, the less motivated I am to be getting the job done at that point in time.
No Compromise on Daily Exercise
If there is one type of activity that totally refreshes and re-ignites my mind for a bit of problem solving it is unquestionably exercise. During my free time I’ll fit multiple short sessions in during the day — anything from a jog to some stretches. I also make a habit of going to the gym during my lunch break every single working day — sometimes for weights others for intense cardio.
Coupled with a refreshing shower after a training session, there’s nothing that could put me in a better frame of mind for attacking all the technical and social problems an afternoon in the office can throw at me.
Office Constraints Slash My Productivity
There’s a strong contrast between how productive I am when I can control my environment and working hours, and when working constraints dictate that I must be in the distraction-heavy office.
Whilst it’s completely understandable the business enforces what it thinks will be most productive for them, I’d like to suggest that employers think more deeply about the freedom and constraints applied to their employees if they want more creativity and productivity — it’s one more opportunity to gain or lose competitive advantage.
Some benefits of enforced co-location are still important — pair-programming, knowledge and skill sharing, etc. But I’m not claiming to have all the answers — just showing you what works for me. My next employer offers a few days of remote working a week — I’m looking forward to seeing how it works out, and how I can gain maximum productivity from it. Maybe this compromise is closer to optimal.
In Summary
With full freedom over when, where and how often I’m allowed to take a nap, I estimate that I’m way more productive than I would have been if constrained by a noisy office, with lots of distractions, and inflexible working hours. This applies to two important types of tasks that software developers face — creative tasks and analytical tasks.
Some of the productivity patterns I talked about were regular exercise, extended periods of non-tech anything, and incredibly I recommended doing a bit of housework. Oh, and don’t forget a pencil and piece of paper.
I was cautious to point out that these are just my opinions, although some psychological research did support my claims. Caution was also used to insist that what works for me may not work for others. And I definitely implied that it’s difficult to balance all of the variables in a working environment to achieve optimum productivity.
References
[1] Difference between creative and analytical thinking — Creative and analytic thinkers differ in their use of attentional resources, Pamela I. Ansburg,1, Katherine Hill
Creativity
[2] Sleep improves creativity and problem solving — http://link.springer.com/article/10.3758%2Fs13421-012-0256-7
[3] Alcohol makes you more creative — http://www.sciencedirect.com/science/article/pii/S1053810012000037
[4] Exercise improves creativity — http://www.questia.com/library/1G1-83139929/creativity-interacts-with-fitness-and-exercise
[5] Exercise improves mood and creativity — http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1332529/
Analytical
[6] Working memory limitations affect analytical problem-solving ability — http://www.tandfonline.com/doi/abs/10.1080/135467899393977#.UevmZnWkg24
[7] Irrelevant speech disrupts attention (thus consuming working memory) — http://orca.cf.ac.uk/35439/