Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How do you concentrate?
91 points by bgray on Oct 8, 2009 | hide | past | favorite | 92 comments
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?



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.


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.


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.


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.


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.


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.


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.


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.


That is some awesome brown noise. Thanks!


I'm excited about simplynoise.com. Thanks for the tip.


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.


Theres a wikipedia article that might have better sounds to loop, although they are shorter I believe: http://en.wikipedia.org/wiki/Colors_of_noise

Also this seems like a perfect excuse to program a solution, if you are so inclined. I've used supercolider in the past and it was easy to pick up quickly. http://www.audiosynth.com/


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.


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!


1. Stop using IM. Period. Not just when you're working. All the time. You don't need it. There's email, SMS, phone calls, Twitter, and other social messaging services. IM is the most brutally distracting and easiest way to waste time when trying to work.

2. Stop using Growl or equivalent. You're training yourself to constantly be looking for distractions in the periphery. You don't need that information, I promise - even for your fancy CI system that tells you when tests fail. Knock it off.

3. Quit anything remotely interruptive for the duration of your work session: IRC, Campfire, Twitter client, email client. This can be tough if you're working remotely, so let clients and coworkers know when you'll be available online and when you're focusing. As long as you communicate your goals and intentions clearly, they'll understand.

4. Get yourself some noise-cancelling headphones. I like the Bose QC 3. Added bonus: take 'em on plane trips and they help to dull the engine noise.

5. Listen to something engaging but not totally engrossing. Ambient music and noise generators were mentioned in this thread, and I like them, but sometimes you need something with more "oomph" to get you through a dull task. Minimal techno is my staple, as it rarely has distracting vocals and typically maintains a steady, not-too-fast, not-too-slow beat. There are tons of sites out there with free DJ mixes, just search around.

6. A personal preference: work standing. I find that standing helps keep me focused and helps to distinguish work from relaxation.

7. Get a really big monitor and cover it in your code, terminals, documentation, etc. The only thing that should be in view is the material you need to get your task done.

8. Make a list of stuff to do, and do that stuff. Doesn't matter whether that list is in some fancy GTD app, a bug tracker, or on a piece of paper. It's helpful to see the list and know that you get to cross off an item or close a ticket when it's done.

9. Block work time out on your calendar. I refuse meetings after lunch (from 1PM to 6:30PM), and I'll only make exceptions for truly exceptional circumstances (candidate flew across the country to interview, has one day, there's no other time to meet with him/her). This is essentially pg's idea of the "Maker's Schedule", although I'd been doing it for several months before he wrote about it.

10. Meditate. This sort of speaks to the comment in this thread about practice. Meditation is conditioning for your brain. It's really, really hard to do well, and even harder to find the time to do it. I don't do it as often as I should, but when I do, I find it much easier to concentrate on hard problems.

Hope some of the above helps.


For point #5, listening to music, I'd like to emphasize sticking away from vocals. It's weird, but my brain can listen and code just fine to non-lyrical music, or music which has repetitive samples (they meld into the background like another instrument). Once you start adding in someone singing though, it all changes for the worse.

Psychedelic trance, like Infected Mushroom or Psycraft, is my favorite stuff to code to at the moment. In fact most electronic music lacks lyrics and is favorable to coding IMHO (if you haven't heard of it, check out "Ishkur's Guide to Electronic Music" to find some electronic songs/genre's you might like - http://bit.ly/10ZP9). Beastie Boys is ultimate death, unfortunately. Too much damn lyrical style.

Small hack: I've found that you can listen to vocal music without distraction, but only if it's sung in a language you don't understand. But for the life of me, I can't find any songs about Assembler... ;)


I like Podrunner (http://podrunner.com). Intended for runners, but it's got a good beat. Occasional remixed lyrics can be a bit distracting, but much less so than pop (not all tracks have vocals, and they're repetitive so it's easy to tune out). Also, the mixes are an hour which is a great chunk of time to disappear and come up for air later.


"Stop using IM. Period."

+100.

The average RescueTime IM user shifts to an IM window 77 times per day (6.5 hrs computer time).

Also, make commitments to focus (start with 20-30 minute bursts and 5-10 minute break times). Shut the door and/or hang a do not disturb sign somewhere. If distractions online are a problem, try LeechBlock or (our product) RescueTime, which allow you to selectively block the distracting bits for bursts of focus.


For music:

http://trancearoundtheworld.com (2 hour + streamed sets)

http://pandora.com (paid so theres no commercial distractions)

http://thesixtyone.com (streamed songs you don't know about)

http://mugasha.com (good quality well-known streamed sets for free)

Love the streamed sets because they don't interrupt your workflow. It's like being at a coding dance party; for hours.



  10. Meditate. * It's really, really hard to do well * 
A quicker and simpler way to get into a meditative state is to get some binaural beat tracks to listen to. Either buy them from e.g. centerpointe or create your own using http://uazu.net/sbagen/

Edit: I also want to mention http://www.pzizz.com/ which is great for short power naps to get back your focus


If you have an Arduino or equivalent kicking around, it's also pretty easy to rig up an LED to flash at the same frequency as the beats. Mine looks a little ridiculous though. http://burkelibbey.org/brainwave.jpg



Thank you! You're tips are very helpful and I'll be trying them out.


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?


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?"


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.


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

But I'm seeing improvement.


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.


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.


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 :-)


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. ;-)


This might sound weird, but under no circumstances start concentrating and working unless you've previously jerked off. Or unless you're absolutely sure your mojo's not going to be awake for some time. This thing distracts you like in a moment when you're really starting to get deeper into the code and it's really hard to concentrate again. Ejaculation frees your mind.


I find the thing that most kills my concentration is lag. For example, right now I'm at work and we're facing a crucial deadline, but I'm not working. Why? Because I just made a change that requires re-running an integration test, which takes several minutes to run. I'm not about to sit there staring at the test, so I switch over to my feed reader and catch up on news.

Logically, I know this is devastating for my productivity, but so is staring at a progress bar for 10 minutes after every change. After the iteration, I focus on fixing the one or two serious lags that hurt productivity. It's not always possible (I've no idea how I'll speed up this integration test), but it's a worthwhile effort.

It is for this same reason that my company spares no expense on dev workstations. When a build takes 10 minutes, the productivity hit is at least twice that, and it's a recurring penalty.


This.

I suspect this is not an uncommon problem. I have found a solution that works pretty well, though (though it's nothing fancy): don't do that.

By that I mean, when you find yourself faced by one of those waits, and are about to switch to some time-sucking activity, ask yourself, "will I really stop this before the wait is over, or I lose track of time?"

I've lost so much time to these sorts of things that I do one of two things during the wait. 1) I just stare at that progress bar. Boring, but at least I won't find myself reading Wikipedia in an hour or something. I know that I'll only waste 10 minutes instead of an hour. Alternatively, I 2) spend a few seconds thinking of a task that won't suck me in but needs to be done. For example, I go through my code and see that everything's formatted well, or commented well. Or answer a few emails (I don't tend to get sucked into emails, I know some do).

You have to train yourself to respond right when you feel that tug of "what can I look at next?" You end up telling yourself "no" hundreds of times a day. It's a challenge, but it's worth it.


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?


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?


You don't.


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.


yoga comes pretty close, i would suggest starting with that if you don't mind giving it a shot. focus on breathing.


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


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


One thing I had to work hard to figure out is that I code in two different ways, and I need to alternate them. They are physically incompatible -- I can only be doing one or the other in a given hour or so.

One of these is design. When designing (software, not visually) I need to avoid getting into ruts. I need to rethink constantly and brainstorm frequently. I should consider wildly different or thoroughly impractical structures for code and programs, because those frequently lead to more practical but non-obvious ideas. Design mindset is facilitated by having enough sleep/rest, having eaten reasonably (especially protein, but not too much), and not having much else on my mind.

The other mindset is for execution. I need to take that design and churn through it. I'm not rethinking, I'm building. This mindset is excellent for churning out a lot of code fast when I have a good understanding of it. I do less of this in Ruby than in C (less grind-work!), but it's still important on occasion. Execution mindset is helped by minimal distractions, caffeine or other stimulants, and being slightly tired and undernourished, as long as it doesn't get too extreme.

These states alternate, and different coding tasks call for different proportions of one versus the other. Planning which and making sure I'm physically well-adapted to the appropriate kind of work for the task help me a lot.


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)


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.


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


Taken from "Time Management for System Administrators", however I feel this particular principle applies towards your situation:

Figure out if you're a "morning/mid-day/late-afternoon/night" person when it comes to your brain activity. Some people, for the life of them, can't get their brain functioning when they get up. Others can't seem to concentrate until they've gotten lunch and feel "established" in the day.

Figure out your natural cycle and make sure you attempt to get good quality coding time in during your best times. If this is not possible, then apply the other response suggestions and hopefully you can increase the range of your concentration time.


I want to add that this book has a lot of good advice for all sorts of jobs, if you look at how to apply it. Two advices I like are to list your next day's activities before leaving your work for the day, and to work out a blocking system with coworkers so they handle incoming questions for you so you can spend the time focused. The blocking would be handled in an alternating fashion every-other day. It is a really quick read and written in a conversational tone - check it out.


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 love to work on things that interest me, like coding up a back-end for a site. If it's interesting, I start thinking about solutions, I get in the zone automatically and just code away.

Be careful to not overdo it by having balance between hacking (analytical) and dreaming (creative), lest you get burned-out, in which case concentration becomes impossible.

my 2cents


Perhaps, this best advice works for you!!

http://productiveblog.tumblr.com/


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 was having a big problem concentrating and getting work done so I tried something my friend told me to do. Sit for an hour, and do nothing. Don't plan, hardly think, just sit. It's hard to explain, but it feels like hitting the motivation reset button. I would say it's definitely worth trying.


I have to say this always works for me too. The thing is there are always forces pulling us away from what is most important. When i meditate sometimes it becomes more clear what is most important. Usually about 30 minutes into it I visually see something related to a goal. After that I just follow the vision. I worked with a guy who graduated from Pepperdine University for his MBA, and he said they are teaching meditation techniques to business majors now.


I do my best to give myself ridiculous deadlines, and then do my damndest to meet them.

If I absolutely have to meet something, I will. Granted, I can only keep it up for a couple of weeks or so, but during that time I can productively code for > 10 hours at a time.


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 to work on something interesting. Hate to sound snarky, but it's that simple for me.


When are times when you can concentrate? Do they have patterns that you can see? Can you artificially re-create these patterns?

Are you disengaged from your daily work? Maybe you need more interesting endeavors?


http://en.wikipedia.org/wiki/Test-driven_development helps me a lot in concentrating on my work.


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



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.


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.


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.


"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.


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).


I take breaks, not concentrating on anything.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: