Recharge your brain:
- Get some brain food, e.g. eat a banana.
- Power-cycle your brain: take a power-nap.
- Get some air into your brain, e.g. walk around the block.
- Get back to work.
- Observe your own successes/failures, i.e. note what works for you.
Read on for a longer answer.
One key to answering this question for yourself is to observe yourself each time you work long hours, and note what worked and what didn’t work. This is how I’ve found out what works for me.
Your brain consumes glucose, so if you don’t eat every 3 or 4 hours, you’ll get low on brain energy. So eat regularly: breakfast, lunch, dinner, 9pm, midnight, and 3am if you have to.
Secondly, your diet is hugely important: eat low-GI food. Do not believe any advertising that says bread, pasta etc. is low GI; in my experience, that’s rubbish. Meat and nuts are low-GI; carbohydrates are not low GI. Why avoid high-GI food? Because for the first 30 minutes you get very high on energy, but then you get very tired after that, making you very drowsy and unproductive.
So my preferred lunch consists of salad, fish or some meat, nuts, and an orange or a mandarin – low GI. Bad lunch: bread, pasta, potato, apple.
Appropriate drugs (endorphin)
However, there’s a place for a high-carbohydrate meal, and that’s where you can get a dose of endorphin by taking a power nap – anything from 10 minutes to a full 45-minute sleep cycle. Even just lying on the floor for 10 minutes can give you a power boost. For me, 10 minutes on the floor gives me 2-plus hours of high alertness afterwards; it works much better than 2 hours of drowsiness I get by trying to fight my body’s rhythm by just working through the drowsiness. Observe what works for you and go with that.
To really tip the scales in favour of getting a power nap, eat a protein-heavy breakfast (e.g. meat, eggs), a carbohydrate-heavy lunch (pasta, bread, apple), and then after lunch you’ll be very drowsy; do not fight this; take a siesta, get that refreshing rush of endorphin, and when you get up, you’ll have essentially given yourself a second fresh morning-start alertness to your day, effectively giving you TWO productive mornings in one day.
THEN, for the rest of the day, snack on fruit so that you keep your energy up, and don’t sap it with any heavy food. Ask a doctor or dietitian for more accurate and detailed advice on this; I got this plan from a doctor, but I may have some details inaccurate.
Many people prefer to counter their body’s natural rhythm by taking caffeine, but my drug of choice is endorphin: I prefer a short siesta instead of an afternoon cuppa. However, living in the Western world, I find it very hard to do this when other people are around. Another reason I dislike caffeine is because it stays active in your body past the time you want it, i.e. it works to keep you awake when you finally want to go to sleep, so you wake up tired the next morning and need… more caffeine – it leads to a self-perpetuating cycle of sleep debt. That’s not how I want to live.
Besides food, your brain needs oxygen, and lots of it. I suspect that the period for productive brain activity, in the short cycle, is about 15 or 30 minutes. So you will find you actually perform better if you do something counter-intuitive – step away from the keyboard for a few minutes every so often and get some exercise! I often take a walk around the block, which also gives my brain some air – very important, and if it’s daytime, I get some sunshine – very important in winter to help prevent me getting the winter blues.
Other things you can do:
- Take a shower.
- Play catch with a soft ball with a co-worker for 5
- Just do 10 or so push-ups - it’s really short, intense, gets
the blood and air pumping, but you don’t lose track of all those
programming items that you need to hold in your head.
One of the benefits of physical activity is that your brain often switches into alpha-mode, where you can "see" whole problems and answers to solutions. This often happens in the shower, when just waking up, or when exercising. I have solved so many bugs at the gym during lunchtime.
Then there’s the emotional side of being productive – being pumped, positive, and enjoying the work. What I’ve found works for me has become a list that I use like a recipe; here’s my technique:
- Clear the decks - get annoying things in your head written down,
scheduled or done, and out of the way.
- Prevent interruptions - get
comfortable - not hungry, not full; put up Do Not Disturb signs or
- Tune out and focus.
- Get your emotions pumped -
imagine the success. Getting pumped can include listening to good music, thinking hopeful thoughts, people contact planned/done, ...
- Understand the task, the issues, materials/code.
- Think through what you're going to do. Envision the goal and steps. Plan your approach; write down the steps/task list.
- Do it - do the work.
- Rest and refresh yourself, and enjoy the fruits of your labor.
You can consider yourself to be like a car with several power sources– emotional, spiritual, mental and physical. Each one has its own “petrol” tank. For peak energy, all of them need to be loaded up and going well. You might be physically fit and well, but emotionally broken; this will really impact your work – you need to spend time on your relationships and have some alone time. You might be emotionally well but spiritually bankrupt – you need to reconnect with God the creator; you could even pray and ask for help. Or you might be physically low – you need to exercise and maintain your body.
Source: Reading Your Gauges by Bill Hybels So you need to read your gauges and fill up the tanks that are low.
Avoid distractions and procrastination. E.g. don't spend too much time on StackExchange like I just did.