40

Getting into zone is a pleasurable and fruitful process. We produce good source code and we get lots of satisfaction from our work done while being in the zone. But, how does one get into the 'zone'? Do you follow a specific process? Apart from switching of email system, mobiles and other mundane non-productive applications, is there anything else that can be done?

  • Well, try to not get interrupted, put some music, important is to have same song. Put a song you like, uplifting. The song does not matter, eventually you will not hear it. You need to take a somehow interesting problem for you and you should know how to solve it already. Don't think about anything but the thing. Just let it flow. You will realize you were in the zone after you've been in it, since you are in the zone you cannot know you are in the zone :) – Mihai Stanescu Oct 26 '18 at 19:43
71

Concentrate on what you need to do. Make the effort to actually start doing it. This can be one of the hardest things - to actively stop fluffing about.

Don't have email open. Don't have Fakebook in another window. Don't have any StackExchange going. No forums. Only quiet. And then get on with it.

It generally takes me (and pretty much everyone else I know) about 15-20 mins to get there.

You can generally sustain "the zone" for about 2 hours, and generally only once per day - its mentally pretty tiring. If you are super-duper you might manage it twice in a day. After "the zone" the rest of your day is pretty much lightweight by comparison, you get things done but the burst of huge productivity is over.

Oh - and getting out of the zone takes about 3 seconds - eg a phone call, or somebody sticking their head and saying: "Can I bother you for a moment" - to which the answer is: "yes, you already did". Bang. The zone is gone. Another 15-20 to get back.

Amazing how many stupid s/w defects get introduced by getting knocked out of the zone.

Amazing also how many people (esp managers) think that open plan is a really good way to develop quality software (where nobody EVER gets into the zone let alone stays there).

  • 14
    +1 for open-plan paragraph. – Nobody Nov 22 '10 at 13:07
  • 1
    Perhaps you have a special work environment. Perhaps you are atypicial. If it works for you, don't question it! – quickly_now Nov 22 '10 at 22:54
  • 2
    Open Plan SUCKS big time. Its good for developers to communicate - in groups of 2 or 3. More than that, it sucks productivity up and hurls it out the window. The worst innovation in office planning, ever ever ever. – quickly_now May 1 '11 at 13:49
  • 1
    I strongly disagree about open plan. I work in an open plan office (on the trading floor) AND also at home. Theoretically, I should be much more productive at home (quiet neighbourhood, no kids or pets, my spouse respects that I'm working). The truth is that I'm often more productive in the office. I have CDS traders making deals on the phone next to me, and it only helps me "get in the mood" to work and to concentrate on the problems I'm solving. Seeing people hard at work next to you helps you beat your laziness, too ;-) – quant_dev May 1 '11 at 15:38
  • 2
    To each their own. However (again quoting DeMarco) a number of studies of programmer productivity over a number of years have shown that open plan causes a decrease of productivity. From my own experience, and that of many around me - open plan has been a disaster. – quickly_now May 1 '11 at 23:15
7

Close all browser windows pointing to StackExchange and enough, good coffee might be a good place to start.

  • 1
    music is a must have though – pythonian29033 Oct 19 '16 at 9:25
7

One thing that I've found to be helpful in getting into the 'zone' is actually 'zoning out'. I typically put on headphones and listen to instrumental, not lyrical (in my specific case Dj Tiesto) while trying to ignore the outside world. The headphone and music act as a barrier from the outside world. Studies have proven that listening to classical music helps concentration.

This solution may not be optimal in the corporate environment as connectivity and communication are pivotal, however if the situation allows, listening to music in the background, or on headphone may help.

  • 3
    The lyrical thing is quite key here I find. Another thing I've noticed is that if I'm designing something rather than debugging or programming, music detracts rather than helps and I really need someplace quiet. Just another variable to throw in :-) – Kevin Shea Mar 21 '12 at 11:17
  • I've noticed another variant. Putting active noise-cancelling headphones with instrumental music so low volume that you barely can tell that there is music. Allows to get concentrated. Also allows to take a nap if lying horizontally. – Stéphane Gourichon Mar 31 '16 at 7:27
  • I find that I can listen to lyrical music, but only if I'm already extremely familiar with it. So, a favorites playlist on Youtube doesn't distract, but Pandora or Spotify on random do. – Jeutnarg Jan 13 '17 at 19:27
  • Yeah, nothing worse than thinking you are "in the zone" with music playing, and then suddenly realized you haven't typed anything on your keyboard in 5 minutes because you're singing along in your head, "...writer and a ranger, and a young boy bearing arms... DOH!!" – Ogre Psalm33 Jan 13 '17 at 21:06
5

Here is the Joel On Software article that covers this point.

...the documented productivity gains provided by giving knowledge workers space, quiet, and privacy. The classic software management book Peopleware documents these productivity benefits extensively...

Here's the trouble. We all know that knowledge workers work best by getting into "flow", also known as being "in the zone", where they are fully concentrated on their work and fully tuned out of their environment. They lose track of time and produce great stuff through absolute concentration. This is when they get all of their productive work done. Writers, programmers, scientists, and even basketball players will tell you about being in the zone.

The trouble is, getting into "the zone" is not easy. When you try to measure it, it looks like it takes an average of 15 minutes to start working at maximum productivity. Sometimes, if you're tired or have already done a lot of creative work that day, you just can't get into the zone and you spend the rest of your work day fiddling around, reading the web, playing Tetris.

The other trouble is that it's so easy to get knocked out of the zone. Noise, phone calls, going out for lunch, having to drive 5 minutes to Starbucks for coffee, and interruptions by coworkers -- ESPECIALLY interruptions by coworkers -- all knock you out of the zone. If you take a 1 minute interruption by a coworker asking you a question, and this knocks out your concentration enough that it takes you half an hour to get productive again, your overall productivity is in serious trouble. If you're in a noisy bullpen environment like the type that caffinated dotcoms love to create, with marketing guys screaming on the phone next to programmers, your productivity will plunge as knowledge workers get interrupted time after time and never get into the zone.

With programmers, it's especially hard. Productivity depends on being able to juggle a lot of little details in short term memory all at once. Any kind of interruption can cause these details to come crashing down. When you resume work, you can't remember any of the details (like local variable names you were using, or where you were up to in implementing that search algorithm) and you have to keep looking these things up, which slows you down a lot until you get back up to speed.

Here's the simple algebra. Let's say (as the evidence seems to suggest) that if we interrupt a programmer, even for a minute, we're really blowing away 15 minutes of productivity. For this example, lets put two programmers, Jeff and Mutt, in open cubicles next to each other in a standard Dilbert veal-fattening farm. Mutt can't remember the name of the Unicode version of the strcpy function. He could look it up, which takes 30 seconds, or he could ask Jeff, which takes 15 seconds. Since he's sitting right next to Jeff, he asks Jeff. Jeff gets distracted and loses 15 minutes of productivity (to save Mutt 15 seconds).

Now let's move them into separate offices with walls and doors. Now when Mutt can't remember the name of that function, he could look it up, which still takes 30 seconds, or he could ask Jeff, which now takes 45 seconds and involves standing up (not an easy task given the average physical fitness of programmers!). So he looks it up. So now Mutt loses 30 seconds of productivity, but we save 15 minutes for Jeff...

3

The other answers about how to concentrate and not getting disturbed are good and I have not much to add to them. The only fact I am suspicious about are rules about concrete numbers (how much time it needs for...). I am convinced that such numbers cannot be generalized in such a way. However it is important to concentrate on your task and to avoid getting disturbed.

The task you are working on is also very important!

Here are some general rules about the task you are working on:

  1. One must be involved in an activity with a clear set of goals. This adds direction and structure to the task.
  2. One must have a good balance between the perceived challenges of the task at hand and his or her own perceived skills. One must have confidence that he or she is capable to do the task at hand.
  3. The task at hand must have clear and immediate feedback. This helps the person negotiate any changing demands and allows him or her to adjust his or her performance to maintain the flow state.

Csikszentmihalyi, M.; Abuhamdeh, S. & Nakamura, J. (2005), "Flow", in Elliot, A., Handbook of Competence and Motivation, New York: The Guilford Press, pp. 598–698

These rules are not specifically related to software development but can be applied to them easily.

Just to add some examples on how you can check if these conditions apply to you and your task:

Do you know what will be your next commit? Maybe set smaller goals? DO you use Test-Driven-Development? Do you have the necessary knowledge to complete your task? Do you work with an IDE? etc...

This is only to give you an idea how it can be applied to programming, it cannot be generalised.

3

Get the first task on your well maintained list.

The secret is having that list!

There is one really effective way to beat procrastination. It has been described in the book Getting Things Done.

First you have to maintain a list of things to do. The methodology proposed is great (read it on wikipedia).

Then it's the way you write your tasks.

Rather than writing:

Do the documentation of the new ui (ouch a good candidate for procrastinators)

Write:

Call Robert to ask him to include Take screenshots of the new UI Write a summary about what to say Etc.

The trick is that tasks are small, and are actual actions. It's easy to start. And everybody here know that when you started, you have beaten procrastination.

2

What do you mean by zone? Is it when you are so focused on your work that you forget to eat and the rest of the world and all the people in it seems like white noise when you are focused completely?

I admit I can't do it everyday but on a day when I hit that zone,

Music or headphones with no music is a great way to get into the zone. Make sure you do not plugin your headphone into the computer, make sure it's plugged in to your ipod or mp3 player. This is because it's really easy to go to youtube or start downloading stuff....when your sound source is only music and nothing else.

When you reach the point where you are not focused on hearing the music and it rather sounds like white noise, it's a confirmation that you are now in the zone.

A much more easier way is to just start coding to get the fire going basically....but sometimes just to get that initial stage is tough....well take the music you hear, really listen to the music and get into the music....channel that passion in the music now to your code.

Not the answer you're looking for? Browse other questions tagged or ask your own question.