views:

1596

answers:

22

When I'm working on software, I find that as soon as I have to wait more than around 6 seconds for the compiler or for the program to start (or simply for Visual Studio to process some really complicated command like, say, Space Bar), I tend to fire up the email client, or go read stuff on the Internet, or post questions on StackOverflow.

Do you know the problem? How do you keep focused? Is there some maintenance task that can be done in the meantime that does not get in the way of your concentration?

(My build is finished, I can go back to working now)

Carl

+2  A: 

Optimizing your build :)

harpo
+26  A: 
Chris Bunch
For the sake of completeness, the title text is:'Are you stealing those LCDs?' 'Yeah, but I'm doing it while my code compiles.'
Cebjyre
+2  A: 

I was inclined to shout: "Use a dynamic, interpreted language!", but then I remembered how long unit tests take to run and how much more often you're supposed to run them and then, dang! We all lose :(

Daren Thomas
Well, actually, no. While your unit tests run, you can write more code. If you can out-code your unit tests... time for some parallelization. :)
Nicholas Riley
Nicholas: you could also write more code while you build. Neither is probably a good idea because if the tests/build fail, it'd be nice to know what went wrong.
Laurence Gonsalves
+1  A: 

I'm always processing background tasks while compiling - reading Stack Overflow, catching up on blogs, reading News, scanning new mail for things that I can process in few seconds ...

When I run out of mail/blogs/news, then I have a problem >:-/ Luckily, now I have SO which is always fresh and new ...

gabr
+2  A: 

Our builds can take up to 15 minutes. Often people are building just to test some small change, so whenever I get demands for better hardware to accelerate full builds, I counter that they have plenty of time to write unit tests that will make full builds unnecessary.

erickson
A: 

Playing xblast or reading news. It depends on the succsess and on my mood.

nutario
+1  A: 

If you're happy to stay at your desk, blogs/stackoverflow/a dip in the twitter stream for gossip and goings on. Or, alternatively, go for a walk around the office, stretch the legs, grab a drink and shake any cobwebs out of the brain. The chain should be long enough to stretch from desk to kitchen.

Lou
Yep, I tried that getting up and walk around thing - I find it's the best way to do something with those little time slices without breaking the concentration too much. Ok, Visual Studio has finished launching, back to work.
Carl Seleborg
It's a bit of a strange sensation the first few times, but you'll get used to it. cheers. :)
Lou
+9  A: 

I used to play little games like Dice Wars but now I read Stack Overflow, get distracted then realize my compile finished an hour ago.

Adam Pierce
Great, I hate you.
ryeguy
A: 

I actually don't stay concentrated :-(

Nathan Fellman
+1  A: 

Use the time as a pause? We all take too little time for them

Robse
A: 

Use TDD to develop your code, so you are mostly using small projects that take a lot less than 6 seconds to build

David Sykes
Well, our codebase is huge already, and TDD was not built-in from the start, so I can't really do that. Besides, I regularly need to check out some branch and build it, or run svn update and other such long tasks.
Carl Seleborg
What about using the spare time to read "Working Effectively with Legacy Code"?
David Sykes
+3  A: 

And why can't management get their heads around the fact that if they bought us faster kit the cost would be more than offset by the gain in productivity?

Si Keep
+10  A: 

Maybe you could update your documentation? It's pretty common for documentation to be left behind, so if you've got to wait while a compile happens, then you could fire up your editor and see where you're up to. Alternatively, you could have a notepad of "todo" items, and check through that and see where you're up to in your day's tasks?

JonTheNiceGuy
+1  A: 

I'm that guy.

I walk around and say hi. I go in to the kitchen to refresh my drink. I fly my remote control helicopter and aim for my boss' head, if only because it's hilarious to watch him jump when it drops on his head.

Most of the time, though, I have too much crap to do. I spend a little bit of time to plan for the next hour and usually can get 3 - 4 processes started simultaneously. It takes some practice, but I have found it increases my productivity by an order of magnitude or more. In my experience, there's 2 upsides to increasing productivity -- you're known as the guy to go to when something needs to get done, and you can take more time to indulge in SO,Email,Blog,Twitter, or socialize as mentioned above.

Nick Stinemates
Is being the "go to" guy when stuff needs to be done a good thing though? As they say "no good deed goes unpunished."
Jason Baker
+5  A: 

Work related:

  • Scan compiler output for warning messages and fix them straight away;
  • Expand documentation for the project you're working on. Wiki or whatever you use;
  • Scan your notes for more to-dos that you will be working after compilation;
  • Discuss your progress with team-mates or boss. What was difficult? How did you solve the problem?
  • Commit into the repository (esp. if you have private branches and can commit untested code). Write meaningfull commit-message;
  • Write down 4 bullet points for features that are yet to be implemented. Order by perceived easiness;

Other:

  • Have a tea, coffee, orange juice, smoke etc.;
  • Stretch your muscles. Avoid RSI;
  • Stare through the window, let your eyes rest;
  • Write some doodles on your work notes;

Do not read blogs. Keep focus on your project.

Having 4-cpu Sun Niagara T2 that can run $> make -jWTF also helps.

tadeusz
+9  A: 

Ok, so based on more feedback and a little testing, here's what I found the most effective to keep focused on the project at hand while waiting for my development environment to execute some medium-lengthy task (> 5 seconds).

  • Lou's suggestion: get up and walk around. Look out the window.
  • A touch of GTD: keep a notebook nearby and write down any ideas that come while waiting. Don't actually do anything, just write it down as it comes.

For whole project rebuilds, I'll still keep coming to Stack Overflow :-)

Carl Seleborg
+4  A: 
Mauricio Scheffer
I'm working on a simulation right now. It doesn't take that long to run, but I keep tweaking it and re-running. This is exactly how I feel.
dsimcha
A: 

I have found that turning off the network on my machine (for local builds) helps me concentrate when this happens. I route email to another computer or phone, and then I'm forced to do stuff within my machine without reading crap online.

Uri
A: 

im just sit there seeing at the window, hoping that my netbeans did't crash with a >1k class j2ee project when i click run

rkheik
+1  A: 

It seems like the core question is "what do you do while you wait to work on your computer again?" This could mean compiling, downloading/installing updates, and it's a time-slicing problem.

For myself, I keep a list of short tasks on-hand that I can do while waiting for my computer to become responsive again. Most of the time I'll know about how long I have and do something else. Here's how I'll commonly spend the downtime:

20-60 seconds. Use the bathroom, fill the water, check for new email.

2-5 minutes. Respond to an email, have a snack, pet the dog.

10-20 minutes. Read some RSS feeds, walk the dog, StackOverflow.

30-60 minutes. Fitness (stretching, weights, jogging, etc...), book time, HULU time, prepare a meal.

JMP
+3  A: 

This time, I searched SO for "waiting for compile".

nbolton
A: 

I sometimes have to wait a few minutes to get a build and all the automated unit tests run, which gives me the time to run through a bit of a check list:

  • Are my cards updated on the task board?
  • Do I know what I want to do after I get this change done?
  • Are there documents that should go along with this change?
  • Does there seem to be any issue where I shold focus instead of what I thought I should be doing next?

Granted some of this can get into a sort of OCD in terms of asking the same things over and over again, but then this is why there are therapists to help find ways to tweak this so it doesn't cause burn out.

JB King