Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Do you have any problems with loss of concentration, constant relaxation, etc.? How do you solve this problem?

For example, when you are coding or learning something - You understand that it's interesting, but there's also another will to go and do something else.

How do you motivate yourself to keep working when you get the urge to distract yourself?

share|improve this question

closed as off topic by psr, Karl Bielefeldt, gnat, Walter, Matthieu Aug 30 '12 at 15:50

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

7  
It's easy! The answer is... oh, what was I talking about again? –  Berin Loritsch Apr 6 '11 at 16:18
    
funny, seriously –  Sergey Apr 6 '11 at 16:20
1  
Do you have any specific examples of the type of absent mindedness you are talking about? As it is, the question is almost too broad to answer meaningfully. –  Berin Loritsch Apr 6 '11 at 16:31

4 Answers 4

up vote 12 down vote accepted

For example, when you are coding or learning something - You understand that it's interesting, but there's also another will to go and do something else.

How do you solve this problem?

Tony Schwartz recognizes this problem and offers a suggestion:

Finding an excuse to avoid hard work isn't hard to do.

I work for 90 minutes because that's what the research suggests is the optimal human limit for focusing intensely on any given task. This "ultradian rhythm," the researcher Peretz Lavie and others have found, governs our energy levels (see page 51 for details).

Over the course of 90 minutes, especially when we're maximally focused, we move from a relatively high state of energy down into a physiological trough.

Many of us unwittingly train ourselves to ignore signals from our body that we need a rest — difficulty concentrating, physical restlessness, irritability. Instead, we find ways to override this need with caffeine, sugar, and our own stress hormones — adrenalin, noradrenalin, and cortisol — all of which provide short bursts of energy but leave us overaroused.

By intentionally aligning with my body's natural rhythms, I've learned to listen to its signals. When I notice them, it usually means I've hit the 90-minute mark. At that point, I take a break, even if I feel I'm on a roll, because I've learned that if I don't, I'll pay the price later in the day.

I don't get it right every day, but this single practice has been life-changing for me.

share|improve this answer
    
+1 For me, its 30 to 45 minutes max. I use a timer to time myself. When the time is up, I switch to something else (even if I feel like I have the mental energy to continue). I time the break as well, then switch back and start over again. –  Anthony Aug 28 '12 at 4:22
    
The only problem with listening to my body's rhythms is that I seem to progress more slowly than other people when I do this. Anyway, I know that I should focus on being the best I can be and forget about other people –  Anthony Aug 28 '12 at 4:25

Get up, walk around and get a cup of coffee.

share|improve this answer
    
I was about to suggest that overdrinking coffee might be the source of the problem... –  user16764 Aug 28 '12 at 14:27

Simple tools and/or techniques can be of help here.

  • When you get in in the morning, write down a prioritized list of what you'd like to get done that day. I put mine on a whiteboard so that I can easily see it.
  • For focusing on the next task, set a timer for 20 minutes or half an hour, and do nothing else until time is up. When the time is up, take 5 minutes to collect yourself and then set the timer again. This is called the Pomodoro technique.
  • Sometimes the best thing to do is just start. It may sound glib, but the first step is the hardest part about getting motivated. Tell yourself "fine, I'll just start with this little thing here..." and do it. The next step often is easier.
  • Work with somebody else. If you're like me, you don't want to be the one dragging.
  • Read the book Getting Things Done by David Allen.
share|improve this answer
    
Yeah, A journey of a thousand miles begins with a single step - Laozi –  pinouchon Aug 24 '11 at 7:54

Understand that your brain has a crap filter. Read the article I linked to, it helps understand why you may have a hard time doing something. The quick spoiler is because to your brain, what you want it to do is unpleasant. It's not directly related to food, pleasure, or danger.

  • Find pleasure in what you are doing. Think about it, you can have fanatics about how to perform the Japanese Tea Ceremony just right, and the rest of us are thinking why? The tea ceremony aficionados find pleasure in every nuance of this ritual that from the outside seems stoic and boring. The natural pattern of the glaze on the unadorned tea cup, the simple decor, etc. It's a matter of finding the genius in the simplicity.
  • Understand the danger/pain you will suffer if you don't learn whatever it is. Note, this is not the mental assent that you should do something. This is more of, if I don't do something then something bad is going to happen to me.
  • This suggestion is dangerous to your waistline, so use it as a last resort. Start associating a food treat with the boring thing that you are trying to learn/do. You can't have the treat until you get done with the task for the day. Also know that this is only effective temporarily. For long term stick-to-it-iveness you need to do one or both of the previous suggestions.

Don't forget to reduce the pain your brain feels for doing this task it doesn't want to do. If you only subject yourself to 20 minutes at a time, it doesn't become as painful to your brain because there is an end in sight. That will let your brain relax a little, and then you can start finding those surprising tidbits that your brain likes. When your brain starts matching up the patterns of how the different concepts map together, it's no longer a pain to engage in that activity. Those happy surprises are like candy to your brain.

share|improve this answer
    
-1: This post is rich in contradiction. First you say, 'Find pleasure in what you are doing', then you say 'This suggestion is dangerous to your waistline'. Can you tighten up your argument a little bit? –  Jim G. Apr 6 '11 at 17:30
    
I have a variant of the food bit - don't have any food until the task is complete. Once you start getting really hungry the brain gets very focused :-) –  Rory Alsop Apr 6 '11 at 17:37
    
@Jim G., the best approach is to find pleasure in what you are doing without resorting to food. Americans in general resort to food to "medicate" themselves. So no, I won't tighten up the argument. I'm offering what I think is balanced advice. That requires both argument and counter argument. –  Berin Loritsch Apr 6 '11 at 17:37
    
@Rory, I did include that advice (third sentence). In short, it's a "carrot" to keep you focused on the prize. –  Berin Loritsch Apr 6 '11 at 17:39
    
@Berin Loritsch: So your advice is: 'Find pleasure what you are doing', except when it behooves you to do something that isn't pleasurable, like learning something difficult or denying yourself food and other such carnal desires. // OK - Gotcha. ;) –  Jim G. Apr 6 '11 at 17:42

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