Ask HN: How do you concentrate?
What are tips/tricks you use to help "build" your concentration?
What are tips/tricks you use to help "build" your concentration?
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.
Fell into that pattern in college when I had to write my philosophy papers.
#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.
Now I'm off to setup a timer on my G1 so I can test out the 48/12 method.
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'll just have to start saving clips I've read that have been very inspiring for reference.
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.
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.
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/
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.
http://onemorecloud.wordpress.com/2009/10/03/productivity-bo...
+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.
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.
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... ;)
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
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.
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'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.
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?"
But I'm seeing improvement.
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..
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
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 :-)
Hard to do in an office environment without strange looks. ;-)
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.
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.
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?
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.
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.
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.
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've been listening to http://www.philosomatika.com/ a lot lately. 24/7 streaming psychadelic trance.
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.
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
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.
Are you disengaged from your daily work? Maybe you need more interesting endeavors?
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.
When I sit back down, I know exactly where I was: making the test pass.
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.
Used under physician supervision he (w/doc) may find a dosage and plan that works for him. YMMV.
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. ;)