Slashdot Mirror


Finding the Programming Zone?

SlashDotDashDot asks: "As a developer for 20+ years, I've developed a fairly fine tuned way to find 'The Zone' for optimal programming - a combination of furniture arrangement (PC and chair), lighting and music. I also have a pretty good sense of what time of day is best for working on a particular set of problems. But this is what works for me. My company is growing and I'm needing to mediate working conditions between my clients and consultants. This has me wondering what others have found important for finding 'The Zone' in their programming lives. How fast can you get there? How long does it last? What do you do that helps keep that state? What are the major interrupters?" We also touched on this issue in a similar article, last year. However, many of you may have ways of attaining "the zone" that don't depend on any of the factors listed above. If you have a method that works for you, please share. It may work for others.

14 of 577 comments (clear)

  1. Here's how I do it. by ciryon · · Score: 5, Informative

    Optimal condition is:

    * Rather dark and gloomy room
    * Big monitor at high resolution and many xterms prepared
    * Huge MP3 playlist set to random
    * One big cup of coffee (machine close by)
    * Unlimited supply of colas in the fridge

    I'm at optimal performance just when I normally should go home from work. Or when I work home, just before I really should go to bed.

    Ciryon

    1. Re:Here's how I do it. by Bouncings · · Score: 5, Funny

      One more thing: Add the following entry in /etc/hosts

      127.0.0.1 slashdot.org

      --
      -- Ken Kinder ken@_nospam_kenkinder.com http://kenkinder.com/
    2. Re:Here's how I do it. by Tack · · Score: 5, Interesting
      It's interesting to see how much in common a lot of people have, and also how widly varying it can be. Here's what works for me:
      • Most importantly, the problem has to be interesting to me. I can't enter The Zone unless I truly am determined to solve the problem. Sometimes even boring problems can be made interesting once you spend a couple hours tackling them, but typically you'll get better results if the problem is genuinely interesting. (This is why the scratch-the-itch motivation of free software works so well.)
      • I don't hack on coffee; I hack on diet coke. Lots of it.
      • My musical mood changes from hour to hour, so I don't ordinarily set up playlists for more than 45-75 minutes, but I do normally listen to music the whole time I'm in the zone.
      • Agreed: big monitor and many terminal windows are a must. If you can't have at least 6 terms on screen at once, you'll get distracted by toggling between virtual desktops. Sometimes I have up to 12 windows on screen.
      • You just need a fast computer. No one wants to wait long for compiling simple changes.
      • Lighting for me has to be dim, but not dark. I prefer a single, tungsten 60W bulb with a lamp shade on my desk. It provides a nice, cozy warm light and offsets the light from my monitor to prevent eye strain.
      • Everyone has certain things they do when they're thinking about a solution to a particular tough problem (or sub-problem). Maybe you lie down for a few minutes; maybe you pace around the room; maybe you go to the gym and work out. Me? I take a long, hot shower. This yields very excellent results for me. And I have come up with some pretty damn clever solutions under the nearly-scaulding hot water. :)

      How long does this last? This often depends on a few things also:

      • External motivation: do I have others around motivating me? I don't mean a boss squawking at me about deadlines, but rather other hackers I can bounce ideas off of, to help keep the problem into perspective, and help keep me interested. Or, am I getting paid?
      • Running into roadblocks: when the hacking goes smooth and I don't come across any major bugs or roadblocks, I can hack for weeks. But if I hit a serious bug that even a hot shower can't solve, a lot of times I wind up putting the project on the back burner. (Of course, if this is a project that I'm getting paid to do, the motivation keeps me going).
      • Distractions: if I am without uninitiated distractions, I can hack for much longer periods of time. Some distractions are okay, as long as I am the one who initiated them. Sometimes I'll stop hacking to go to the movies, or go out to dinner with some friends. Sure, when I do that, I'm typically mentally detached from what I'm doing, but I usually force myself to have fun. Then when I return to the problem, I often have a fresh perspective that helps me continue.

      When am in The Zone, it is a curse. I can't think of anything else but what I'm hacking on. (This is a problem when I am hacking on a personal project and go to work.) I usually just have to ride it out, keep hacking, until something happens that I put the project aside for a while, and then I usually repeat the whole process again in the future some time.

      So that's how it works for me. :)

      Jason.

  2. Re:Excuse me? by Ivan+Raikov · · Score: 5, Funny

    I hate to tell you, but coding isn't like writing a novel.

    You're a VB "programmer," I presume?

  3. What are the major interrupters? by quantaman · · Score: 5, Funny

    What are the major interrupters?!?

    Hello??

    You just asked the major interrupter!!!!

    --
    I stole this Sig
  4. EXTREME PROGRAMMING! by eVarmint · · Score: 5, Interesting

    When programming alone, I find that the "zone" is an elusive beast that can be found for about an hour or two each day, on average. Some days more, some days less.

    Pair programming, a subset of extreme programming, largely eliminates this problem for me. When I pair up with another developer, I can regularly find the zone each day and stay in it for 4-6 hours. As a project manager, I introduced extreme programming and my team quadrupled their output overnight. And this is with six of us sitting in a garage with cheap office furnature.

  5. Leave Me Alone!!!!! by mo · · Score: 5, Interesting

    Ok, on the whole I like dark lighting, private offices, headphone music (classical). But I'd sell all of this for one thing. Leave me alone. It takes me up to 45 minutes after sitting down to really get into what I'm coding. If I have an interruption every 30 minutes I will get nothing done. Of course it's very diffucult to structure an environment where people can ask questions when they want without bothering all of the other coders who are in the zone. Here's some ways to make this easier:

    * set up an irc server or get everyone on IM. If you have a question, IM it to somebody instead of interrupting them with a phone call or personal visit. If they are in the zone, they can wait until their train of thought winds down to answer.

    * Catered, delivered meals are a diabolical way to squeeze more zone time out of your employees. Nothing is better for me (and the company) when somebody brings in a bag of burritos when I'm in the zone. Delivered dinner is the best way to explioit me for more unpaid work.

    * Good CM and documentation limit the amount of interruptions because people can consult the docs instead of, "Ask Bob, he's the only guy who knows how that works."

    * Let me work funky hours. We've got one guy who gets here at 7:30 AM, another who shows up at noon and stays till 10:00 PM. Why? Because there are large chunks of time where nobody is around to interrupt them. This can wreak havoc at your company if you don't do the above documentation, but it can work out very well if you do.

    Yeah, private offices, screen real-estate and Aeron chairs are cool, but I'd throw them all away for a full day without interruptions.

  6. The Father of Distraction: Websurfing by geoffsmith · · Score: 5, Insightful

    Nothing is more distracting than a web browser. And virtually every programmer has got one. How many people reading this comment right now should be working?

    It's even worse if you do web programming for a living. There is no hope.

  7. Depends on what you're doing by dant · · Score: 5, Insightful
    For bugfixing or pounding out an implementation of an existing design, I have pretty much the same formula as everybody else seems to (massive caffeine overdose, dark, familiar music, and ZERO interruptions--work from home if you can).

    But for design work, I find I do my best stuff in a completely different environment.

    First of all, get away from your computer. If you're doing design, you should be envisioning shapes, graphs, and so on--you should not be thinking about code. Do not look at; do not touch it. Look at a whiteboard or stare at the sky while you're doing this.

    Next, do something (other than caffeiene) to stimulate your metabolism. Play a few games of foosball, or take a shower, or have a cigar. I've done some of my best design work while standing in the shower.

    Finally, let your subconscious work on it. Keep thinking about the problem as you go about your day, but don't stress out about not making any progress. A day or two into it, you'll have an epiphany and realize that it's all very simple.

  8. Re:No distractions by dimator · · Score: 5, Funny

    it could be a problem if the the windows aren't soundproofed enough and I have to listen to the conversations all the smokers have on their breaks.

    Smoker 1: So, we started smoking to be cool and popular, but now all our clothes stink, our lungs are charred and black, and we're the only two dipshits standing out here feeding our addictions while everyone else is inside.
    Smoker 2: Yep.
    Smoker 1: (takes a puff) Is this what you expected?
    Smoker 2: (takes a puff) Nope.

    --
    python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"
  9. Re:Excuse me? by kbonin · · Score: 5, Insightful

    I'd have to make some exceptions to this position...

    Being a surgeon is like being a very talented mechanic, with an excellent memory and fine motor skills. Additionally, the rigors of internship filter out those not qualified or capable. The creative muse has little place in a field where a few fractions of a mm slip in the right place can kill someone. A surgeon can get by with zero creativity other than adapting to "normal variation" in anatomy and being able to recall what procedures to apply, and still function very, very well.

    OTOH, programming covers a wide breath of skills and abilities. Programming batch file processing scripts requires little creativity. Designing realtime attitude control systems requires grasp of many mechanical, electronic, control-theory, and scientifc fields beyond programming, and creativity to figure out how to acheive your goals. Bleeding edge 3d game engines require obscene amounts of creative design skills encompassing and correlating traditional CS, as well as physics, lighting, perceptual psychology, game theory, and much, much more.

    A sr. programmer with a design responsibility on a bleeding edge project with 'creative block' can be unable to do their job "well", even if a "professional". Sure, you can sit down and hack something out anyway, and I've seen the results of that. Unfortunately, many companies can get away with crap code, and I guess yours is one of them...

    Creativity results in elegant programming. Those who claim otherwise, likely do not write elegant code...

  10. Entering "Zone" by MegaGremlin · · Score: 5, Insightful

    For me, maximizing my time in the "Zone" is dependant on one major thing - physical fitness. The more energy I have, the longer I can work - and work well.

    I have a fairly easy system for achieving this.

    1.) I get up every morning at 5:00am and run 3-5 miles,
    2.) Shower (very important step, do not omit.)
    3.) Eat a good breafast (generally a piece of fresh fruit and some "healthy" cereal.)
    4.) Eat a healthy lunch.
    5.) Get out of the office during lunch, for a mental break.

    I avoid artificial stimulants at all costs.

    I find that I generally have much more productive time than the other people in my team, and don't spend 10 minutes on the hour servicing a coffee habit. My mind is clear all day. I don't suffer from the afternoon slowdown.

    Granted, I do fall asleep fairly early in the evening (around 10:00pm) but I provide more work to my employer, on a time schedule that is convenient to him.

    Think about that when the next round of layoffs begin.

    --

    .sig
    1. Re:Entering "Zone" by GunFodder · · Score: 5, Funny

      Sorry, I didn't make it past "get up at 5:00am" :)

  11. Look a little further, guys. by Lurgen · · Score: 5, Insightful

    I thought long and hard before posting this comment... it's a bit on the harsh side, but being a part of the IT industry, I feel I'm entitled to offer an observation (as most /. readers are!)

    There are far too many IT employees, especially programmers, who are under the misconception that they are something special. There are many industries and jobs that involve enourmous levels of creativity and innovation, however I can't think of many that contain so many whining graduates.

    Take teaching for example. Every day, a teacher is required to educate their students. They don't get the option of saying "I can't find my zone, I'll be back in a few hours". The don't have the option of rearranging their working environment to suit themselves (as opposed to suiting their students/team). Sure, you can point out that teachers are generally following a process that is predefined... so are programmers though.

    Looking back within the IT community, take a look at the higher level support engineers. When a server farm catches fire, triggers the sprinklers, and dies a gurgling death, do you really think it would be appropriate for any of them to say "the room just doesn't _feel_ right"? Nope - they have to get the job done.

    Programming, for the most part, is a case of following the yellow brick road. The road is paved by your team leaders, in most cases, and when it isn't there is very little stopping programmers from following the processes and methodologies they claim make them special ("I have a DEGREE!").

    And what about childcare workers? Have you ever considered what it would be like working in an environment totally designed in favour of creatures half your size? I happen to know one or two of these people, and let me tell you that they never bitch or moan about their working environment not being ideal for their "thought process"!

    Face it - we're nothing special. We carry out a job, and not a very hard one at that. Sure, once in a while we need to demonstrate flashes of brilliance, but based on the ones I know, the vast majority of IT workers probably shouldn't have jobs in the first place.

    Be grateful you have the opportunity to work in a field that pays well, offers good working environments, decent job security (those who lie to themselves, and believe that we are any less secure than the rest of the world are fools), and cool toys to play with. Personally, I feel lucky to have the opportunity to work within the field.

    (Incidently, I sit in a cubicle that is rather small, at a desk that isn't particularly comfortable, with a window behind me that casts glare all over my screen, in an open plan office. I can hear my team chatting with their wives, the aircon is unpredictable, and the lighting annoys me. But I get to work in a field I love. Personally, I think I'm winning here)