How To Be More Productive
Every programmer works to a deadline. Whether it’s for your own company or another’s, getting more done in less time will help to make those deadlines less stressful (even profitable). A productive programmer has greater opportunity to learn, experiment and complete tasks more frequently than their peers, which will increase their potential to become a better programmer.
In order to achieve more (in less time), work processes can be optimised. This includes helping your brain physically, better time management, and learning to operate the tools of the trade faster, more efficiently and more accurately. These are in stark contrast to procrastination, fear of failure and other obstacles that the brain can put in front of a task. It is possible to fight against these barriers, but it requires discipline.
To be able to concentrate for a considerable time is essential to difficult achievement.
The brain operates poorly on little sleep. Various manic frenzies of energy, “second wind” and caffeine-drenched keyboards aside, being well rested is essential. Having sufficient sleep leads to being more productive, solving problems faster and more accurately, and greater memory retention.
There are many unanswered questions regarding both the functions of sleep and the effects of sleep loss. Sleep is considered to be important to body restitution, like energy conservation, thermoregulation, and tissue recovery. In addition, sleep is essential for cognitive performance, especially memory consolidation … People who are exposed to sleep loss usually experience a decline in cognitive performance and changes in mood.
The first component [of mindfulness] involves the self-regulation of attention so that it is maintained on immediate experience, thereby allowing for increased recognition of mental events in the present moment. The second component involves adopting a particular orientation toward one’s experiences in the present moment, an orientation that is characterized by curiosity, openness, and acceptance.
Downtime is essential - working constantly will take a toll on the mind and body. The ability to detach from the stress of work will not only allow more time for leisure and relaxation, but will also increase focus.
One of the methods that can aid “detachment” from work is mindfulness - a modern psychological concept removed from its Buddhist spiritual roots. Mindfulness can be found in any reflective (rather than reactive) activity: meditation, yoga, prayer etc.
Meditating daily, or in response to stress during the day, can increase focus and improve stress-tolerance.
Emerging research shows that physical activity sparks biological changes that encourage brain cells to bind to one another. For the brain to learn, these connections must be made; they reflect the brain’s fundamental ability to adapt to challenges. The more neuroscientists discover about this process, the clearer it becomes that exercise provides an unparalleled stimulus, creating an environment in which the brain is ready, willing, and able to learn.
Dr. John Ratey, Spark
Adding exercise to a daily routine has many oft-cited benefits, although mental agility is not commonly among them. The work Dr. Ratey has done in identifying positive mental changes caused by exercise has applications in attention, stress, and anxiety. My experience with adding morning exercise to my routine has been staggering - I find focus and concentration are more easily available.
30 minutes of exercise in the morning will kickstart the brain - however you should seek medical advice before beginning an exercise program.
Maintaining an exercise regime requires putting the right fuel into the body, and ensuring the brain is alert is no different. In order to maintain healthy brain function you must have the correct balance of vitamins and minerals. This is likely to be specific to the individual, and a dietician should be consulted before any radical changes are made.
There is broad disagreement on the veracity of various suppliments on the brain. I have found benefit from Omega 3 capsules (the oil can vary wildly in quality - find an impartial review before purchasing), Osteocare, and an occasional multivitamin. I find this combination to help fend off minor illness as well as increase concentration.
Eating regular small meals or snacks (without bingeing) will help to prevent blood sugar levels from peaking and troughing at meal times: this avoids the postprandial drowsiness that haunts most offices after lunch.
Eating healthily and regularly will support a sensible exercise routine and help to prevent lethargy.
Water is essential to brain function efficiently - dehydration impairs concentration and can impair short-term memory, as well as detracting from the overall operation of the body.
Drink at least 2 litres of water a day to feel a difference. This can be reduced in the presence of a lot of caffeinated drinks, but not replaced.
Caffeine powers the Western economies - not by taxation, but as the fuel for the workforce. Too much caffeine can lead to frenzied bursts of productivity contrasted sharply with less productive troughs, and drinking caffeine up to 8 hours before bed could adversely affect sleep.
Coffee and tea aid hydration but should be used in moderation, as dependency can be counterproductive.
Nothing is so fatiguing as the eternal hanging on of an uncompleted task.
There are many task management systems available; my personal preference is for more simple offerings. My long-term goals go into Google Tasks or Trello (depending on the project and whether collaboration’s required). Every day’s short term goals are written down in a pad, under a headline of that day’s date, and crossed off when complete. If they’re not complete, they’re either marked as rolled-over to the next day, or discarded.
Tasks should be granular, achievable and bite-sized. If they’re not, they should be divided into further tasks until they’re realistically attainable in the next few hours. This helps to prevent being overwhelmed by tasks that can appear impossibly large, and also allows for a greater number of tasks to be crossed off as complete. This gamification of work creates a sense of achievement.
Reviewing tasks daily can prevent backlog items “slipping through the cracks”.
The Pomodoro Technique is intended to avoid distraction and procrastination, and once started gives immediate feedback. The premise it to set a timer for 25 minutes (although times between 25 and 45 minutes have been postulated) and work single-mindedly until it reaches zero. This means not getting up, surfing the web, checking social media or stopping for a chat - just pure focus.
After the time elapses there is a five minute break, during which actually disconnecting from the task at hand is encouraged: a break gives the brain time to gestate the work it’s just been engaged in, and this subconscious processing can lead to insights that may have taken hours of hard grind to achieve.
Optimise Workflow and Tools
Organise similar tasks together. Minimise context switching and interruption as much as possible. For example, putting on headphones during a pomodoro can provide the cue for colleagues that you are not to be disturbed.
IDE, GUI and CLI shortcuts will pay back in time the investment of learning them. Find cheat sheets, watch screencasts, pair program with more experienced developers and take notes.
Repeating the same pieces of code? Add them as templates or expanding shortcuts (“Live Template” in Jetbrains products). Use and learn from existing boilerplate or template code. Minimise duplication.
Choose Your Environment
Do you prefer to work in serene silence or with music? In a busy environment or a tranquil one? There may only be so much a developer can control about their environment, so make the most of headphones. Noise or rain generators can help to drown out the noise of a busy office or coffee shop, while a well-selected uptempo playlist has can aid motivation.
Whichever you choose, prepare the playlist or otherwise at the start of the work session and leave it. Don’t allow it to become a distraction.
Get In The Flow
The feeling of flow can be described as “being in the zone” or “aesthetic rapture”. It is a state of mind found when a task is of significant difficulty to attract the brain and keep its interest, but is still attainable enough to be engaging. The hallmarks of flow are total immersion, engagement, fulfillment, and skill.
Flow’s architect is Mihaly Csikszentmihalyi, who suggests three preconditions for flow:
- Clear goals
- Immediate feedback
- A balance between opportunity and capacity
Once these conditions are met, and combined with the previous productivity tips, a state of flow is more likely to be achieved.
Attaining flow suggests that the brain and body are performing at close to optimum levels.
How Else Can I Be More Productive?
Ask more experienced developers about their best practices. An article link or simple CLI trick can save hours, and anything that decreases the time a tasks takes should be readily embraced, leaving more time for learning, improving and relaxing, stress-free, as work is completed weeks or months before deadline.
Or at least on time.
Andrew Martin is a full-stack web developer and systems / database engineer. He aims to complete the Programmer Competency Matrix and reach space. Follow him on Twitter at @sublimino or read his blog www.binarysludge.com.
- Pomodoro Cheat Sheet
- Feeding the Brain for Academic Success: How Nutrition and Hydration Boost Learning
- Hydration and Diet