Back when I was in my undergrad I bought into the whole idea that "I need conditions to be pristine in order to create". Now, a few years spent working in industry, looking back on this view makes me feel like I was a bit of a diva. My brother is a musician and he claims something similar - when he was first starting off, he subscribed to the view that he needed his environment to get into a "creative zone". But the more he wrote music, the easier it got, to the point where he can do it just about anywhere without being affected too much.
I mean really, if you're focusing that much on loop constructs and variable names that you can't do it anywhere except places where conditions are ideal, then I guess that's you. But for me, the really important parts like architecture strike me when they strike me. Usually when I'm going about my business doing the groceries, or in the shower, or on a bus, or something like that - whatever's been tumbling around in the back of my mind takes on some semblance of form, and pops to the forefront when it's damn well ready, not when the ambient light is at a certain strength and the atmospheric pressure is just so. I don't subscribe to the view that I need a "creative zone" in order to produce properly. Once I get hit with an idea, getting it out into code is just drudgery. That can be done anywhere.