Ask HN: How do you concentrate?

91 points by bgray ↗ HN
Recently, I've found my concentration is becoming increasingly bad. I blame this mainly on co-workers and the internet keeping me from things that I need to get done (it's hard to program when I can only keep focus for about 10 minutes at a time).

What are tips/tricks you use to help "build" your concentration?

94 comments

[ 3.3 ms ] story [ 160 ms ] thread
If I really need to block out everything I use http://simplynoise.com/ and turn the brownian noise all the way up and turn on oscillation. It both calms me and lets me focus on what I need to do for extended periods.
I'm excited about simplynoise.com. Thanks for the tip.
If you're an iPhone user, then try NatureSpace app with sounds of natural resources. It's really pleasant, effective, and free too.
Thanks! I'll have to try it out. I'm excited about trying the "white noise" idea!
That is some awesome brown noise. Thanks!
I've tried it for a few minutes and I like it.

I've tried downloading the loopable brown noise file, but when I put it on a loop in quicktime there's a break at the end of the loop which is annoying.

Anyone knows how to make a seamless loop?

edit: I've tried it in iTunes and the break isn't quite as annoying (though still there). You can make it a bit more "full" by playing the website (oscillating) and the loop file at the same time.

Try with audacity, import the audio file, select a region then I think its shift + space to loop
I've found that - on a Mac - you can simply make a Dashboard widget with it. You have to go in the options and uncheck "Play audio only in dashboard", though.
In the context of tackling a niggling problem that really could be dealth with in minutes, but appears to be taking forever - I find that a short nap (about 15-20 mins tops) helps me focus and gather my thoughts.

If you're in a crowded and/or noisy work environ, noise-cancelling headphones are useful for zoning out, and are more obvious than earphones, so people around you can see the reason for you not responding to them.

But as for "building" concentration because 'co-workers and the Internet' keep you from getting work done? No amount of mindhacks can help if you want to continue 'blaming' them for your distraction. Hard to fix a problem you claim to not have control over..

Maybe those people can follow the AA method. Accept that the Internet has control over you, and cut yourself off from the Internet by accepting Jesus.
Practice.

Something I've discovered is that the more I let my mind and my mouse wander away from what I'm supposed to be working on (ie: right now), the harder it is to maintain focus. I suspect this has to do with the reward circuitry in my brain - when I desire something (going on the internet, sending a text message, etc) and IMMEDIATELY receive it, I become habituated to that. So much so that when I desire something and don't immediately get it, my dopamine drops, and it becomes extremely important that I get it right away. It works the same way as addiction, really.

So to avoid it, you just need to get used to denying yourself - eventually your reward center will get used to not getting what it wants immediately, and your dopamine will return to normal levels.

Exercise, meditation, yoga, spending time in nature. Sleeping regularly. Eating breakfast. Spending enough time per day not working, i.e not overdoing it.
Meditation is a tip that others have referred to me. Any good resources for meditation?
yoga comes pretty close, i would suggest starting with that if you don't mind giving it a shot. focus on breathing.
I can't answer that question, but I find that simple breathing exercises can help.

http://www.abc-of-yoga.com/pranayama/complete.asp

-Sit comfortably, either on a chair or on the floor. Close your eyes.

-Lengthen your spine up towards the ceiling, as if a string were attached to the crown of your head.

-Relax your shoulders by rolling them down your back.

-Breathe slowly and deeply through the nose. Fill your lungs from the bottom up. Focus on feeling your abdomen push out, then the middle of your chest, and finally your upper ribs.

-Breathe out through your mouth in the reverse order - compressing your chest from the top down (ribs, solar plexus, lower abdomen).

Repeat this a few times, breathing slowly, deeply and mindfully. To breathe mindfully means to focus on the act of of breathing, and how it feels inside of you. Notice the temperature and moistness of the air in your nose, the ribs expanding, the shoulder blades being stretched, the sound the breath makes...

The idea is to calm your body with deep breathing, and calm your mind by focusing solely on the breathing. Try to allow your muscles to relax and be stretched by the breaths (but keep the back straight). Your mind should be empty at the end of this.

It may take a few practices before you're able to completely clear your mind. You might consider taking free meditation workshops or yoga classes offered by your community centre.

P.S. - HN - how do I do bulleted lists?

I got a lot of mileage out of a post by Dan Benjamin a few months ago: http://hivelogic.com/articles/how-to-start-a-meditation-prac...

As the URL (and title) implies, it provides you with a good starting point. I'd floundered for quite a while reading up on theory, which is nice but has nothing on actual practice.

In particular, he linked (and now, so will I) to the online text of Mindfulness In Plain English at http://www.urbandharma.org/udharma4/mpe.html, which is both pragmatic and convincing.

Those two links finally got me started on the meditation practice I'd intended to try for years, and I've stuck to it without breaks longer than a day or two.

These links are very informational. Thank you!
You can do simple meditation by just reading a book about it and following through. Although high-level meditation should only be learned from a master, I would say that the advices that you have in this thread are pretty efficient. Just don't try do to anything else, like meditate with music or any other New Age or whatever. Meditation is very simple, which is why it is hard at the beginning, but it is also very profound and very powerful.

One of the keys to meditation (and to most of Oriental arts) is consistent practice. If you can find supervision it is better, but you can go a long way just by practicing consistently and correctly.

1. Do not have access to the internet on your work machine. If you don't have 2 computers, get a netbook for < $300 and connect it to the internet. They should be in 2 different workstations, ideally in 2 different rooms. The thinking is that if you have to get up, you'll only do it if it's really necessary. It works pretty well.

2. You should have 2 modes: coding and not coding. For coding, you should be at your desk coding. For not coding you can be anywhere, but not at your desk. One of my biggest problems is that I often find myself in one mode when I should be in the other. If you're having trouble writing code, then you probably don't know what to write. Grab source code listings, pen, & paper and get away from your computer. Don't come back until you know exactly what you're going to be working on. Better yet, until you're dying to work on it. OTOH, if your doing analysis and are stuck, stop. Go back to the computer and code something, anything small, just to get going.

3. End every day in analysis mode. Don't go to sleep until you have tomorrow's plan ready. You should wake up knowing exactly what you're going to be working on and excited to do it. More about that:

http://news.ycombinator.com/item?id=191275

4. Never text or IM when working. Have the cell phone nearby only for emergencies. For email, go to the other computer once an hour (see #1 above).

5. Try 48 minutes on, 12 minutes off. For long coding sessions, this works pretty well for me:

http://successbeginstoday.org/wordpress/2006/09/the-power-of...

6. Ipod.

Agree totally on 3 and 6. Not a coder, no advice on the others, but I zone out and work for 3-5 hour stretches when I come to work prepared and put on some music I'm familiar with and like (lyrical or otherwise).

Fell into that pattern in college when I had to write my philosophy papers.

I'm not a coder, but I generally agree with all your rules. I have pretty good self control, so I usually just nail my wireless on my laptop and plug away with my work, so I generally avoid the need for 1 & 2, however that is how I used to work before I left my desktop in another country.

#3 is an unbelievably important point and I fail to do it myself and I get bitten in the ass. When I finish writing I always try to add a quick 'to do' of my thought process for the next day, I find it helps me get back into the groove a lot faster. The past couple of days I forgot to do it and it seriously feels like going against a brick wall and basically feels like how writing used to be for me at the beginning.

#6 I practice myself, but I'm never sure of. I have music going and then like 40+ minutes later I become lucid and I'm like 'SOAB I missed the song I like', so I'm unsure if the music helps me or if it's just background noise. Although music can certainly help set the mood for working, so I suppose it helps in some way.

You are a wealth of information on productivity. Everytime I see your posts there is always something of great value in them. You really should start a blog (unless you have one?) and cover these subjects there as well as I really enjoy hearing about your routines and experience.

Now I'm off to setup a timer on my G1 so I can test out the 48/12 method.

Thank you, thismat.

You really should start a blog

Thanks for reminding me, I forgot...

7. Don't blog.

Blogging is one of those things I'd love to do (along with bridge, piano, & foosball), but I don't because I don't want to do it "half way". I'd be afraid of having 3 posts one week, then none for the next month. And I don't want any of these things to interfere with the time I dedicate to my projects. I know that by the third Wednesday night, I'd have to choose between coding and blogging, and I don't want to be in that position (at least at this point in my life).

So instead I come here. hn is perfect for someone like me; I come when I can and don't come when I'm really busy coding. I suppose my posts here comprise my "pseudo-blog".

Getting work done really isn't all that complicated, and I'm glad to share what works for me. Most importantly, work on something you're passionate about and find those habits that work best for you. All the rest is details.

I was thinking from more of a concentrated, documented library of your productivity tips instead of a social blog, but I definitely see your point and commend you on your "productivity > x" mindset.

I'll just have to start saving clips I've read that have been very inspiring for reference.

Try 48 minutes on, 12 minutes off (power nap!).
This has never worked for me. Everytime I try to sleep for a few minutes I end up taking a whole hour or more. Just my personal experience.
Agreed, I can't sleep during the day, I can hardly force myself to calm down for bed at night as it is.
I sleep for 20 minutes after lunch and it is great. If I didn't, I wouldn't work in the afternoon.
You have to set an alarm. The minimum amount of time I sleep is 30 minutes, max is 45. Longer than 45 you start going into deep sleep and you'll be pretty unhappy if an alarm wakes you from that.
I switched from talk radio to music. It helps me focus better. I also force myself to close my RSS reader and email because the alerts were pulling me away from what I was trying to get done. I open it up every hour or two, or after I reach a milestone. Those two small things have helped me immensely.
I would recommend some of the tracks by the group All india radio http://www.myspace.com/allindiaradio . I use it effectively to differentiate the signal from the noise ! :) Anything without lyrics works for me
Listen to music. Get the headphones that encompass your entire ear so you don't hear other people talk. I've done this for 10 years now. Also possibly get people to write you emails instead of dropping by the office even if you're 5 feet away. Work from home or from somewhere else occasionally, and work hours when other people aren't there.
I've started working from one day a week and have found I can get significantly more done away from the office. Maybe going into work a couple hours before others would help too...
I normally try to schedule blocks greater than 4 hours for programming and i do everything else on the remaining block of time. This normally requires a little bit of planning the day before and may be disrupted by peers or emergencies, but it works for me.
try adderall. you might be adhd.
Don't know if you were trying to be facetious but I downvoted because this is potentially dangerous advice. Just because he can't concentrate with coworkers and other noise around, doesn't mean he has ADHD.

OP: For noise, really good noise reduction headphones are the key to my sanity in the workplace.

As for internet distraction, I found two things helpful. 1) Eliminate non-essential immediate/push notifications. and convert them these tasks to on demand type tasks. Turn off twitter notifications on the iphone, shut down your IM client, and only check your feeds when you want to, not when they get pushed to you. I find the interruption of the notifications plays hell with my concentration. 2) install rescuetime and track (or even block) your internet sites.

"Trying" adderal doesn't have to mean illicit adderal.

Used under physician supervision he (w/doc) may find a dosage and plan that works for him. YMMV.

Yeah, definitely don't just take Adderall. I'm diagnosed with ADHD and I take Adderall every day and I still have a lot of trouble focusing. Especially when the problem gets boring. Especially when I want to solve a much more generic problem than the one I really need to get done. Especially when I'd rather be outside doing God knows what. If you seriously suspect that you have trouble focusing even on things you are interested in--and I mean seriously suspect; I routinely get distracted from very enjoyable activities like eating or sex, so it's not just "I can't focus at work"--go see an appropriate professional.

Honestly, I tend to use my imagination to concentrate. I mean, really stupid things like imagining that my code is slaying dragons or something, or that I'm actually developing software for an asteroid mining platform. Really, use whatever it takes to make yourself INTERESTED in what you are doing.

Also, avoid Hacker News. ;)

Specifically who would be considered "an appropriate professional"? Just go see my general practice physician, or is there someone more specifically I should go to instead?
It's hard to say. I'd probably ask your general practice physician for a referral to a therapist that specializes in adult ADHD. And I say therapist rather than psychiatrist intentionally: A therapist is usually someone with a PhD in psychology or counseling, and is less likely to take a purely "better living through science" approach than a psychiatrist, who is usually an MD specializing in psychological health, and is more likely to simply prescribe drugs and send you on your way. If you see a therapist, and they recommend medicine (they usually will), they will write up a recommendation to your primary physician to prescribe you that medicine.
Voted back up, because the post about taking methamphetamines has more points than the post about taking adderall.
re: our earlier discussion about it--i might have changed my opinion about it.
i've changed my opinion about it several times as well. it seems that when you're on it, you find things you don't like about it (particularly the anti-social bit). but when you're off, you can see flaws in substitutes like caffeine (legitimately turns you into an insomniac).
record every hour of your day in an easy-to-record system such as OSX's iCal. facing your inefficiencies and patterns is crucial for doing better. combine what you learn from your past with what others here are saying about better planning and habits. http://github.com/diN0bot/iCal-Analyzer
i use http://rescuetime.com its free and helps me track what i waste time on and gives me a target to focus on when developing
Try to work on something interesting. Hate to sound snarky, but it's that simple for me.
I know this is weird, but for me the best way for me to concentrate is to lie down on my stomach with a laptop in front of me. Not good ergonomically, and I think its because as a kid I did all my homework lying on the floor in front of the TV.

Hard to do in an office environment without strange looks. ;-)

I am only distracted when I have no problems. Show me a good problem or show me money, and nothing can pry me away from work.

I am a heavy chain smoker, averaging 30 cigarettes a day .. except when I am in hack mode. I can go for up to 10 hours without even noticing I haven't had smoke all day.

The other thing that motivates me is phone work and emails; when I have a contract or a deal in my sights I am in predator mode :-)

First I write a test.

Then I write just enough code to make that test past.

Then I refactor my code so that it meets the 4 rules of simplicity.

Then I write another test.

How does this help you concentrate?
I'm thinking it helps concentration by having short small goals and a definite plan for working on them. Sometimes lack of concentration is due to lack of a structured plan of attack on your 'todo' items. Breaking it into small pieces can also help by not making it some sort of 'monumental' task that you feel is going to take a long time causing you to allow yourself time to do other things because the task isn't going to be immediately done.
There's no point at which you could be distracted. You write a test, you make it pass. You don't do anything until it passes. As soon as it passes, you write another test. If I want to take a break, I make a test pass, then write the next one, and take the break.

When I sit back down, I know exactly where I was: making the test pass.

I turned off email notifications. I put on earbuds and listen to instrumental(sometimes ambient) music and focus.
1. Right click rescue time in sys tray. 2. Click "Get Focused" 3. Enter three digits (at least) 4. Get back to work.

Not being facetious here at all. The internet for a computer worker is the biggest concentration killer out there. Blocking it all means losing part of your toolbox (i.e. googling some obscure/unknown language reference or topic), but relying on you being able to kill your temptation is not effective.

RescueTime solves this problem brilliantly. (There are other programs too, I just happen to use RescueTime)

I take speed.

After 30 years I decided I probably have ADD. Talked to a doctor and he agreed.

Very small doses give me hours and hours of concentration.

Only about six months in, but the difference is night and day.

Are you concerned about medium/long term damage to your brain or endocrine system? I'm not judging at all, but for me, the fear of damaging what is my #1 asset has kept me away from anything beyond the occasional cup of tea. The idea of being "in the zone" easily and for hours is very appealing, but the unknowns and risks make my shy away. What are your thoughts?
My understanding is that the biggest risk is acclimation/addiction.

I can live with that, insomuch as it's a trade off of that risk versus problems right now with focus and concentration.

(That said, pretty much anyone routinely taking any drug needs to have their liver functions checked regularly, and periodically evaluate if the drug is still doing doing anything useful.)

If you are not currently fighting cognitive problems, then the risk/benefit balance is different.

I take this: http://en.wikipedia.org/wiki/Lisdexamfetamine in the lowest dosage available.

I'm worried about tolerance.

I run regularly, and eat reasonably well. There are risks, but the difference is so dramatic i think it's worth it. As i understand it, amphetamines have been around forever, and are pretty well understood.

To be clear, i tried everything many times. personal organizers, schedules, regular exercise, diet, avoiding stimulants like caffeine and depressants like alcohol, meditation, weird reward systems where i'd buy myself stuff if i did well for x days. I didn't do the full powerset... maybe there is some combination that would work, but my search for a system i could live with for the rest of my life was not successful.

My current personal theory is, I wear glasses cause my eyes are a little screwy, and take speed cause my brain chemistry is a little screwy.

I'd suggest doing everything else first. 5 hours of exercise (or so) a week is a big win. If you only eat horrible food, diet changes help ... if you occasionaly eat horrible food not so much. Meditation helped, but if you only do 1 thing, pick exercise.

If you still suck at finishing things after you've done all that, talk to your doctor.

"My current personal theory is, I wear glasses cause my eyes are a little screwy, and take speed cause my brain chemistry is a little screwy."

I wish this POV was more prevalent, and I hope that more people talking about neurochemical imbalances will help that.

Most people have no trouble with the idea of taking insulin shots to handle diabetes, but somehow taking brain drugs is de facto spooky bad. Pretty much, "Oh, psychiatric stuff. So you're like, crazy?"

Are on Adderall speed, or something else? I'm still sorting out Adderall dosage and right time of day.

But I'm seeing improvement.

For the love of all things good in the world, block Google Reader.

I disable auto-checking for new email.

Quit Tweetie.

Quit your IRC client.

Listen to some slow, drone-like ambient music (favorite: "The Tired Sounds of Stars of the Lid" or a Buddha Machine).

Also, while in school (when I really had to and wanted to concentrate), I had very good success listening/experiencing binaural beats. http://en.wikipedia.org/wiki/Binaural_beats

+1 for Stars of the Lid.
I have read that meditation helps build a control circuit in the brain and I practice it regularly. I often listen to music or some well known old TV show, something that flows familiar impressions to block out external noise but does not command my attention. Finally, my somewhat silly but surprisingly effective method is budgeting my time with a vibrating watch. http://www.epill.com/medos.html I set this up with a 60 minute countdown and commit myself to work for that hour. The alarm is subtle and doesn't distract others, just a small vibration. Then, I take a break. My goal is always to do that 1 hour work, so I take a break for long enough that I feel I can do the next 1 hour sprint. Then, I figured out how many I could do in a day (started at 4, now working on 9) and moved it up, just like working out. That is not to say I don't do other work as well, but these sprints are both more productive and more stressful.
If you really do need a network connection to do work I've found that the Leechblock plugin for firefox helps me regain at least some measure of control. You can set it to allow yourself a certain number of minutes per hour of "freedom" and the rest of the time it simply blocks the sites that you tell it to. It's amazing how many times per day I see that block page. (And at the moment, hacker news seems to have slipped through my filters :) https://addons.mozilla.org/en-US/firefox/addon/4476
The right kind of background music really helps me concentrate on a task. It has to be something with enough energy to get my pulse up, but brainless enough not to distract me.

I've been listening to http://www.philosomatika.com/ a lot lately. 24/7 streaming psychadelic trance.