views:

579

answers:

11

How long can a compile time get before it starts becoming a distraction to you?

For me:

  • <1 sec, I don't notice
  • >1 min, I'm going for coffee
  • >10 min, S.O. here I come

(any other programming task that involves letting the computer do it's thing also apropos)

+1  A: 

We have a very large codebase with long build times. I try to keep a variety of tasks on the go so that compile time is not downtime. If you can websurf while compiling, you can code while compiling.

moonshadow
+1  A: 

Our compile time is roughly 10-15 minutes as well; I normally browse the web/visit blogs/read news/visit S.O. about then. If I know that the compile time is going to be >1 hour, I normally do that around lunch time or end of day.

It's not so bad, and didn't take me long to get used to. It's a nice way to take a break.

Swati
But which side is the interrupt? :)
BCS
:p SO obviously :D
Swati
+3  A: 

Certainly its never short enough not to distract me from working.

gbjbaanb
Hehehe. Look at "distraction" in my question <G>
BCS
A: 

Shouldn't this be extended to encompass the full dev. cycle?

Code -> compile -> run test -> debug (repeat)

It's not much use having a blazingly fast compile time if it takes two hours to get a slot on a shared test platform! (-:

Edit: Wow. A blast from the past where a linker used to take 12 hours to build the stripped executable! 8-O

Rob Wells
A: 

Long compilations also provide ample opportunities for office swordfighting

Paul Dixon
I suspect this question was engineered to win a bet along the lines of "there'll be at least x references to xkcd with y minutes..."
Paul Dixon
Damn, I even missed the link in the question
Paul Dixon
No bet, But I wish I had! The real thing is that I have a 10s compile that I'm running every 2-3 minutes and I'm wondering if I should figure out how to make it "leaner"
BCS
BCS, are you on a windows box? can't you use the fastlink possibilities in gcc (and its link editor)?
Rob Wells
linux, most of the time is spent in pre-process/code gen. As it stands I'm doing a full clean/re-build because it's easy and wasn't to slow
BCS
-1, the very same link is in the question itself.
unwind
+1  A: 

When alt-tabbing is easy, any delay is a temptation to be distracted from work. I try, however, to multitask between several work activities. So if I need to do a big svn checkout or long build, I'll "context switch" to another work task that is ongoing that can keep me busy.

Sometimes thats not possible though, or there's no second work activity to do, so I end up writing comments on stackoverflow about my lack of productivity ;)

Doug T.
+1  A: 

It's never long enough for me to have time to go for a coffee, even when I do a "build all" on our 2.8 million lines...
But I'm spoiled: we use Delphi.

So the coffee break is when I sync the source code. ;-)

François
+1  A: 

Two people already beat me to the obligatory xkcd.

Compile times for us can take as long as 15 minutes for nontrivial changes, even with some of the validation checks turned off. For certain tasks, I don't mind alt-tabbing and just reading slashdot during that time, but when I'm effectively building a house of cards, then every time I have to wait for the IDE cough RAD cough to finish thinking, it just sets me back and aggravates me further. Having to wait for the type hierarchy cache to be recreated is equally aggravating.

rpfnovak
+2  A: 

I believe Caper Jones discussed some studies in which anything greater than a 1 second delay broke people out of the zone (my gist), and that the time / productivity lost due to that small delay was really an order of magnitude larger than it appeared.

Don't have a weblink, except to the book I read it in: http://www.amazon.com/Applied-Software-Measurement-Assuring-Productivity/dp/0070328269 . When I had read that (I was managing back then), I had some extra RAM ordered for a developer who was complaining about his RAM consumption even though I didn't have the budget for it. Figured $100 was well worth it.

torial
Added link to the caper jones book. Sorry, I didn't read it on the web, just from the book.
torial
+1  A: 

Separate build machine (virtual or physical) that does as-needed or periodic builds.

As the build is progressing, work on the next task, or work towards something else in your productivity zone.

pearcewg
+2  A: 

Sorry for being serious;

The better I get at testing the less concerned I get with build times.

I find I can work for days at a time without starting the application. Why should I, it works anyway ?

krosenvold
Especcially if you have edit-and-continue. That saves a lot of builds.
Mike Dunlavey