How many hours can you code maximum?

+1. Yeah.. multiple projects at once is stressful.
I'm saying that it can be stressful if you want it to be - for example, if you overbook, yes, you're going to be stressed. It doesn't have to.

Programming itself is quite enjoyable to me atleast. I can't imagine a day without looking at my netbeans. I love this feeling of sort of brain-storming through algorithms. Why? I dunno why...
 
Now about 5 hours a day.Starting with Android SDK.its really fun.
 
I've been programming professionally or over 10 years now...

If you program 6 hours for 5 days straight, you've been working hard.
 
There was a time when I used to code for upto 6 hours continuous. New a days not more than an hour.
 
in the past i've done like 40 hour sessions with energy drinks. it got pretty bad, i had too many jobs that needed to get done and my health declined a lot. recently i just take it easy and work for myself :/
 
In my case I can only program up to 18 hours and then I'm done.
 
After 6 hours of constant coding, I feel exhausted. I can't really force myself to go further because at that point I have no motivation.
 
Well, effectively you can code around 2 or 3 hours. Everything more isn't serious mental work, and requires resting for full concentration.
 
I used to pull 80 hours weeks when I was younger, but keep in mind I loved my job because it was a hobby before I got hired.

Several years and a few burn outs later, I've learned to pace myself. Rarely, but it does happen, I end up having to pull 12 to 20 hours; generally because something seriously went wrong or a deadline is in 24 hours. My ability to code optimally starts dwindling after ~6 hours, at 12 hours I'm probably no better than someone paid half my salary, and at 20 hours I might as well be a junior level programmer with the types of mistakes I'll start making.

Ideally however, you don't hack away at a problem until you have a solution; you work on other things you can finish while your mind works on the problem subconsciously. Too many times I've spent 10 hours trying to solve a problem, only to wake up one morning and go "wait... OMG why didn't I think of that sooner". C'est la vie.

Once I start getting bored with a project though, probably 30 to 40% of my billable hours are due to the frequent distractions I'll let affect me. 5 minutes here, 2 minutes there, 15 minutes there, etc; and it adds up pretty quickly.
 
Last edited:
I've had days where I was just completely occupied by code the entire day. And I enjoy it, which is probably the primary reason for why I do it :).
 
I can code for hours and hours, all day long, and if it's an enjoyable project I can go through the night. It's a hobby of mine, not programming for work. When my brain gets a buffer overflow, I'll take a break.
The hardest part of coding is debugging.
 
8 to 10 hours per day when i used to work for SAP based companies. Nowadays 5-8 hours per day but may fluctuate according to need. Coding is stressful with the amount of analysis it requires, but it is manageable like every other profession.
 
I code 8-5 in my daily job, but after i get home i work on my projects in average 3 hours.
 
Too damn many lol


but usual work days are 12+
 
Scott Hanselman advises 25 minute sprints combined with 5 minute breaks. It's all about training and discipline, but most of the programmers I know just can't be productive after 8 or 9 hours of intensive programming. That stands for me too.
 
i find it best to plugin for 1-3 hour stints at a time, then take 5 to 45 minute breaks. if things are moving smoothly and i just did a 1 hour stint then a 5 minute break where i walk around, use bathroom, water etc and go right back in. if i'm coming out of a multi-hour stint and am feeling more fried i will take a longer break and clear my head (fully unplug). i find i can code 10-14 hours a day highly effectively and then recharge with 8 hours of sleep.

some tips i use:
-don't ignore water and food intake, it will screw with your energy and focus
-coffee and energy drinks for me cause too much of a spike/erratic & fall in energy and jitters which clouds my head. i prefer tea when feeling tired and water at all other times. i also recommend working out.
-if unplugging during a break, write down a few notes to significantly decrease your ramp up time after plugging back in.
-if you are stuck on something or hit a wall (perhaps dealing with an error), become self aware faster and take a break instead of trying to power/brute force your way through it. a clear mind and starting again from a fresh slate usually resolves the issue significantly faster.
 
I think I am best at 2 x 3 hour stints per day, with a quick 5 min (tea) break in the middle of each 3 hours. I also need relaxing electronic music, no singing.
 
I can code for 4-5 hours, no more (including a couple of short 15 minute breaks).
 
Not more than an hour or 2 trust me, If i put my music on, I can go on for like 6-7 hours
 
Back
Top