Ask HN: How do you get and stay in the "zone"?

135 points by impendia ↗ HN
I have heard HN'ers describe being in the "zone", a mental state where you block out the entire rest of the world and are extremely productive.

I used to be able to get there regularly, but I went through a stage in my life where I had an enormous amount on my mind, and hence a lot of serious distractions. Life has since calmed down, but non-serious distractions have taken the place of the serious distractions.

I am fortunate to have blocks of hours at a time where I have nothing to attend to but my own work. What are your mental strategies for making the most use of them?

Thank you!

109 comments

[ 3.8 ms ] story [ 208 ms ] thread
A few ideas:

- starting a block with something you will be happy for doing later.

- but also building momentum by starting on smaller tasks

- sometimes and for some people and some tasks hacks like pomodoro (basically: the next 25 minutes I will not do anything but this particular thing I have decided. Then and only then I will stop and decide what to do next.)

-"auto focus" is also a winner sometimes

Judging from Secret, a lot of them snort Adderall.
When I was still working in science I got into this state regularly (I called it "the Flow" since I felt like surfing on some kind of mental wave). When I joined a company I lost that experience at first, until I got to work on some sophsticated problems, and until I learned to decouple me from the environment. At university that was no problem, but at a company there are more restrictions in place (more or less fixed working hours, working environment, telephone, internal chat, meetings etc).

My strategy is to create a temporary environment which isolates you -- not necessarily in a physical way. No emails, no meetings, no talking (earphones and loud music help me much, maybe also a sign like "genius at work" -- it's funny but makes people understand you need to concentrate). And then there is only you and the code, and that's your portal into the "zone" or "flow" or whatever you want to call this meditative state.

Instrumental "fast rhythm" music (i.e. Apocalyptica, Ludovico Einaudi...)
This.

No rap or hip-hop though, that's too distracting. If I want to sink down, shut out everybody and get into the "flow" like someone said before, it has to be vocal trance for me. I mean, they call it "trance" music for a reason:

http://en.wikipedia.org/wiki/Trance_music

"A trance refers to a state of hypnotism and lessened consciousness. This drifting sensation is portrayed in the genre by mixing many layers and rhythms to create build and release."

Once you find a genre that works for you (mine is vocal trance), you can literally shut everybody out and have that laser focus for long periods of time. It's a borderline ASC - Altered State of Consciousness.

This is so important and comes up so often that I now have a boilerplate answer from:

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

and also #49 here:

http://v25media.s3.amazonaws.com/edw519_mod.pdf

*

The single most important thing I do to "achieve laser focus and concentration" is to work in such a way that I don't need "laser focus and concentration" to get my work done.

This has to be done the night before.

I always quit all online work at least 2 hours before bedtime and print whatever I'm working on.

Then I go into any other room with program listings, blank paper, and pens (especially red!) and plan out all of tomorrow's work.

All analysis, design, and refactoring must be done at this time. I do not allow myself to sleep until the next day's work is laid out. I also do not allow myself to get back onto the computer. The idea is to have a clear "vision" of what I am going to accomplish the next day. The clearer the better.

This does 2 things. First, I think about it all night (maybe even dream about it). Second, I can't wait to get started the next day.

I always wake up and start programming immediately. Once I get going, it's easy to keep going. Any difficulties are probably because I didn't plan well enough the night before.

(comment deleted)
It's not exactly a mental strategy but earphones just loud enough to block out the surrounding sounds with music that I know totally by heart (and without vocals) seems to be the best way for me.
When I was in university I had a serious problem with concentration and being "in-and-out" of the zone. So for two years I made an effort to have something chewing in my mouth(started with candies, then pen, and after a couple of unfortunate blasting incidents-coffee stirring rods) whenever I was 'in the zone' or about to be.

After a while, I've been conditioned to be "in the zone" on cue by chewing on a coffee stirring rod. it works about 50~70% of the time, and I have to be not tired at all. It's good to have it invoked on cue, though. I find drinking coffee in general not helping; caffeine is great in getting hufed up for a short duration, but I try not to consume more than two cups a week.

Addendum: A sad side-effect was that now I cannot seem to have meals without being mentally engaged - be it reading or conversing.

> A sad side-effect was that now I cannot seem to have meals without being mentally engaged - be it reading or conversing.

I love it; side effects of life hacking. Nice tip though, I might try that.

There's no reason to avoid caffeine. It's a very stress protective substance. Coffee with a little bit of sugar is a great way to sustain concentration far longer than you otherwise could. If one is adapted to it, it does not make one jittery.

Another lesser known chemical trick is aspirin. Aspirin boosts energy, mood, and concentration. Some days I down nearly three grams. I find it works synergistically with coffee.

One of my co-worker and one of my friends drink at least three cups of coffee in the morning alone to get the day started. The chemical tolerance they've built up scared me off.
Music actually takes me out of the zone. I find getting a small victory early keeps me motivated to keep going.
Keep in mind you're asking for advice on staying focused on a forum that many people visit to avoid doing their work...

That said, I like https://www.rescuetime.com/ which tracks time spent on distracting vs productive tasks. It's hardly perfect, but it helps "keep me honest" to know I can run a report to see exactly how much time I spend reading junk online instead of working.

White noise and Pomodoro.

That said, I think learning how to start quickly be productive through consistency beats the hell out of chasing the zone. An hour, or even 20 minutes a day, every day or damn near it as opposed to multi-hour binges when the stars align.

I've been very fortunate that the flow gods have allowed me to have a very productive month. It definitely has to do with the fact that I'm staying at my parents house all alone babysitting their dog while I work from home. I've had 0 distractions save for the mailman and I've put up some good numbers.

I'd say the best thing you can do is eliminate all distractions and block out large swaths of time to work. I took yesterday to do all of my menial tasks such as filing taxes, getting proof of insurance for a ticket, dealt with a verizon phone bill, etc. With all that out of the way, I find it easier to 'free your mind' and focus. Unfortunately I haven't fallen into gear yet naturally so I'm going to try to jump start my engine by just forcing my hand to work. Once you get in motion its easier to stay in motion.

Music and being up late when no one else is around do the trick for me. I find if I try and work during the day on anything that requires real concentration then I end up being distracted by everyday things. This is probably bad advice though as having a natural sleeping pattern is important but I do find it helps me.
People say music. But I think it's just an exercise in programming yourself - it won't be immediate.

http://notmysock.org/blog/2005/Oct/17/

Oh and lots of sleep.

I sleep 8 hours or so and wake up with a lamp next to my bed triggered to turn on 1 hour before I need to wake up.

You really have to keep your body out the way of your mind. I eat far less food when I want to get into the zone.

I take a step up and walk about every 50 minutes or so. 10 minutes of walking around every hour, just to keep my eyes from hurting - used to play pool alone when my office had a table.

I can hang around 10+ hours in the zone that way.

But I get about 4 days of that a month, the rest are just 4 hour work-days (2 hours + 2 hours uninterrupted).

Mental Strategies? None. I just start working. I force myself to get started. Once you start, you're halfway done.

Now once you've started. Don't stop. This may seem obvious but prepare by using the restroom or getting a glass of water beforehand.

Once you've been working for a while, usually >20 minutes, you're in the zone. Congratulations. Don't award yourself. You can go to the bathroom, get more water, but make sure you're getting back to work. If you sense yourself getting off task, X THAT WINDOW! AND FOCUS! It's as easy as that.

It also helps to be challenging yourself. If you're working on some stupid project that an 11th grader could do then I don't know how you get in the zone. Hard problems take more dedicated concentration which makes diving in the hard part and staying in very easy.

Routines.

Flaubert once said, "Be regular and orderly in your life, so that you may be violent and original in your work."

Go to bed at roughly the same time. Get up at roughly the same time. Eat breakfast (prevents sugar crashes later in the day). Do some light exercise when you get out of bed (7 min workout, holla) and then meditate. Do actually intense exercise once or twice a week. Snack a few hours after your lunch.

Take care of your body and keep it prepared for the work you have ahead of you.

When you get to work, plan out the rest of your day. Write down what you intend to do (you get a lot better with being realistic with this list) and split it out. Don't open HN while you wait for your tests to run. Timebox everything else.

Also, take regular breaks. Get up, stretch, go for a walk, read for a bit.

Procrastination I find is closely linked to mood, so make sure you've taken care of that as well.

I do 80% of the above and I still have procrastination spirals but it's gotten a lot better.

What do you do while your tests run? :)
Ideally, you find other short tasks that you needed to get done but in practice I keep a New Yorker or a book by my desk.

Less likely to only come to my senses half an hour and 8 tabs later ;).

I'm at the HN and "8 tabs later" stage. Thanks for the reminder. Back to work!
I tend to try and avoid "the zone" because I'll often find I'm holding too many ideas in my head rather than in the code and as such I'm not expressing myself well in code.

I used to come across code I'd written while in the zone later and have a hard time figuring out what I was doing/thinking. As such I end up with poor variable name choices and weird hard to follow algorithms that all made sense at the time but are a maintenance issue after the fact.

When you're programming in the zone, you're programming at your peak cleverness. I'm reminded of the Brian Kernighan quote - "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."

Mihaly Csikszentmihalyi is the guy to read on flow. Try his book, "Finding Flow: The Psychology of Engagement with Everyday Life"

Not exactly on your point, but here he is on video http://www.ted.com/talks/mihaly_csikszentmihalyi_on_flow/

For a different approach, try this article, 'Your Never-ending (and Needless) Pursuit of “the Zone”' 1) You are living in the feeling of your thinking—whose quality is constantly in flux. 2) negative thoughts (actually, all thoughts) are random, neutral, and powerless 3) simply stay in the game.

edit: Never ending pursuit link link added http://garretkramer.com/your-never-ending-and-needless-pursu...

edit2: The video does offer one response to your question, especially when he discusses the chart that appears at 15:28. Adjust arousal and control to home in on the flow state.

(comment deleted)
Different things work for different people but I'll throw my techniques into the ring. I have worked from home for the last 10 years so some of these won't be suitable for a corporate environment.

- Start immediately, as soon as you get to your work environment. For me that means no breakfast, no coffee etc... until one function/problem/failing unit test/something is done. Since I'm at home when I wake up I get dressed then go straight to the computer and open my editor and start working. This gets me in the mood straight from the beginning of the day.

- I find getting into the Zone is often really about finding the next task to complete. Leaving work on your local machine with a failing unit test or compiler error helps is a good way to give you defined task to complete next time.

- If the environment is noisy and headphones are necessary, music without lyrics. I tend to like trance or orchestral movie and game soundtracks.

- If it's not part of what you want to accomplish don't check your email until after you are already running out of steam. Reading and answering emails is easy enough work but usually completely kills any flow I have or at least fills my head with information not helpful to the task at hand. Same goes for any instant messaging etc...

- In much the same vein disable the internet for a while, I've never been more productive than when I was on an overseas day flight.

- People are distractions too, late nights (when I was in my early 20s) and early mornings (nowadays) are productivity's friends.

- Don't visit sites like HN until after work is finished. Hard to do but is knowing that "Company X releases/is bought by Y" ASAP going to help you work in any way?

- Finally (Work from home/self owned businesses only) if you're not feeling it, call it a day and do something else/go out have fun. If you're anything like me, by giving yourself a break you'll make up for it in productivity later.

    <rant intensity="105%">
You have no idea how much I wish that first one would work for me. We've got a very dysfunctional 30 minutes status meeting (legacy of a long-since moved on manager) every freakin' morning which could just as easily be handled via email.

The first hour of each day is basically wasted - the first half hour nobody's going to start something because they'll get interrupted half an hour later, and the meeting itself accomplishes nothing except sapping any motivation the participants might have arrived to work with.

    </rant>
Music is usually my go-to. The Music For Programming series is very nice for the purpose, very calm, ambient type stuff.

http://musicforprogramming.net

On visiting HN and other sites - it's easy to break the habit with LeechBlock for firefox, or similar for whichever browser you use.
These are awesome tips! I like silence the best for focus (less cognitive load the better). These have been a godsend: http://www.amazon.com/3M-Peltor-H10A-Optime-Earmuff/dp/B0000... Basically just your basic noise blocking headphones. For extra blockage insert earbuds under them. Sublime silence.
I'm not sure why it never occurred to me to get an inexpensive pair of earmuffs designed specifically for blocking out sound ($20), as opposed to a really expensive pair of reference-class headphones ($200+). Most of the time I just want to block out sound. And when I want music, I can probably put in my comfy earbuds and put the earmuffs over them. Thanks for the idea!
(comment deleted)
1) Put on headphones, listen to music without lyrics (or in language that I don't understand). 2) Close browser and email client and open code/text editor.