Ask HN: How do I regain my attention span?
I'm at step #1: admitting I have a problem.
I consider myself a skilled programmer, but for the past few years my ability to sit down and finish a project has been waning. HN, do you have any advice?
I consider myself a skilled programmer, but for the past few years my ability to sit down and finish a project has been waning. HN, do you have any advice?
54 comments
[ 3.7 ms ] story [ 89.5 ms ] threadRelease to the public often, and write notes that highlight your changes. That's important, because it forces you to think in terms of those notes; if there's nothing "release worthy" happening, it would be hard to write anything.
Every now and then, allow yourself to do tasks that aren't strictly related to forward progress. Fix some code formatting you've been meaning to do; write a document; try something new. The mixup helps to keep things from becoming boring.
Don't be afraid to literally walk away. If I talk a walk for an hour, I can often do as much work in my head as I would at the keyboard, but it helps me focus (and it's healthier).
Don't force yourself to work on something unless you want to, assuming no time constraints. If you force yourself, you're going to do less and hate life. It's an easy way to lose your focus.
If you're feeling particularly unproductive, work on a project you can complete in an hour or two. That'll help you gain the momentum that's crucial to getting things done.
Solve a problem at the beginning of the day. Project Euler is my personal pick for such problems, but anything that works the mind is a good choice. This doesn't even have to be code related, just something to get your mind in gear early on.
Don't overuse stimulants like caffeine. As much as I love such drugs, their overuse is easily able to harm your focus.
In general, try to analyze what works and doesn't work for you. Hope you can find something to help you out. Good luck.
You can try self-imposed deadlines, but those rarely work for me. I prefer real deadlines- promise to show it off at a conference or meeting, or something similar.
Good luck!
First thing I would recommend is that if concentrating is a serious problem for you, you should see a doctor. Since this is something that's just come up in the last few years, it's likely not something like ADHD. However, this can be caused by a number of psychological ailments (anxiety, depression, etc) and physical ailments (diabetes, hypothyroidism, etc).
That said, it's important to note that distraction is often a learned behavior. Do something to break the habit. Try programming in new places, don't use the computer you program on for personal browsing, etc.
Also, it's amazing what a little exercise can do.
The OP might want to look into neurofeedback for focus/peak performance.
Disclaimer: I work as an EEG Technician,and also write software for neurofeedback systems. This is not medical advice.
But seriously, log off for a while. Stop Twittering, stop IMing, stop reading your RSS feeds. If you're regularly employed, then take a vacation and go to the mountains. If not, go there and stay there. Come back once the spontaneous urge to do so goes away. While you're there, read a book. Not a computer book, and not a junk novel. Pick a text that requires mental engagement but not hands-on experimentation. A history book with citations in it, or a heavy philosophical tract, is a good choice.
Reading fiction, taking nature walks without your cell phone, or, perhaps best of all, practicing insight meditation can help a lot.
Mental concentration is like a muscle. You need to exercise it (and not drug it up).
But I have found, reading fiction is useful, as it activates your imagination in ways that nonfiction simply does not. I still don't read a lot of fiction, but I endeavor to get in some, and I think it helps...
Buying a copy of GTD might help, but it won't be an instant cure. There is none.
Also, consider exercising your willpower on smaller (but non-trivial) projects.
It is extremely difficult for me to complete projects on my own these days. Luckily, it's relatively easy to find someone to work with on most things that are worth doing.
Me? I respond well to A. small, well-defined tasks and B. limits. I get A. by breaking tasks up into tiny modules, and by using Git to make lots of small feature branches. I also write TODO lists with lots of 30-minute jobs.
I get B. by using LeechBlock[2] to restrict access to websites for periods of 1 hour. When I combine A. and B., I usually can find something that'll put me working long enough to get into the zone.
Having an interest in your projects also helps :)
[1] http://www.cs.virginia.edu/~robins/YouAndYourResearch.html
[2] https://addons.mozilla.org/en-US/firefox/addon/4476
I focus exclusively on a task for 15 mins. Then at the end I reset it again, or move on to the next project.
The other thing that helps me since a long time is having a todo-list in which the top-task really always describes exactly what I'm working at now. Even if that task is only "figure out what to do next".
I moved personal and work email to Mutt and uninstalled my Gmail notifiers; I moved IM to bitlbee on irssi; I moved RSS to Newsbeuter; and I moved Twitter to ttytter. I keep all of this running in a screen on my remote shell.
And this was certainly not the intent of my project when I started it, but I can't even begin to tell you what a difference it's made for my productivity. I usually leave my screen on an empty shell prompt, so even if I see my terminal I've got no idea what's going on in those other terms unless I actively go looking for them.
Granted, I have the luxury of working at a small startup (< 20ppl) and I can maintain some aloofness with regard to IM (because if a colleague really needs something from me I've probably not more than 20ft away), but as far as this other stuff goes, do you really need to know what's happening on Twitter in realtime? Is there ever really an email so important that it can't wait until you've finished your current thought?
Also, physical exertion / exercise calms the nervous system.
Does anybody else see the irony in this?
Okay, I'll play along. Remember Yoda: "Do or do not. There is no try."
No, it seems necessary. If he could concentrate on a novel length reply, he wouldn't be needing it.
That means, you gain a longer attention span by making yourself have a longer attention span. It's a struggle. It's supposed to be a struggle. If it had a quick and easy fix you wouldn't be needing our advice in the first place. You're probably a master of quick and easy fixes -- that's what people with short attention spans collect.
Encouraging the world to adapt to you by giving you short, easy quips about what you need to do is not helping anything -- it's just making it worse. You'll pick up the several dozen little shiny quotes and think about them for a few minutes and tomorrow be on to something else.
You want a long attention span? Go do something that requires a long attention span. I mean do it -- don't talk about it, don't blog about it -- just shut the hell up and go do it. When you are done, you will have a longer attention span.
Please forgive me if I sound coarse: this post reminded me of an alcoholic in a bar drinking to his sobriety. It just doesn't add up (at least to me)
The left/right brain thing is a simplistic pop-science myth. (Sorry about your $19K. Perhaps someone with a medical degree, such as a psychiatrist or neurologist, would have been more helpful about the mechanics of the brain).
It may still be helpful to do non-coder things to break the monotony. But you'll be using your whole brain doing it.
Music practice/recital also serves to prepare you for a long day ahead or de-stress you at the end of one.
Is this scientific? If so, I'd like to see references.
To improve your attention span, you need to work at removing as many of these restrictions as you can. Since you can't control the external distractions - coworkers, meetings, etc., that means you have to focus on the ones under your control. So for start, pay attention to what you're doing at any given time as you work and try to reduce the number of times you interrupt yourself.
Sometimes, attention problems can be corrected by taking better care of yourself. Personally, I've found my attention problems come more from ultimately not caring than from some weakness of character. It's easy to think up ideas that could be successful, but are they really for you?
For example, I've come to discover that I get motivated when solving really tough niche problems that no one else has dealt with effectively. But I couldn't care less about serving general lusers, like writing Facebook apps. I could maybe think of a cool idea for a Facebook app, and it might even be a killer one, but ultimately, I don't feel anything about serving Facebook users, harvesting their data and habits, etc.
Is it possible you're tackling the wrong projects?
What works for me is I think also the lowest hanging fruit: a combination of working on things I care about, and actively bringing my wayward bad habits under control.
A reset requires a change of scene. It's likely that you don't like what you do now. That's the root of the problem. Chop it down. Go find something else to do.
Once you pick something, do it all the time. It's analogous to shocking your system with a new diet. Everytime in the past that you procrastinated, you gave strength to these demons. Now it's time to starve them completely for a while.
Get better.
To me, the ability to sit down and finish a project is inversely proportional to the amount of urgency that I attribute to its completion. I recognize tension that I feel when trying to finish a project is really something that I'm making up; I know that programming is easy and I'm at least passable at it. It follows that I can finish the project.
Therefore, all I need to do is find a way to reset my mental state to something neutral/non-tense. For me, science fiction, fantasy, and poetry are all suitable to distract me from the task at hand and dissipate the tension, allowing me to work.
Now, a few years later, I can get into Serious Work Mode, just by putting on the headphones, without listening to music. I've accidentally Pavlov Conditioned myself. It's great.
Start by working on it for only 15 minutes per day. Set a timer and when you reach 15 minutes you have to stop no matter how much you want to continue. It will help you look forward to it for the next day.
After a few weeks you can increase the time you allot per day. But if you ever find yourself getting bored or not looking forward to it, then cut back. It will take some practice to find the right spot.