That's right, the zone. You've all been there at least once or twice. So how do you get to that point? Do you need peace and quite? Loud music? Lights on? Lights off? 10 screens? Mozart? Redbull? Or are you in the zone the second you touch any computer? I'd love to know!
I have a program called Natura Sound Therapy (which costs way too much these days) that I use to help me get into the zone. It's just a dull droning noise in the background. (I wear headphones.) It helps me relax and block out all the rest of the people walking down the hall or whatever.
I also close my door if I really need to concentrate, so that I don't even see people walking by.
Sometimes I will logout of Messenger, close Outlook, and try my best not to look at my iGoogle home page while my project is building.
And of course, I've got to have my caffeine in its myriad forms.
Oh, one other thing... I find it helps me get in the zone if I make a list of the things I need to work on that day. If my tasks are just sort of free floating chances are I won't be inclined to work on them much.
Music.
The type and specifics are going to vary in my mood, but if there's silence, I can't function for very long.
...Then again my first degree is in music so it's as much a distraction as it is a focusing tool! ;)
I have giant, immensely huge headphones hooked up to my workstation.
OH yeah, also, decent dark IDE colors!
Coming in early in the morning, getting some coffee in my system and having an original challenging problem to solve.
Headphones and working partly in off-hours. Nothing gets you out of "the zone" more quickly than someone coming to your desk and needing help.
Turn off or remove as many outside distractions as possible and shut down email.
I don't think one can use external things to get in The Zone. I've found plenty of things that try to get me out of the zone, but none that get me into it.
Eliminate that which pulls you out of The Zone, and from there it's a matter of practice -- the more time you spend focused in general, the easier it is to regain that focus. It's a Zen thing, you know? You can't force it. Practice it, recognize it after you've attained it, and you'll spend more time in it.
I think your question suggests you're going about this the wrong way.
Mozart / Trance music. Matrix Wallpaper. Dew/Water (depending on if im in a health nut phase). Also, depends a lot on WHAT exactly am I about to do. Is it something new/unkown that feels like a headache (wading through someone else's code) or is it something that feels like a good challenge (adding a new module to add functionality). Some days i am just raring to go and on some, i just feel like posting answers on stackoverflow all afternoon.
Some things that get me in the zone are:
Scrum meetings, after one i feel pumped because others on the team are pumped.
Biz-Dev meetings. At my company we work very close with our business guys and have a good team dynamic with them. I always feel juiced after a quick "what to do next" type meeting. Basically done after every sprint to get feedback, set new goals, brainstorming features, etc. A new puzzle gets me going.
Music: Any specific band is a matter of taste, however anything light on lyrics and heavy on rhythm will get me going.
1) I need to be at ease. Physical comfort is crucial here. I keep things arranged as I like them around me. A good level of hydration is important, I keep water at my desk in a large athletic bottle.
2) I need to minimize distractions. I turn off email and IM notifications. I find a quiet work area, or one with colleagues who know the protocol for working with developers. I make sure I've dealt with anything that can be dealt with quickly, so it doesn't bother me.
3) I need a large block of unscheduled time.
4) I need an interesting problem, or a well defined set of goals.
I listen to very loud music, not in volume because that would annoy my colleagues, but stuff like Drum & Bass, Speed Core, Heavy Metal, etc. The more chaos outside of my head the less I need to generate myself. At least that's what I think is the theory behind it.
As long as it's "controlled" chaos outside of my head, start/stop/next/prev buttons :)
I listen to pandora with headphones. Where I work it's only 2 developers per office so we don't get that many interruptions. Pandora is a nice tool though. You select an artist/song that you like and it finds one that are similar. The other one is sirius satellite radio on my computer.