I ran across an interesting article last month in the NY Times about people's inability to multitask well, the impact of disruptions during the work day (such as email) and techniques for improving productivity. The beginning of the article addresses the fact that people aren't very good multitaskers. This is old news to me because I learned about this a decade ago in psychology class. The article starts to get interesting by the third paragraph on the first page:
"In a recent study, a group of Microsoft workers took, on average, 15 minutes to return to serious mental tasks, like writing reports or computer code, after responding to incoming e-mail or instant messages."
Over the past month I've been experimenting with keeping my email program closed and working at off hours and on weekends. I've found my productivity is higher when I keep my email closed and it's higher still on weekends and evenings when there are no IMs or phone calls coming in either. Now when I'm trying to really kick out some software code, I keep my email program closed and check email only once an hour or so.
I've also found that, just as the article suggests, listening to music without lyrics helps boost productivity. The music helps keep me focused on my work and also shields me from minor distractions like beeping household appliances.