RescueTime suggests that peak programmer hours are on average between 2pm and 6pm. This aligns with my experience that we need a solid ramp up period before being productive developers.
Once programmers have gotten going, interruptions are incredibly destructive to the tune of at least 15 minutes to ramp back up depending on memory load.
The ramp up period is so important and the cost of interruptions are so high that it’s important to find ways to defend your uninterrupted time. Book periods of work on your calendar, put up Do Not Distrub signs, get out of the office, etc.
It’s also really important for managers to monitor and defend their report’s time. If your manager isn’t doing a good job with this, it’s a good idea to talk to them about ways that they could help.
Of course, the relevant comic.