tags:

views:

190

answers:

5

Just curious. How many hours can you productively program for? When you are programming a certain language can you last longer?

(Feel free to add in something like what your conditions are like and/or some tips to increase your concentration)

A: 

9 , 14 if there's enough coffee

(followed by day slacking at reddit or SO).

leeeroy
+2  A: 

Ummmmm while(true).

while(IsAlive)
{
    code();
}

while(!IsAlive)
{
   code_in_hell();
}

/*
    We assume that unlike Shrodinger's Cat 
    I can't be in `state == a*|IsAlive> + b*|!IsAlive>`
*/
TheMachineCharmer
if( !coffee ) { break; } ?
vfilby
NO. `if(IsDead){code_in_hell();}else{continue;}`
TheMachineCharmer
try { ... } catch ( DevilIsHRLadyWithTalkingDolphinException dihrlwtd ) { System.WriteLine "HELPPPP!!!!!"; }
vfilby
`try { ... } catch ( DevilIsHRLadyWithTalkingDolphinException dihrlwtd ) { System.WriteLine "HELPPPP!!!!!"; } goto:CODE` ;)
TheMachineCharmer
This makes me happy because it actually works on first run.
C Bauer
+6  A: 

On a sustainable daily basis about 6-9 depending on the amount of red tape I have to handle.

And the key necessity is headphones... I need to block out the world.

vfilby
+1 for headphones.
SB
Man, hell is when I forget my headphones at home and have nothing at work. That is a bad day. So I bought a set of noise isolating headphones just for the office. At a previous place with more space I used to have a set of Grado SR-225's... those are awesome headphones (but open so they can disturb coworkers).
vfilby
+2  A: 

I would say it varies day to day. Sometimes i find myself working 12+ hours productively, while other days i find it hard to even be productive for a minute.

And Joel did write a blog about this that explains it perfectly.

Nix
Yeah, I love Joel!
sixtyfootersdude
+3  A: 

It depends on how interested I am in what I'm coding. If I've got a fascinating problem to solve, I can keep going all day, 16 hours or more, interrupted only briefly when basic biological needs become too pressing to continue ignoring.

If it's something I really don't care about but "has to be done", an hour or two at a time is pretty much my limit.

Mason Wheeler