Personal Productivity Stack Exchange is a question and answer site for people wanting to improve their personal productivity. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a programmer and my work requires intense mental focus.

My goal is to get 8 clean, productive hours of programming per day.

I tried this yesterday, and I managed to get only 2:35 hours of clean focus.

As stimulants, I used:

a) coffee (2 cups)
b) aerobic exercise (30 minutes)

I don't want to abuse coffee; because the effects I get after 2 cups of coffee are the opposite of what I want (dumbness / jitters / inability to sleep).

Aerobic is really good; but the good after effects tend to last for a short time. I exercise for 30 minutes, feel a great focus for about 45 minutes to 1hour~ after it, and then I have to eat which again brings me 'down' to a lethargic state of mind.

My personal guess is that diet is the source of all my concentration problems. I was thinking of buying alots of fresh fruits and then combining them with a bit of coffee to break that 8 hour barrier.

My question is: how do you get yourself to focus? Are there any other stimulants beside coffee/exercise that are great, and I'm missing them?

I personally can't focus unless I get an external stimulant. My diet consists of mostly processed foods / coffee / aerobic exercise. And this worries me.

share|improve this question

closed as primarily opinion-based by Adam Wuerl Dec 5 '13 at 4:24

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

Use pomodoro technique. Work for 25 mins followed by a 5 min break. Continue till you get 8 productive hours. – Ashutosh Dave Jan 31 '13 at 7:48

12 Answers 12

up vote 7 down vote accepted

how do you get yourself to focus?

I am trying to get into the "zone".

We all know that knowledge workers work best by getting into "flow", also known as being "in the zone", where they are fully concentrated on their work and fully tuned out of their environment. They lose track of time and produce great stuff through absolute concentration. This is when they get all of their productive work done.

How to get into zone? 1) don't force yourself, try to relax and enjoy what you are doing

2) stop worrying about not being in the zone - it's like getting asleep - if you check your state every few minutes you will never get there

3) start with something small and easy - some refactoring might work great

4) try to limit external distractions as much as possible

share|improve this answer

Before I start working I'm starting with affirmations for my work. At the same time it's like a meditation since it calms you down as well.

I have a predefined list of sentences which I repeat (aloud if possible) as an excercise. It is important to fight the urge to get to work immediately, fight the feeling of wasting time, it will pay off later on.

Here's a sample list you can start with: - I'm working hard - I'm focused on my work - I'm calm - I'm finishing project X, because I want to be viewed as a proffessional - I avoid distractions like social networking facebook, cnn etc.

You might repeat the entire list or focus on one particular sentence and add visualizations for that.

I repeat this for about 15min before starting working on a larger chunk of work.

It helps you to cut yourself off current stuff occupying your mind (for example you may spend time dancing, socializing etc. and it's hard to switch in the working mode).

Using Pomodoro technique helps as well.

share|improve this answer

As a fellow programmer I recognize the problem and have struggeled with this issue for a long time. My solution is to program for about six hours a day with a few breaks in. Sometimes I use the Pomodoro technique to get a better focus but in my experience 8 hours is to much.

So what I do to get some focus is indeed some fitness. Mostly, at the start of the day to get some blood flowing. The last two hours of the day I usually plan to do administrative stuff, or documenting or anything that is different from the first six hours.

In the end I believe that concentration is, for the most part, dicipline. It is a process of building more dicipline to get better in concentrating and this takes time!

share|improve this answer
Or getting caught up in the problem. When I'm coding, I don't want to break when the Pomodoro timer goes off. I do so I get up and don't get a headache from staring at the screen all day! – Jeanne Boyarsky Oct 29 '12 at 21:17
> I believe that concentration is, for the most part, discipline --------------------------- I believe in something quite opposite - concentration is a natural state for our brain (if we are doing something interesting and enjoyable) - and constant mention of discipline might turn all this fun into something else – Steve V Oct 29 '12 at 21:27
@SteveV I think it is a bit of both in cases that stuff is enjoyable concentration comes more natural. Still, even on more enjoyable stuff you can train your concentration by getting more dicipline. The other way around is also true, if you get better in concentrating stuff becomes more enjoyable and get more dicipline to finish stuff. – Roel Oct 30 '12 at 6:56
@Roel I still see these approaches as opposite ones - if stuff is not enjoyable, I would try bunch of tricks (reframing etc) in order to make it enjoyable; any mention of discipline makes stuff less enjoyable (it's the way our mind works - it doesn't like to concentrate on unpleasant things, but can do wonders if considers an activity as a game etc) – Steve V Oct 30 '12 at 9:04
@SteveV we are very good at focussing on unpleasant things as long as there is an urge to to them. We are even programmed to be more focussed if we are hungry (i don't want to say that eating is unpleasent). – Roel Nov 1 '12 at 11:04

I started the same way. I could manage only 4 hours of pure work per day at first then eventually built it up to 7. (my goal is 7 not 8).

It happens gradually over time. I had a few "burn outs" along the way. Like, if I managed 2 perfect days, the third I was exhausted mentally and was down to 4 or 2. This gradually still gets better. Now I lose momentum when switching projects - something I'm not sure how to deal with yet.

But the way to get through it is hold yourself accountable. Track your time everyday. Add time spent exercising and number of coffees to that log. And don't forget the 8 glasses of water too. Especially helpful with all that processed food you are eating.

share|improve this answer

Caffiene doesn't really help that much, unless you're coming into work already drowsy. It's not even a long term stimulant, because it loses effect after you've had a bit. You should check if you're getting 8 hours of sleep a day.

Your brain functions optimally on glucose. In fact, your brain's capacity to focus is almost directly affected by its glucose supply.

This does not mean you should eat only sugar! Sugar has an effect of improving things for only a short while, but "crashing" after an hour. I find that coffee's effect is also due to its moderately high sugar content.

If possible, eat food with low GI. Soya milk works even better than coffee in constant doses. Don't just go for any fruits, there's plenty of low GI fruits.

Something like Isomaltulose is a good chemical alternative for low GI foods.

Also, you can't actually get 8 clean programming hours. I normally push for just 4. On very productive days I get 6, but the fatigue often carries over the next day.

share|improve this answer
See also for another approach that leaves me full of energy without dips all day long. – w00t Nov 6 '12 at 10:09

I'm a programmer too. Recently evolving with some entrepreneurship things. Management and programming are two opposite poles, but when I had the situation, it made me total anxious.

My solution is that I do a half an hour meditation twice a day. That makes me mentally calm for most of the time after meditation. You could use this audio. Those are found in this link Don't expect to get a drama, but if you practice regularly, you'll gradually improve your mental state.

This tips might help, use relaxation meditaion and any other (from the next link) and maintain those two for about 40 days.

share|improve this answer
Those audio files are not available! – Ashutosh Dave Jan 31 '13 at 7:52
I find those link still alive. You could right click on the first link and then use 'Save link as' and the second link is the list of all the meditation... – Dewsworld Feb 5 '13 at 7:29

For me, I can't start a productive day without meditation and reflection. As few as 15 minutes of meditation is enough to clear your mind from worries, fears and expectations. Don't try to control your focus, just enjoy what you are doing, and lose yourself in the task, in the moment. In other words, try to be attached to the job, remove all distractions such as social networking or unnecessary phone calls/text messages. You can also play some ambient or background relaxing music like genres of New Age, instrumental or classical. I do recommend online radio stations like Blue FM, SKY.FM New Age and Transmission.FM (google them or better use a free internet radio software called RarmaRadio). Finally, you should make small breaks after each 30 minutes of pure concentration for maximum 5 minutes, your mind can't work nonstop for 8 hours.

share|improve this answer

Me and my brother (we are almost twins) have a very efficient technique for boosting mind concentration and bringing calm and relax : It's Reading. my brother is an extreme example for how reading books could be a technique for stress relieve and mind state elevation. He talked to me lately and told me when he feels stressed and not able to go to work he goes to a café with his Kobo ereader and then pick a book of Dostoevsky or some classical literature work and read for an hour or 2. He told me that after this hour he feels really good and in His best fit and start his work with joy and productivity.

I also tested this technique of Starting my day by reading something non-technical(an article , a holy book etc..) and indeed found it to be quit efficient. it clears your mind by letting it consume some other non technical material. The only thing to emphasize is that the readings subject should be non-technical preferably in subjects of literature , philosophy , religion and other materials in humanities. these have the effects of mind clearing and boosting your productivity when you switch your mind to technical stuff.

share|improve this answer

I'm a programmer too. I've tried many different techniques, but almost none of them worked for me as good as I wanted them to.

What didn't worked:

  • Long-term planning,
  • Pomodoro technique,
  • Clean and silent workspace.

So as none of this worked for me, I thought that I should try the opposite: no long-term planning, no pomodoros (and other interval techniques). The only thing I left is cleaning the workspace (and just because of I dislike visual noise and love minimalistic look of my workspace).

What helped me the best is short-time planning. Online service, which I used for that, allows you to write tasks (in flat manner, without sublists and etc.) for today and tomorrow only. And it lead me to breaking tasks into smaller subtasks until I can clearly see that there are only easy-to-do-now tasks in list. And when I complete the list I'm starting to complete tasks one by one and cross them out. I think it helped me because I don't need to switch from programming to planning and back to programming (this context switch takes a long time). And instead of this switching I'm getting into the "flow".

But, still, I don't believe anyone can get more than 4 hours of productive pure programming per 8-hour (or 12- or whatever-hour) workday. And that's because you still have to think about many other things.

share|improve this answer

I am a programmer too and I had a concentration problem since my school days. Those days i could never sit back and study for more than 10-20 mins.

But now I have overcome it a lot by understanding a few things:-

  1. Concentration can only be accomplished in things which you enjoy doing or which you really want to do. So first realize the reasons of why you want to do a thing. If you don't have enough reasons, then either create them (some targets like some achievements, appraisal or party) or don't do the work (so that you don't feel sorry for your concentration problem).

  2. After you realize the need of the task, motivate yourself (with the perk of finishing task) to start, continue working on it and finish it. You may assign a timeline for the task and take few breaks whenever you feel like your mind needs rest. (I don't follow pomodoro technique because it puts a break in my motivation). Motivation is not something which lasts forever. Its like food for brain. You need to motivate yourself whenever your brain is hungry for it (whenever you have the urge of giving up or taking breaks frequently).

  3. Avoid distractions. Distractions are time killing and de-motivating. Emails, social networking sites notifications, etc will distract you so program your mind to delay them to the time when you take a break (also avoid the urge to take a break when u realize the notification, motivate yourself again). For me music works great to avoid distractions. Find out what works for you.

  4. Congratulate yourself and encourage yourself. Whenever you achieve your goal of finishing the task, congratulate yourself even if the task got delayed beyond your assigned time. This will make you feel good about yourself and encourage you to perform better next time.

Never discourage yourself that you have a concentration problem and you were unable to complete the task, even if you fail thousand times. Constantly encourage yourself to complete the task, improve your performance and finish it on time. Sooner or later, you will achieve it.

You don't need any external stimulants, although you can pamper yourself with them whenever you take a break.

Always remember the famous quote by George Harrison "It's all in the mind !!"

share|improve this answer

I think your problem is not behavioral as such- your diet is not conducive to concentration. Processed foods are terrible for blood sugar levels, and in fact you may wish to check whether you have any diabetic tendencies.

Avoid all processed foods, eat a lot of fruits, vegetables, pulses etc.

You should be able to concentrate and be productive for hours.

That said, pomodoro and other time slice techniques also promote higher value activity, so do not change your diet in isolation.

share|improve this answer

Music is the best thing for me. The type of music varies - find what works for you at the time. It works best if you aren't always having to find a new song every few minutes. Something like Pandora can work well. Alternately, custom playlists.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.