The last couple of years the longest I've been able to manage was probably a couple of hours, 3 or 4 at best.
The thing that will get me out of my concentration almost invariably is some kind of sound. When I really sit down to hack I exit (not minimize) all software that might distract me, and I like to work like that at night, which doesn't help because it screws up my day/night rhythm and then it can take me a long time to get back to 'normal'.
I make no claims about the effectiveness of the technique. Anyone have first-hand experience?
I've been doing zazen for a little less than a month. Zazen is a little different from vipassana(with wich i have even less experience than with zazen, as i said, less than a month). I chose zazen mainly because it sounds so simple: sit with your spine straight up(in the lottos position if possible, im not there yet, im too inflexible) breathe normally and count your breaths for 10 minutes every day, no magic Indian mysticism involved, which is what threw me off Buddhism the first time i encountered it.
For one, it is an excellent way to hone the practice of focusing your mind on your immediate activity. In Buddhist mindfulness practice you will focus your mind not just while sitting meditation, but also while walking or doing chores. Eventually you will be able to bring this focus to every activity you engage in during the day.
So in a way you move into the zone on a semi-permanent (or even permanent) basis.
The broader Buddhist philosophy is also an excellent way to eliminate distractions from your mind. In that philosophy, thoughts and feelings arise almost exclusively due to internal processes, and an important aspect of mindfulness meditation is letting those same thoughts and feelings go. So instead of distracting you like normal, the thoughts and feelings will "run their course" and dissipate much more quickly.
This is how the practice has benefited me the most. I now know that my normal distractions (e.g. checking HN compulsively) are not going to provide anything for me -- they are not a source of happiness or contentment. The mindful focus is my source of that happiness and thus preserving it is what I naturally want to do.
All that said my practice is far from perfect, as I do find myself here reading and answering questions. YMMV :)
Actually, this was one of the most frustrating aspects of the health issues.
If you have trouble concentrating, do not overlook or discount your physical health.
A separate comment. For me, personally, it can take an hour or two to really get into the zone. That can be a challenge. Once really there, distractions fade into the background and I can work a good 8, 10 hours, until outright exhaustion overcomes my concentration. I may take some breaks, sometimes just to walk around by myself. Actually, this can aid the overall process. I stop the conscious concentration and heavy (in my work, typically) visual input. A walk, maybe a cup of tea, etc., engages my other senses and different sensory processing. The work remains in my subconscious, and not infrequently, the change in attention allows me to make subconscious progress that I might not have achieved or so readily achieved through conscious attention.
In such a state, I don't just consciously, step by step, put "pieces" of information and steps of processes together. I tend to form an increasingly developed "Gestalt" of the material and my ideas, and new ideas and relationships reveal themselves as my overall attention (conscious and subconscious) continues to analyze and infer. It's one of the more enjoyable sensations of living.
Until I get deeply into that mode, interruptions and distractions can be quite disruptive. Once I do get there, sometimes -- blessedly -- they fade into irrelevance.