Taking a short break every 20~30 minutes is a good idea for other reasons, too. It gives you a chance to get up and walk around for a minute, which gets your blood moving and counteracts some of the ill effects of sitting in a chair all day. And it gives you a chance to re-examine whatever task you were working on; it's surprising how often you'll realize you were making the job overly complicated, or doing something that didn't really need to be done.