Subj : Re: programmer concentration To : comp.programming From : David Date : Wed Jul 20 2005 01:22 am Hello, On Tue, 19 Jul 2005 21:34:07 UTC, beliavsky@aol.com wrote: > The recent thread "Eliminating distractions while programming" has been > interesting. I have some questions along the same lines: > > (1) What is a good way for a programmer to spend his time when he must > take a break in coding while waiting for a program to compile and run? > It's fun to spend that minute or even 15 seconds browsing the web > (including Usenet), but it's too easy for the minute to become 10 > minutes. Also, one's train of thought is disrupted. I think it's most > productive to continue to think about the prorgram even during coding > breaks, but WHAT should you think about? When I'm in "development mode" there are many things on my mind. Just because a compile may take a few seconds (or more) doesn't mean that I have to wait for it to complete. Keep pencil/paper or an editor open and keep working. I use very short implementation steps, so compiles are generally enough of a feature that they can be tested. Then I do the various tests and all code coverage. Then I go back and delete comment flags that state the new feature has been tested. Phlip will argue that formal tests should be there too, but I've not had that trouble. If you are truely done with a step, move on to designing the next part of your project. There is also that well known time-waster known as documentation. A few minutes there once in a while wouldn't hurt too much. > (Side note. Does anyone play tournament chess? A similar question > arises -- what do you think about when it is your opponent's turn and > his clock is ticking? Good players still focus on the game while their > opponent is thinking, even if they get up from the board.) I'm lucky to let the project/game go after weeks of being away from it. I'm always looking for improvements and doing planning. My photographic memory helps though. Keeps me nimble for when management or a customer asks for something other than planned. I've usually got a partial idea on how to adjust to their new needs. > (2) For how long should a good programmer be able to concentrate in one > stretch? I'm afraid that since all my computers have become connected > to the internet, my "stretches" have shrunk to 15 minutes. Maybe it's > best for some people to program on a computer without an Internet > connection? If you allow distractions to overpower you, productivity will go down. Try to practice staying focused. If need be, disconnect from the net. That may include phone, email, and IM too. I also avoid development when I'm not focused. I'll make more mistakes than are necessary and not be productive. Its best to do other tasks like docs, planning, checking in with the team, or whatever still might be considered productive. David .