Reminds me of an oldie but goodie about getting away from my computer:
"How do you achieve laser focus and concentration?"
The single most important thing I do to "achieve laser focus and concentration" is to work in such a way that I don't need "laser focus and concentration" to get my work done.
This has to be done the night before.
I always quit all online work at least 2 hours before bedtime and print whatever I'm working on.
Then I go into any other room with program listings, blank paper, and pens (especially red!) and plan out all of tomorrow's work.
All analysis, design, and refactoring must be done at this time. I do not allow myself to sleep until the next day's work is laid out. I also do not allow myself to get back onto the computer. The idea is to have a clear "vision" of what I am going to accomplish the next day. The clearer the better.
This does 2 things. First, I think about it all night (maybe even dream about it). Second, I can't wait to get started the next day.
I always wake up and start programming immediately. Once I get going, it's easy to keep going. Any difficulties are probably because I didn't plan well enough the night before.
Not sure if that's the answer you're looking for, but whatever gets the work done...
I used to do large amounts of programming on paper while commuting or waiting somewhere, but in retrospect I threw most results of that away and did in completely different manner when I got to computer. (for example, I wrote most of the macros in dfsch's standard library into my notebook in interpreted code, only to rewrite them in C when I started to actually implement that). But even in that case, programming without computer caused actual boost of my productivity. Unfortunately now I don't have much opportunity to do that and you inspire me to try to somehow make time for that again.
I love doing this. I often quit for the day and then pull out a notebook and fill up a page with ideas for new features, solving a problem, etc. I normally can't think of ideas like that while I'm in TextMate and I'm thinking of how to translate ideas into Ruby code and not about the big picture. Sometimes the ideas I jot down are worthless because they wouldn't actually be practical if they were implemented, but usually it's very helpful. And you're right in that it gets me excited to program the next morning because I can try to turn some of those ideas into something real.
"How do you achieve laser focus and concentration?"
The single most important thing I do to "achieve laser focus and concentration" is to work in such a way that I don't need "laser focus and concentration" to get my work done.
This has to be done the night before.
I always quit all online work at least 2 hours before bedtime and print whatever I'm working on.
Then I go into any other room with program listings, blank paper, and pens (especially red!) and plan out all of tomorrow's work.
All analysis, design, and refactoring must be done at this time. I do not allow myself to sleep until the next day's work is laid out. I also do not allow myself to get back onto the computer. The idea is to have a clear "vision" of what I am going to accomplish the next day. The clearer the better.
This does 2 things. First, I think about it all night (maybe even dream about it). Second, I can't wait to get started the next day.
I always wake up and start programming immediately. Once I get going, it's easy to keep going. Any difficulties are probably because I didn't plan well enough the night before.
Not sure if that's the answer you're looking for, but whatever gets the work done...
Original thread: http://news.ycombinator.com/item?id=191199