share
Stack OverflowWhat tricks do you use to get yourself "in the zone"?
[+249] [92] Tim Jarvis
[2008-11-17 21:38:56]
[ productivity concentration ]
[ http://stackoverflow.com/questions/297037] [DELETED]

Once I am "in the zone" I am extremely productive and code just flows out of me, often I can get 2 or 3 days coding done in 1 day. But I find that often its hard to get to that place, I find myself procrastinating, getting distracted by other things (SO for example).

Is this experience common? How do you force yourself into that state of mind? Is it simply something you can't force?

This question is an example of a new trend on SO: significant upvoting to discourage people from closing subjective, off-topic, non-programming questions. It works too, as I've left it open ;) - David Arno
(1) @David - I'm glad you did. It's a problem for me too, and I'm very interested in hearing about potential solutions. - Sherm Pendley
(3) Well while I agree that the question is subjective, in fact I tagged it as such, I would disagree that its not programming related, its very specifically programming related. If I was running a poll (which I don't tend to do) or it was non programming related I would have made it a wiki question. - Tim Jarvis
@David - so many non-programming questions are kept alive. I personally consider the current closing rate to be somewhat subjective. - pearcewg
@Tim - I've had programming questions closed by other who consider it non-programming. It didn't matter how much I disagreed...apparently not all are created equal. - pearcewg
@pearcewg, the closure is subjective, as there are no clear - enforced - guidelines on what should be closed. This is not a programming question, so I go by the requirements that it be marked off-topic and be community wiki owned. As it wasn't the latter I considered closing it. - David Arno
Subjective or not, this is one of many identical questions; just check the Related section. Wouldn't that call for closure? Or is this now officially a chat forum? - bzlm
No, it's not the right question, and oh, try caffiene and a little aspirin, take a nap, and you should be recharged. - Lance Roberts
mark this 'community wiki' - Scott Evernden
Alright, I'm gonna go ahead and say watch some TBBT (The Big Bang Theory)! - Secko
[+155] [2008-11-17 21:53:42] MusiGenesis

Lately, I'm finding the best way to get in the zone is to close my StackOverflow browser.


(15) yeah, but then you just open another one... - Steven A. Lowe
(4) I want to flag this as Offensive. ;) - Stefan
It's a necessary condition, but not sufficient I guess. - blizpasta
A bit easy, folk... - Kevin Samuel
Yeah, I'm embarrassed by this one. - MusiGenesis
Leechblock it :-) - CMPalmer
(12) Yeah... This place is becoming "developer crack" to me recently. - joseph.ferris
@Stefan: the truth hurts, and it's getting truthier. - MusiGenesis
1
[+155] [2008-11-18 00:37:40] CMPalmer [ACCEPTED]

I started thinking about new ways to get into the zone after watching this TED conference video by Mihaly Csikszentmihalyi (pronounced "Chick-sent-me-high-E"):

Mihaly Csikszentmihalyi: Creativity, fulfillment and flow [1]

One of the results of his study is a graph that compares the challenge of an activity vs. the perceived skill that you have in doing the activity. The intersections of the two fall into mental state zones with Flow (or "in the zone") in the upper right where a high challenge is being met with a high skill level. If you think about the things you do every day, it's pretty easy to figure out where they should be placed on the graph and it's pretty perceptive in figuring out your mental attitude toward those tasks.

I printed out my version of his diagram and I try to mentally graph my tasks onto the chart. Then I try to find ways to alter the tasks to shift them toward the upper right (or at least the middle).

alt text

Big Version [2]

I'm reading his book FLOW: The Psychology of Optimal Experience [3] now and it is great as well. It is providing a lot of insights into my personal behaviors that I have hypothesized about and it's interesting to see that worldwide research supports them.

I'll find myself in the zone (or the "Flow") at various times during a programming project, usually when I concentrate enough to start a new part of the project where I have to really apply my skills or research and learn new skills. Once that part is over and the drudgery of repeating and refactoring code, documenting, testing, etc. start it's much harder.

Unfortunately, by Csikszentmihalyi's definitions, reading the web, reading books, talking with friends, and participating in things like SO are also "flow" activities, so they are particularly easy to get distracted by and locked in for a long period of time.

Because of that, Leechblock [4] has been my biggest help in staying on task. I haven't had to add SO to my daily blocks yet, but I do have a special category for it where I can do a "lockdown" on it if I get too distracted.

[1] http://www.ted.com/index.php/talks/mihaly_csikszentmihalyi_on_flow.html
[2] http://flickr.com/photos/cmpalmer/3039778526/sizes/o/
[3] http://rads.stackoverflow.com/amzn/click/0060920432
[4] http://www.proginosko.com/leechblock.html

+1, not for the graph (shouldn't it be a simple 3x3 grid?), but for pointing out that flow only happens on certain tasks, where you are challenged to think - but not too far. - Oddthinking
Yeah, but mine's prettier :-) - CMPalmer
How about a phonetic spelling of the dude's name? Yeesh. - MusiGenesis
According to Mind Hacks, it's pronounced: Chick-sent-me-a-high-E - CMPalmer
So writing documentation would be lower left? - Marcin
Yep, maybe edging into worry as the deadlines approach. Dead center apathy for me would be filling out status reports and attending most meetings... - CMPalmer
As for documentation, make it more challenging. Challenge yourself to write really great documentation, but write it all in HTML using Notepad :-) - CMPalmer
You wrote the name sometimes with 'Cz' and sometimes with 'Cs' at the beginning. (Yes, I know TED has the same mistake.) - hheimbuerger
That's probably because I didn't trust myself and copied-and-pasted from two different places :-) I'll fix it. - CMPalmer
there are so many great talks on TED, don't know how I missed that one. Thanks :) - Anders Rune Jensen
fascinating graph +1 - annakata
This is quite interesting. Definite +1, thanks for sharing it. - zombat
This is amazing! Everything he discussed seemed so obvious at first but this is the first time I've been so conscious of what it means to love what you're doing. - Jonn
2
[+85] [2008-11-17 21:40:10] Tom Ritter

Headphones, a clear schedule, and not having to wait on anyone for resources.


(10) Aren't all of these, apart from the headphones, out of your control? (-: - Rob Wells
(1) Yes and No. You can keep a clear schedule by booking yourself a 5 hour block in Outlook, or by developing in the early morning or evening, as others have said. As for not waiting on people.. I find sometimes I have to work on other things for a few days while I let them free or finish their parts - Tom Ritter
especially the part about not having to wait for anyone else - Iain
+1 but so hard to reach... - Clement Herreman
I understand now why headphones help when writing boiler plate code. They take up the last bit off attention you don't use while coding. - Nailer
@Tom Ritter: I like your suggestion of blocking out times on Outlook to yourself so no one can auto schedule anything - Troggy
3
[+59] [2008-11-19 06:15:29] Tim

I have a few beers.

alt text


Poor millenium edition... :/ - Arnis L.
I find for me it's a much lower BAC - probably around .05-.10. Not too impaired to drive, but relaxed enough that the negative voices take a break. - Boofus McGoofus
4
[+56] [2008-11-17 21:58:08] John MacIntyre
  1. A list of 1-2 hour tasks with a clear result and a time estimate (then I track my time)
  2. Turn off email, and MSN, and don't surf the net
  3. Staying focused on ONE task. Any other ideas or bugs I find are logged.
  4. Fast music helps me code, but when I'm trying to figure something out ... it's got to be silent or slow instrumental.
  5. Knowing that I'll be getting an ass-kicking if the results aren't met, certainly helps
  6. Staying focused on what I need, when I go online. This helps to keep me from getting distracted
  7. Reduce as much of the stuff that takes you out of the zone as possible. (interuptions, poor work environment, slow PC, etc...)
  8. Make decisions quickly.
  9. Make your home page either blank or Google. Never set it to SO, Digg, Reddit, etc...

Good luck


9. Blank homepage, add an non-distracting bookmark bar too, at least keep you 'personal' bookmarks out of it - Stefan
(1) Thank you for that answer. I really like it! I'm sure I'll make use of some of the points... :-D - Sandro Meier
5
[+44] [2008-11-17 22:17:38] casademora

This may sound counter intuitive to many people, but I find when I pair program, I am MUCH more effective. I have someone to keep me on task, and I have someone else to keep on task too. I get the extra brain to bounce ideas off of, and we learn about each other in the process.

Pairing isn't for everyone, but it does help for some like me.


(1) I'll vouch for that! - leeand00
+1 I definitely am more productive when working in pairs. - BoboTheCodeMonkey
(1) I haven't given pair programming a real go, but I find that working in a team of two on separate computers and splitting the load with regular face time more productive for me. Perhaps I just don't have the right Pair. - Tom Leys
6
[+44] [2008-11-17 21:53:42] e.James

I find that a clear list of requirements and deadlines helps to keep me on track. Even if I only have a couple of hours to work, I spend some time planning out my process before getting started.

Most distractions are appealing because they offer instant gratification. When we have a lot of things to do, but no clear plan, our minds will jump at the first task that seems productive. If you have your workflow laid out, the next task becomes obvious.

Also, check out David Allen's book, called Getting Things Done [1].

[1] http://en.wikipedia.org/wiki/Getting_Things_Done

+1 for having a clear plan! - David Schmitt
@Ken: Thank you for fixing my typo :) - e.James
7
[+35] [2008-11-18 00:41:41] Readonly

Make sure that you are well rested. Nothing is more distracting than trying to ignore the need to sleep.


agreed, I bar far do my best thinking when I am either sleeping or trying to sleep. - Evan Teran
i can certainly agree with that. Nothing is more annoying when trying to code when you can't keep your eyes open long enough to complete a line. - Jason Miesionczek
8
[+32] [2008-11-17 21:48:08] Cory House

I close my email clients.


Heh... when I close my email client -- even when I close everything but my text editor and a shell! -- I find myself hitting Cmd-Tab and looking at an almost empty list of programs. I am conditioned! - Rich
But need archived emails or emailing mailing lists to find answers to the problem... - icelava
9
[+28] [2008-11-17 21:43:02] Mark Struzinski

Headphones, iPod tuned to good music, and working very early in the morning, at least 2 hours before everyone else comes in. Also, trying new techniques all the time!!!


10
[+26] [2008-11-18 00:59:50] Oddthinking

The question isn't merely asking about how do I avoid distractions, but how do I get "into the zone", which is more than that. It isn't just avoiding meetings, it is having the right task to do.

From the Wikipedia article on Flow [1] (which is the psychological name for "the zone").

Csíkszentmihályi identifies the following as accompanying an experience of flow:

  • Clear goals (expectations and rules are discernible and goals are attainable and align appropriately with one's skill set and abilities).*

  • Concentrating and focusing, a high degree of concentration on a limited field of attention (a person engaged in the activity will have the opportunity to focus and to delve deeply into it).

  • A loss of the feeling of self-consciousness, the merging of action and awareness.

  • Distorted sense of time, one's subjective experience of time is altered.

  • Direct and immediate feedback (successes and failures in the course of the activity are apparent, so that behavior can be adjusted as needed).*

  • Balance between ability level and challenge (the activity is neither too easy nor too difficult).*

  • A sense of personal control over the situation or activity.*

  • The activity is intrinsically rewarding, so there is an effortlessness of action.*

  • People become absorbed in their activity, and focus of awareness is narrowed down to the activity itself, action awareness merging.

Not all are needed for flow to be experienced.

I have put asterisks next to the items I feel can be controlled, which is hopefully an answer to the original question.

[1] http://en.wikipedia.org/wiki/Flow_(psychology)

(5) I would think that guy needed to learn how to stay in the zone just to get to the end of writing his name. - Doug McClean
11
[+22] [2008-11-18 00:37:10] Bill the Lizard

I break something simple at the end of every day. When I come in the next day, the first thing I do is fix what I left broken the day before. This forces me to think about the code so I can make it compile again. Make sure you break something after you check in the day's changes, otherwise you'll be getting an angry phone call.

Update: Lately I've found that writing a failing unit test works just as well, and doesn't have the added danger of accidentally checking in broken code.


(3) Now, THAT'S a creative idea! What if you could get another team member to break something for you, while you break something for him. You'd each strive to find the right type of thing to break ... just enough of a puzzle to get you started. - Charlie Flowers
(1) thas's really creative ! i hope to remember the thing/s that i broke for the next day ! he he... - Al pacino
Seems like the fix would be really simple - just roll back your code to your last checkin... =P - Erik Forbes
(1) @Erik: It's really only a simple matter of a roll-back if you know that the change was totally irrelevant. Wouldn't you be irate if you spent 30 minutes troubleshooting my change, only to find out I broke something on purpose as a productivity enhancer? :) - Bill the Lizard
I like that idea. It would be good to ensure that the break is something not completely trivial, but also easy to fix. - dotnetdev
12
[+16] [2008-11-18 17:43:18] community_owned

Sound Isolation:

One problem I've had with using headphones is that music through headphones will give me a headache after about an hour. Unfortunately, my work day lasts much longer than that, and I do have some serious yammering types around my cube.

However, I have found that ambient sounds, such as white noise, water, rain, or wind will do the job as good as music without the headache.

Getting Started:

Some have mentioned just "getting started" helps; maybe some specifics that I use will be useful. If I'm coding, I start with a simple routine which is also beneficial in that sometimes I find problems.

  • I run my unit tests to make sure they are working
  • Update code from the repository
  • Rebuild
  • Rerun my unit tests

By the time I'm done with this, I'm usually into code mode and can jump in.

If I'm writing or analyzing, I will go back through stuff I've already written to polish it up, tweaking a few things here or there.

Basically, both these examples involve getting your hands on your desired focus object without a huge initial investment in new thinking or heavy thought - a warm up, in effect. I rarely have to say to myself, okay, I'll start the hard part now; it just happens naturally.


13
[+15] [2010-06-09 00:56:10] Dan McDougall

Believe it or not, "programmer's block" (along with writer's block and similar "funks" we all fall into at least once in our lives) is a mild form of depression. It can be caused by fatigue, diet, lack of sleep, etc. So the quicker you start thinking about this as a symptom and not a problem in of itself the quicker you'll get it solved.

Everyone is different but I've had success in the past with the following:

  • Go to bed early.
  • No caffeine for a day or two (Warning: can be painful!).
  • Increase physical activity (I take the dogs for a little longer of a walk).
  • Get sunlight (to boost your vitamin D, really). If you've been locked away in your programming dungeon for a few days a temporary (big) drop in vitamin D can cause mild depression!

Barring all that: PANCAKES! With LOADS of maple syrup. And Apple Juice. You'll be ON FIRE for an hour and then you'll want to take a nap... Which you should do.


(2) +1, but why all the sweets? - Secko
The post-gorge food coma/nap has a powerful renewing effect. The sweets are there to make it easier to nap. How? They give you a temporary boost in energy and after a little while that energy will drop off like a cliff; leaving your body screaming, "It's nap time!" - Dan McDougall
dude the sweets are just there to mess up your blood sugar. Eat all the sweets you want if you want to worsen your health. Otherwise stick to healthy food. - Alex Baranosky
Let's say my life expectancy is 86 years. Somewhere in those 86 years I get programmer's block 30 times. Each time I have pancakes with maple syrup and apple juice (both all natural BTW =). Do you honestly think the cumulative effect of 30 pancake meals over the course of a lifetime will make any dent on my overall health? Have some pancakes! - Dan McDougall
Hmm, they wont come up in you health chart. However, you will be slightly fatter. - Secko
14
[+13] [2008-11-17 22:04:27] Kyle West

i wait until something completely explodes and I have absolutely no choice but to be "in the zone" other than that, I work for a while, screw around for a while, rinse, later, repeat.


15
[+11] [2008-11-19 04:08:14] community_owned

Edit the hosts file (Windows/System32/Drivers/Etc/Hosts) and redirect youtube.com to 127.0.0.1.


(3) sigh That won't help because you also know how to get rid of the redirect. - Druid
16
[+9] [2008-11-18 02:54:20] Jeffrey Fredrick

Hide Twitteriffic, Adium and Skype. Close Safari and Mail. Then... start.

This last part — start — is harder than it sounds. It means remind myself that no I don't need a drink of water, no I'm not really hungry, no I don't need to get up and walk somewhere, no I don't need to check my email/rss feeds/twitter/stackoverflow.

Two things that help me with coding: TDD & Pair Programming.

Pairing is by far the best way I know to improve my productivity, because it forces me to start.

The next best is TDD because I can make the problem of starting very small. What's the smallest test that I can write next? Write that. Make it pass. Next. Pretty soon I'm rolling.

(Ok, back to my failing test...)


17
[+9] [2010-05-31 22:39:37] Khorkrak

I use this IN THE ZONE light: In the Zone

It's just a simple tap light that I spray painted red. I got the idea from the classic ON AIR lights. I also happened on this do it yourself video and just followed it. Instructional Video [1]

Note: using an LED based tap light is better - less heat emitted and longer battery life.

Also we we're in a near perfect large 4 developer office with windows / blinds and a door located in the corner of the production area of a printing facility (repetitive and tolerable sound from presses) also 2 flights of stairs away from most of the professional staff.

Tomorrow we are finally getting moved up into the cube farm 2 years after the rest of the office staff was moved - oh well :( So I also bought a pair of these babies since I prefer silence to yapping and phones ringing. Music for developing is ok but I get distracted by it sometimes:

Silence!

Airport Worker Hearing Protection [2] I bought them from here for like $25 Airport Safety Store [3]

[1] http://www.youtube.com/watch?v=8-QyNVRLLKk
[2] http://www.moldex.com/hearing-protection/earmuffs/m1-premium-earmuff.php
[3] http://www.airportsafetystore.com/SubCatMProdDetails.aspx?CID=14&SCID=56

+1 Creative reuse of safety gear - mmsmatt
18
[+8] [2008-11-20 22:56:50] Pat Notz

Kent Beck gives a great tip in his book Test Driven Development [1] -- he calls it the Broken Test pattern. Basically, when you're wrapping up for the day you break a test either by creating a new one for the next programming task or by breaking the last one you worked on. Don't check it in -- just leave it in your working copy. Now, the next time your return you'll run your tests and see the failure... naturally you'll dive in to fix the test and before you know it you're back in the zone.

[1] http://rads.stackoverflow.com/amzn/click/0321146530

19
[+7] [2008-11-18 16:52:23] philsquared

Quite a few good suggestions posted already, but most of them are quite "personal" - ie it works for the poster, but not necessarily everyone.

Quite a lot of the suggestions boil down to having some anchor that you subconsciously associate with the state of mind of being in flow. Anchors, especially accidental ones, tend to be very subjective. The good news is that you can create your own ones.

I'd recommend reading up on NLP for the full scoop, but the basic idea is that you set aside some introspective time. Think back over previous times when you've really felt in flow. Relive those moments mentally, preferably in both connected and disconnected states (ie. as if you were watching yourself, and as if you're looking out through your own eyes), and at the moment you think the feeling of the flow state is peaking, trigger you anchor - which could be as simple as pressing two fingers together. Repeat the process a few times - straight away, and also each day for the next couple of days, then as often as you need to top up (may not be necessary).

Once the anchor is thus fixed, you can jump into the state again at any time by triggering the anchor.

This is oversimplified, of course, but there's not a lot more to it. If you don't get immediate results, persevere.


20
[+7] [2008-11-18 05:16:07] Kent Beck

Juggling helps make my thoughts slippery (sorry I don't have better vocabulary for this). Ordinarily I latch onto certain thoughts, often thoughts that don't relate to what I'm trying to do. If I juggle for 5-10 minutes I find I can let the distractions gently go their way and get back to my main goal more easily.


This sounds a lot like what happens in (my) meditation. In fact, I bet it happens with pretty much anything where you have to concentrate on a physical activity. You're too busy to get stuck in thinking about thinking. - Frank Shearar
21
[+7] [2008-11-17 21:48:13] Cybis

Music? Bleh. Music would be distracting.

I would find a completely quiet place to work and get a large glass of strong tea (coffee might work too, I just don't like coffee). I also notice I'm "in-the-zone" more often late at night than at any other time.


I wonder if the difference in the air that makes sound travel further at night makes programmers more effective at night... - BenAlabaster
22
[+6] [2008-11-17 21:43:10] Jeremy Reagan

It also helps to enjoy the project you are on, I have found that if I like the project I am working on I can't get distracted, my boss has to yell at me from my door for me to hear him. But on days when I am working on a project I don't really want to do, I get easily distracted by other stuff (SO for example).


23
[+6] [2008-11-17 22:14:29] Frank V

For me, simply an interesting project or task helps a lot... I've not had something that interesting for quite a while now... ::Sigh::


24
[+5] [2008-11-18 03:08:52] Alex Miller

For me, anything that is "alerting" is intruding - so all mail / im / twitter type stuff must be off. I find I get enormous amounts of work done on a plane, for example (as long as I don't need the net for something). I find the right kind of music help me as well ("right" depends on the work and the mood).

But I think it's equally important (especially I find as I get older) to realize that the bulk of my time is NOT spent in flow state. And thus, it's important to find ways to move forward regardless.

For that, I find trying to do at least one tangible thing on important projects every day is the answer. Maybe all you'll do is one thing - open a file and type a few lines, but if you do one thing a day you are at least making progress. As they say in football - ya gotta move the chains. I'll find that sometimes that simple act of trying to do one thing is enough to quiet down the chaos and spur bursts of activity.


25
[+5] [2008-11-18 09:17:38] nayfnu

I've found this ToDoList [1] program very helpful for getting myself in the zone. I break down any task I have into myriad tiny tasks, estimate how long it will take then set the timer running. It's easy to concentrate when the task is small and you're competing against the clock. FogBugz [2] does the same thing much more excitingly, of course, but then it costs money and I'm incredibly tight-fisted.

[1] http://www.abstractspoon.com/tdl_resources.html
[2] http://www.fogcreek.com/FogBugz/learnmore.html?section=PredictShipDates#hist_Timesheets

26
[+4] [2008-11-18 12:03:48] Anders Rune Jensen

Looking over the answers already posted they have a common theme. In order to get in the flow you need at least 15 minutes of uninterrupted time. This has been established in the eighties [1] through empirical studies. That is why people people complain that they only get work done when: music is playinging, no email/phone distractions, no coworkers poking them, working before/after everyone else does.

So my only suggestion would be to get an office where you have a Do not disturb sign (you know like the hotels :)), and where you can cut off all external communication for a period of time. Say a couple of hours. Often things are not so important that they can't just email you and you can look at it when you have time. Instead of trying to do multiple things at once.

Also I would very much recommend for all people, not just managers, to read Peopleware.

[1] http://en.wikipedia.org/wiki/Peopleware


27
[+4] [2008-11-18 06:47:54] jonathanconway

A morning workout at gym followed up by a cappuccino tends to do the trick for me.


28
[+4] [2008-11-17 21:43:54] Stefan

I sneak up in the middle of the night, drive to the office and sit there alone and drink coffe and listen to music. It will put me in the zone at once. No phonecalls, no email, noone who ask me questions (we have a couple of interns who ask questions all day long).

And thats what Im going to do just now. Its 22.45 over here, my family has gone to sleep. And I will get up and drive to the office to have some powerwork done. ;)


How do you work during the day then? Since workdays are often 8-17 or similar, at least my time is like that and if i went to work middle in the night, i would get pretty much told by the bosses not todo since they need me during the day. - Forser
I work the day after too. As long as you dont go to lunch the day after, its no problem. If you eat, you'll emidiatly be tierd. Then I just go to bed early the day after, possibly at 19.00 when my children goes to bed. ;) - Stefan
Ah, okey. My bosses would never allow me todo that :P which is sad since i feel that i can concentrate better when nobody is around. Specially not the bosses that run around talking in the cellphones or similar. Can go mental with all the distractions :/ - Forser
I hope you take a lot of money for your work. Or it's your own business? - alexmeia
@alexmeia Its not my business, but I have a good salary and bonussystem, so Im happy. I would not go up in the middle of night to program for the company if I didnt think it was fun. But programming is both my hobby and work so it fits me nice. ;) - Stefan
29
[+4] [2010-06-09 00:53:15] mschaef

It's not an easy answer, but sometimes it's the right answer... just push through it. For me, the main difference between 'out of the zone' and 'in the zone' is just the fact that when I'm in the zone I'm making progress towards a goal, and that's something that tends to build on itself.

Something else that's useful is to have a list of multiple tasks to accomplish. If you simply can't make progress on one item on your list, switch to something else.


+1 good advice. - Shaggy Frog
indeed, for some reason I can't concentrate and be in the zone at work there are far too many distractions... - ldog
30
[+3] [2009-03-11 15:30:36] John Fricker

I do two things to maintain concentration - both involve getting away from the computer (which I believe to 50% of the solution).

I practice Lojong [1] meditation. I find that the secular Tibetan Buddhist practices in particular are simple concentration exercises. (The more you do something, the better you get at it, even thinking.)

And I exercise. I love my cyclocross bike and I'll take breaks from coding for a fast 10 mile ride on the road or head for a trail for a little back to nature mind clearing. During crunch time I'll ride hard for a few hours, work up a heck of a sweat and then have some of my most productive code writing for two or three days straight.

Yoga is good too but I find it more for relaxing the body then the mind (although others disagree with me there). Still important for those who sit in a chair for long stretches.

It's seems a little contrarian that time away from the computer improves overall productivity but it's true. Find a healthy alternative activity and go for it. Even a brisk walk can make a difference.

[1] http://en.wikipedia.org/wiki/Lojong

31
[+3] [2008-11-17 21:46:13] Gordon Bell

Listening to a good programming-related PodCast like Hanselminutes, .NET Rocks, Polymorphic Podcast, PowerScripting Podcast, Thirsty Developer, ASP.NET Podcast (no particular order) seems to help get me "in the zone". Usually on a bike ride, or a walk around the block.


(1) Do you continue to listen to the podcast while working? I find there's a big difference between listening to a podcast and listening to music. With a podcast, if I'm busy working then I just miss the whole thing and have no idea what I just heard. - Greg Hewgill
(1) I cannot accomplish anything useful while listening to a podcast. I have to do boring repetitive work that requires zero thought. - Tom Ritter
I'm in the same boat as Greg. When I start listenning the podcast does get me in the mood ... but then the rest of the podcast is lost on me. - John MacIntyre
No, I don't really listen to Podcasts while working, since I don't seem to pay attention to them. Sometimes some music though. - Gordon Bell
32
[+3] [2008-11-17 22:13:21] leeand00

Drinking fruit juice (rather than coffee) real fruit Juice like Naked Blue Machine... What else, oh I exercise at night and that makes my endorphins make me feel better the next day. Maybe putting on some classical music to raise my IQ a notch too.


33
[+3] [2008-11-17 22:46:53] geometrikal

I find that while I am doing a task I don't usually stop and change. To get in the zone, one has to immediately move on to the next task without checking s.o. or email etc. This is hard though, "just a quick check" you think, but if you can resist the urge after a few times you will be fully in the zone.

Today is a good test for me. Yesterday I finished a complicated analysis and report, and now I have to decide where to start. This is another thing that may help - a clearly defined list of tasks so you know straight away which to move on to. I have to do this now, else I will spend the rest of today procrastinating on the net.

From the holistic standpoint, the other things I find keep me on track are an interesting project, a project where I am learning new things, tight deadlines and reward for effort. These things fall under the project supervisor's responsibility.

One thing that worked great, believe it or not, is in a previous job the manager would let us play network shoot em' ups (delta force) for a few hours sometimes. After that we always seemed to get back in the zone. Maybe it got rid of all the pent up frustrations and gave us something to 'work' towards.


34
[+3] [2008-11-18 15:05:56] spoulson

Get comfortable. I code much better when at my dual-monitored desk workstation than at my laptop on the couch.


35
[+3] [2008-11-20 15:25:08] Hamish Downer

The book Peopleware [1] covers this issue very well and is highly recommended. They have actually done comparative studies with multiple programmers to see what helps and what doesn't.

In brief, the most productive work is done when it is quiet and you are undisturbed. The ideal they say is individual rooms. Microsoft, Google and Fog Creek all follow this, though it is rare in most of the industry.

If you are in a shared space you want to minimise interruptions so that once you are in the flow you stay there as long as possible. Having some kind of "please don't disturb me" sign/symbol is useful, as is a general awareness of avoiding interruptions by your co-workers.

If you have to listen to music (to block out distractions around you), I believe it has been found that music without words is the least detrimental. But it has been found that any music can prevent you spotting higher level issues. An experiment was done about how long it would take to complete a program. In one room there was silence, in the other programmers listened to music of their choice through headphones. The time taken was similar, but in the music room no-one noticed that several of the steps the program had to take were equivalent to "multiply by one" - in the quiet room several people noticed it.

(Originally posted to this question [2] )

[1] http://rads.stackoverflow.com/amzn/click/0932633439
[2] http://stackoverflow.com/questions/196148/how-do-you-reach-a-flow-state-while-programming

36
[+2] [2008-12-22 09:25:18] eksortso

I tend to use these techniques to get in a coding mood when I'm sitting in front of my computer.

  • Open up a text editor, and spell out what you want to accomplish. You can also use this to write down questions to ask later, or perhaps to just vent about the spec document. In any case, this little bit of reflection should help you focus.

  • Listen to music. Your mileage may vary on this one. But for me, the best music for coding are those albums that I've heard so many times before that I don't get distracted when I hear them. I also listen to music where the lyrics are in a foreign language I can't understand.

  • And here's something that's surprisingly effective... When you find yourself procrastinating, go on a window-killing spree, and clean off as much junk on your screen as you can. Consider it a penance, maybe. But after closing windows, take a moment to relish your environment, then get to work.


37
[+2] [2008-11-20 23:38:33] community_owned

Headphones, 130BPM and no lyrics.


38
[+2] [2008-11-18 16:37:28] D.S.

Depends what it is, if it is a project I am interested in, and Im learning something new it is always easier to concentrate. If it's routine, it can be hard. For instance, right now...I should be doing other things, but Im here. I'm going to read through some more of the suggestions, maybe that will help.


39
[+2] [2008-11-18 11:52:45] guruz

What I did during my diploma thesis was using 2 computers. The university computer for thesis work and my Macbook next to it for private stuff (RSS, chat, mail). Screensaver of the Macbook of course turned on while working. And no sound notifications either :)


40
[+2] [2008-11-18 14:16:19] GvS

Just be rude enough on my co-workers. They will go away. 15 minutes later it just happens.


41
[+2] [2008-11-18 12:23:25] ttarchala

A couple of things that work for me most of the time, but it's as difficult for me as it is for you and none of them works 100% reliably.

  1. Meditate for a couple minutes in an absolutely quiet place. Dwell on why you are what you are, why you are doing what you are supposed to be doing and try to find motivation in whatever end goal you have.

  2. Sleep LESS. When I am fully rested, it's actually easier for me to get distracted.

  3. Exercise, but not just 20 minutes -- exercise until you are really tired. 2 hours usually does the trick for me.

  4. Do NOT drink coffee. It's great to stay awake in meetings, or for staying "divisibly concentrated" while driving, but for creative focus I find it counterproductive.

  5. (The obvious one) If you have this option available for you, arrange your working conditions for lack of distractions.

  6. (The obvious but less talked about one) If you have this option available for you, have a lot of sex before, so it's off your mind.


(1) ttarchala...Warrior Programmer.. - Egg
42
[+2] [2008-11-18 09:48:09] GeekyMonkey

One pint of good beer to lubricate the mind.


(2) Beer always makes me very lazy. - Paul Nathan
43
[+2] [2008-11-17 23:22:47] Maxime Rouiller

A bunch of work items and some In Flames [1] always keep me rolling.

[1] http://en.wikipedia.org/wiki/In_Flames

44
[+2] [2008-11-17 22:24:39] Genomancer
  1. A good understanding (ie: enumeration) of what distracts me - so I recognize and avoid them easier.
  2. Late night - When I'm full of energy, I get distracted more easily... in the evening it's not only more quiet, but I'm less likely to be distracted when I'm more settled.
  3. "Salience" - aka an impending deadline with a real penalty for failure.
  4. Stimulants - Caffeine, properly prescribed medication (dexidrine), etc. Paradoxically, this doesn't contravene #2... stimulants make it easier to focus.
  5. A partner/supervisor/teammate - together, we accomplish more than twice what we would individually.

+1 for Number 3 - community_owned
45
[+2] [2009-09-02 12:01:59] JacquesB

I disconnnect the network for an hour.


+1 such a simple idea. A variant is, I'm moving to the isolated test lan for a while. There, I have access to servers and printers, but no Internet. - kmarsh
46
[+2] [2010-06-09 01:03:54] Larry Watanabe

I try to do the following:

  1. Keep regular hours

  2. Eat healthy

  3. Get exercise

  4. Don't neglect your social life.

As a previous poster mentioned, "blocks" are similar to depression, so the same kinds of things that are useful in battling depression are useful for battling a block.

Besides that ... you are learning a new framework. To get more done, learn more of the framework :) Seriously though initially the learning curve is going to be steep so you have to accept that what you are accomplishing is both learning as well as producing some artificact. So, you may not be producing much code, but if you are learning a lot, then you are being productive.


(1) good advice, thank you. - ggfan
47
[+2] [2010-05-29 11:26:27] Tauren
  • Turn off the TV.
  • Shut down the video game.
  • Put down the books and magazines.
  • Tell the family to get lost for a while.
  • Silence the phone.
  • Close your email/facebook/etc.
  • Eat something. Drink something.
  • Then force yourself to focus on some smallish task.

My projects almost always have dozens of things to work on at any given time. If I can't concentrate, its most often because I feel overwhelmed. So I'll pick some small issue or feature to work on. It is easier to get into it if I feel it isn't too enormous a task. Do not attempt to tackle some major problem if you are having troubles getting back into it.

Then, once I start getting into the flow of things, it becomes easier to start tackling the bigger issues. While coding the small thing, I've had to review code in other places, so my mind has become more familiar with the project overall. Its at this time that I'm starting to really become productive, and those big, daunting problems all of a sudden seem doable.

Once I'm back in the zone, it's important to stay in the zone. While in the zone, it becomes hard to not focus on the project. I'll go to bed and dream about it, often solving problems in my sleep. In the morning I'll head straight back to coding. I make sure to spend as little time goofing off or getting sidetracked as possible. Because once I allow myself to get off-track, I've got to start all over again.


48
[+1] [2008-12-22 08:32:09] Boris Pavlović

In addition to all previous answers I have a suggestion for a music that helps me staying in the zone. Listening to Haydn's symphonies make me emotionally buffered from the rest of the world. My mind is free to deal with technical problems while listening to this simple, elegant, yet very inteligent music.


49
[+1] [2010-02-24 06:36:34] Mike L.

First things first : GTD - David Allen got it right and to be productive you need to have a clear mind

The brain will always push you towards procrastination unless you have a clear set of tasks. You will always tend to sidetrack if your brain does not see the task as doable.
For this start with something really easy like : start IDE and create a new class. For me the "no time" thing does not work. I know I will never do a good job if I do it really fast . On the contrary I say to myself : you have plenty of time just try to do it right.
Second issue : distractions

1)Turn email off
2)Turn instant messenger off
3)Unless you have a door: Wear the headphones and make sure everybody knows you need to be left alone when you do it. Repeat it to them before starting to code. If you are one of the lucky guys with a door just close it.
. 4)For a design session leave the computer. Go to the conference room and do the task splitting and analyzing (if necesarry with your team if not alone). Write the steps on a piece of paper and then return and code it.

I could never ever design anything right in an open plan office so just make sure you are not there when you need to focus on design.


+1 for eliminating distractions. - Chris Thornton
50
[+1] [2010-06-09 01:09:09] munificent

I also do happen to be learning a new skill(PHP framework) and I think that is the main reason why I feel I can't do anything.

Ramping up on something new is always good for making you feel incompetent. I'm current moving from several years doing C# desktop apps to Java + Javascript web apps. I feel like an idiot pretty much every day. I think they only things you can do are:

  1. Ask for help. There's no shame in not knowing something.
  2. Remind yourself that you're a good programmer, you just don't know this technology yet.
  3. Be patient and set your expectations appropriately. Don't expect to turn out code in a new framework at the same rate you can in one you've been using for years.
  4. It may help to tinker in your free time on something that's within your comfort zone just to have a reminder that you do know what you're doing.
  5. Remember: you'll get there. And you're learning something new, which is always good. Pain means you're growing.

51
[+1] [2009-09-22 15:27:41] Davie

get the earphones in and listen to some music!


52
[+1] [2009-03-11 15:04:43] Emil C

Here is a nice technique http://www.pomodorotechnique.com/ I've tried it and it works.


53
[+1] [2008-11-17 22:36:20] Rob Wells

Having a serious deadline! Totally makes me focus on the job in hand!


54
[+1] [2008-11-17 22:39:31] Joe Philllips

A tangible, realistic milestone/goal.


55
[+1] [2008-11-17 22:06:37] seanb

For me, plenty of sleep, very early mornings (4 - 5am), extra strong coffee, and absolute silence.

That works until 8 or 9 when the distractions start to kick in.

Usually try to get the hard stuff done in that time, and often get 3 or 4 times as much done before 9, than the rest of the day (til 16 - 18), which tends to get swallowed by more businessy stuff, phone, emails, meetings etc.

Some people seem to be the other way around, and do their best work at night, depends on how your wired up. Anything I do at night is usually crap.


56
[+1] [2008-11-17 21:44:23] aSkywalker

I find a little 'walk' - or pacing, as I plan out in my head what I want to do. I use this as an exercise in focus - forcing my brain to keep on topic. Visualize what I want to get done, then stick on headphones, block out any distractions and do it. If I get sidetracked (start checking email, SO etc,) do another pace.


57
[+1] [2008-11-17 21:52:08] Sara Chipps

After everyone leaves I get some dinner turn on CNN, and sit and code.

Other times headphones work, I listen to my "Rock Out Day" Radio station on Pandora.


58
[+1] [2008-11-18 00:40:29] dsimcha
  1. Tea
  2. A clear idea of what I want to accomplish and how I want it to work.
  3. An interesting project.

I'm pretty interested in the work I do, tea is readily available, and if you don't have a clear idea of what your high-level design is yet, you're better off figuring that out before even trying to get into the zone. Given these three, I find that I get into the zone sooner or later, but it can take some time for the context switch to happen, so the real key is:

Absolutely minimal waiting on stuff (waiting to compile waiting for my program to execute so I can determine whether it's working correctly, etc.) because if I have to idly wait more than 20 seconds I get bored and my mind drifts, and no requirement that I do anything other than focus on my problem (go to class, answer people's questions, eat, etc), so I don't lose my train of thought.

For me it's kind of a self-fulfilling prophecy. If I know this last requirement isn't going to be met, I just assume that I'm going to have a relatively non-productive day and don't even really try to get into the zone.


59
[+1] [2008-11-17 22:58:41] Robert Wilkinson

Put on your headphones, close the email client, and if you have windows, close the blinds.


60
[+1] [2008-11-17 23:02:32] WestDiscGolf

I've currently got a very long project (as of today I'm down to 56 days remaining from an original total of 100+ days) and to keep motivated I have to keep setting small deadlines for myself and aim to get small chunks done by a certain time; this helps me get in to zone. Some happy hardcore dance music or vocal trance also helps. The steady (fast) beat helps me to concentrate!


61
[+1] [2008-11-18 04:02:23] Kozyarchuk
  1. Go to a pairing station, with no access to phone, email and an understanding from others that 1 min interrupt costs 15 min of development time.
  2. Break the routine, which usually means come in on a weekend.

62
[+1] [2008-11-18 05:02:59] Spacehamster

I'm lucky enough to have an office to myself. To get into the zone I do several things -

  • Shut the door. This is a clear signal to everyone that I intend to work and I'll brook no disturbances.
  • Listen to music on my MP3 Player - it's very relaxing and helps me get into a "zen meditative state".
  • Make sure I have a clear list of tasks that I can get on with. That always works. I can't count the number of times somebody has busted down my door and tried to get my attention, and failed because I'm just too busy to notice they're even there.

At the advice of somebody else earlier in the thread, I've just added Leechblocker [1] to my browser and it's working beautifully. Thanks!

[1] http://www.proginosko.com/leechblock.html

63
[+1] [2008-11-18 10:40:55] Tader

You just have to drink exactly the right amount of alcohol [1] :)

[1] http://xkcd.com/323/

64
[+1] [2008-11-18 11:33:35] Cocowalla

To really get going, this is my formula:

  • Headphones (and music!)
  • Close email client
  • Turn phone ringer off
  • Steaming mug of coffee

But still, this isn't 100%, and some days you are just more "in the zone" than others


65
[+1] [2008-11-18 13:01:20] The.Anti.9

I close Adium or Pidgin [depending on which computer I'm on] and IRC. And then I can really focus. Those are my two biggest distractions.


66
[+1] [2008-11-18 13:45:05] Andy Gherna

Mostly covered above, but music choice is also important. If I'm doing a bunch of repetitive file edits that I don't have a script/alias for, I want to listen to music that is repetitive (rock, metal, etc.); something that matches the rhythm of my work. For more complicated work, I'll listen to something like classical or jazz. Sometimes I'll listen to nothing at all.

Definitely have to turn off all distractions though. Close the blinds if you have a window (close the door if you have one). Turn off email/IM, leave the webbrowser off and even turn off the phone for a couple hours (use good judgement here).

Finally, short bursts are often the most productive for me vs. long marathon sessions. I can get into a flow by taking more breaks rather than working for a long time and getting tired about 1/3rd the way through and hating my work by the end.


67
[+1] [2008-11-18 20:09:12] Even Mien

I don't get in the zone until I have a looming deadline and everyone else is gone or asleep. This includes wife, kids and co-workers. Then I don't have to worry about responding to emails, changing diapers or talking to anyone.


68
[+1] [2008-11-18 20:19:34] community_owned

Watch Cosmos or the documentary that shows how Fermat's Last Theorem was solved


69
[+1] [2008-11-19 06:05:49] melaos

set small achievable but still challenging goals. and put on earphone with some good music and bang away.

short breaks help too so you can refocus and review what you've done. a good cuppa of joe always help.


70
[+1] [2008-11-19 06:07:22] okcodemonkey

I lock myself in my basement with a fresh pot of coffee, headphones, red vines, and my ipod loaded with adrenaline music. For some reason I find that I am most production from 12:00AM - 8:00AM, so I also will take a nap when I need a productive night, from about 8:30 PM - 11:30PM after I have put the kids to bed. After I get up I am ready to "Rock and Code" and can usually get myself a good 3 days work out of those 8 hours.

When I am at the office, we have pods and a noisy environment. I believe we score a 2 on the Joel test. So the only way to get in a zone is to practive time management techniques like in "Getting Things Done" by David Allen. Close the email, turn off the phone, turn off IM, turn on adrenaline music and go. Unfortunately, people still stop by ruining the ability to stay in the zone for long. Hence the need for my "dungeon" sessions as the wife calls them. :)


71
[+1] [2008-11-19 11:30:33] dcraggs

One of the problems is just getting started. It helps if you have a list of things you need to do, then just pick one of the simple tasks and do it, that way you can start to get a flow going.

If you think of something else you need to do but not right away, add it to your list.


72
[0] [2008-11-19 22:40:49] Matthew Ives

I would have to agree with many of the others. Music helps. It really helps to block out the distracting people around you. I listen to music whenever I'm doing something that I can't get into the mood to do, such as yard work or chores around the house. I like to think that it tricks your brain into thinking that your doing something you enjoy (listening to your favorite music), when your really doing something else. I also agree that sometimes the music can be distracting in itself. I love to sing. So, when its a good song, I find myself singing along or I'm instinctively learning the words. I read at least one answer here that said 'white noise' is the best. Well, for me, I listen to classical music, usually Yo-Yo Ma, while I code. There aren't usually any words to sing along to and it still does its main job at keeping me on track.

I would also like to add my thoughts to the notion of getting into work early. I find this very helpful. There usually are not many other people in the office at that time, unless they also enjoy getting into work early. Don't get into work later and figure that you can stay past the time that everyone else goes home and then get your work done in peace. That doesn't work, at least not for me. By that time, you've already been working for a while and you just want to go home with the rest of the bunch. I'm not a morning person at all, and even though it is painful for me to roll out of bed at 5:30 or 6, it is actually very rewarding to get into the office, get my work done, and head for home at 3 or 3:30. This is especially true, in the summer months when that extra couple of hours after work lets me enjoy more of my day.


73
[0] [2008-12-22 11:00:37] Peanut

It doesn't matter what you do ... if the piece of work you're doing is boring ... you're never going to get into the zone. So basically steal all the good work for yourself.


74
[0] [2008-11-21 00:09:57] jcollum

Noise meditation (hear noise, learn how to ignore it) is very helpful. That term might be incorrect; it's one of the basic meditation types that I learned right after breath meditation. Meditation is, to me, the direct manipulation of brain state to bring about greater concentration and control.


75
[0] [2008-11-25 16:22:10] Kent Brewster

A small piece of black electrician's tape over the message-waiting light on my desk phone works wonders.


76
[0] [2008-11-27 17:35:02] Daniel Silveira

Joel Spolsky has a nice old article related to that subject: Fire And Motion [1]

Sometimes I just can't get anything done.

Sure, I come into the office, putter around, check my email every ten seconds, read the web, even do a few brainless tasks like paying the American Express bill. But getting back into the flow of writing code just doesn't happen.

...

The diference is that he says "in the flow" instead of "in the zone" :)

[1] http://www.joelonsoftware.com/articles/fog0000000339.html

77
[0] [2008-12-01 13:34:24] Peter Evjan

I really recommend using the Pomodoro Technique to achieve this. Basically you tell yourself to work focused and uninterrupted for 25 minutes and stick to it, using a timer of some sort. If an interruption arises, such as someone coming by and asking a question, kindly tell them that you will answer it later, and make a note of it. Then get back to work.

When the timer has ringed, you allow yourself a short break during which you can go get a glass of water, talk to your colleagues or surf stackoverflow (although you're not supposed to do anything too intelligent during the break, it is a brain break after all).

If you stick to this, it will be a lot easier for you to focus on the task at hand and to get into the zone.

To get started NOW with the Pomodoro Technique, you can read Staffan Nötebergs excellent blog post Pomodoro Technique in 5 minutes [1].

[1] http://blog.staffannoteberg.com/2008/02/22/pomodoro-technique-in-5-minutes/

78
[0] [2008-12-03 16:51:05] BenAlabaster

I find my iPod is great. Oddly, the playlist with all my favourite tunes that I would've thought would be what would work best doesn't work too well.

However, my Gym playlist seems to trip me right into the zone in the exact same fashion it does in the gym. It gives me focus and keeps me there.

I guess I should put that on and quit wasting time on Stack Overflow...


79
[0] [2008-12-03 17:14:02] community_owned

I use Rescue Time [1] to keep track of how I am really using my time instead of how I think I am using my time. It is free for the personal user. I then remove those items that are time wasters. This might not be a way to directly get into the zone but it feeds on zoning by removing distractions and encouraging success.

Another technique I do is to have a TiddlyWiki to brain dump things. I use the MonkeyGTD wiki on Tiddly Spot [2] as it follows the style of Getting Things Done [3]. Just writing down all those little things that take up brain cycles makes it so much easier to focus. Let the list handle the worry while you 'git er done'.

[1] http://rescuetime.com
[2] http://tiddlyspot.com/
[3] http://en.wikipedia.org/wiki/Getting_Things_Done

80
[0] [2008-12-03 17:22:54] community_owned

open up a notepad instance and type in whatever you need to do that day donot do any other tasks other than those listed in notepad Put up a donot disturb note in IM and if possible shutdown email , IM Identify your weak times . for example after lunch i tend to be bit lazing around.. so that time use it for simple tools and tricks development.. this would get you on the track for next 3 hours last: Take a break at times


81
[0] [2008-12-08 16:12:36] kushin

Nothing can beat Adderall XR. But under normal circumstances, I would stick to meditation and ambient music.


82
[0] [2008-11-18 01:06:03] Oddthinking

In A Nerd In A cave [1], Rands talks about how he gets into the Zone, how he gets near the Zone, and how he comes out of it with a snap.

[1] http://www.randsinrepose.com/archives/2006/07/10/a_nerd_in_a_cave.html

83
[0] [2008-11-18 00:46:50] Michael Herold

I first close out of all distractions. This includes, but is not limited to, NewsFire (my RSS reader), Adium (chat), Mail (email), Twitteriffic, and Firefox tabs. Then I put on music.

The key about the music, at least for me, is that it has to be made up of all songs that have the same tempo and texture. Generally albums fulfill this, but Pandora is great for this purpose. It pulls various artists that all sound similar, so you don't get bored. Lately I have found that listening to What's the Story (Morning Glory) by Oasis or the Back to the Future soundtrack help me focus the most. Oasis is all fairly mellow music that puts me in a good mood, and Back to the Future is fairly inspiring, yet not overpowering.

Also, having the lights off unless I need to read something helps me to focus for whatever reason.


84
[0] [2008-11-17 22:16:31] alexmeia

I need not thinking about time. No time tracking, if possible. If not possible, I try to ignore it. And everything goes faster and better. Maybe I am the only one, but if someone says to me: "This is what we need to do. Take your time and do a nice work" then is easy to get myself in the zone. If the phone doesn't ring, of course.


85
[0] [2009-03-11 15:09:38] bzlm

Once you're in the zone, technical doubt flows out of you [1].

Don't go there.

[1] http://www.nomachetejuggling.com/2009/02/21/i-love-pair-programming/

86
[0] [2009-09-02 11:57:36] Jacob R

I think the most important thing is to know oneself. Analyze your behaviour - when do you tend to be the most productive? What factors are involved? Time of day? Sleep? Tasks? etc.

For me, this time of day - about an hour after lunch - I rarely get a lot of creative work done. I try to read e-mail, do routine tasks, and read (borderline work-related) blogs (and Stack Overflow :)).

Before lunch, and then again around 14-15 I get some more coding done again, and after ~17 when most people have left work I get the most done. Try to utilize your peaks and be prepared with work to do then, instead of throwing them away on administration or whatever.

I am not totally stable in my productive curve, but over time I get stuff done, and I get it done good. A modern employer will recognize that and give employees freedom and responsibility to put their own schedule, because you know yourself best.


87
[0] [2009-12-16 16:04:20] Repo Man
  • Classical music, especially that of the Baroque variety.
  • Huperzine A

88
[0] [2009-09-10 14:37:34] armannvg

I know this sounds strange but sometime just unplugging the mouse and only use the keyboard gets me "in the zone". The keyboard is also much faster input device, you only need to learn the basic shortcuts and you are good to go.

Personally if I need to fire up a browser I use Start->Run->firefox {url} to open a web page. Google also has Keyboard shortcuts [1] which has helped me a lot. For the basic web pages I need to look at (news and stuff) then i've been using the webs mobile version.

[1] http://www.google.com/experimental/

89
[0] [2010-06-09 01:15:04] tkolar

Above many other things... ...do not start reading SO. Yeah, I'm disregarding that at the moment.

I find that breaks can help. Get away from your computer - taking "a short break" and doing stuff online can prove fatal to a productive coding session - change setting for your break. If you can, lie down for a couple of minutes every now and then. In general, feel comfortable, and drink enough water. It's easy not to recognize you're actually thirsty if you've had plenty of other stuff to drink, only that most of that other stuff contained too much sugar to provide much benefit in terms of liquid.

edit: Oh yeah - which framework?


90
[0] [2011-10-11 18:01:26] Adam Caviness

Any classical music by Dvorak, honestly.


91
[0] [2010-05-11 14:47:52] Chris Thornton

If you have kids that are diagnosed with ADD, and find that lots of their symptoms seem familiar, such as having trouble sticking with boring tasks, be open to the possibility that you have ADD too!
With good meds like Concerta, I'm much better able to stay on-task, particularly with somewhat boring and non-inspirational material. And I'm also a much safer driver. And yes, I have a legal prescription.


92