Tl/dr: While it’s important to prioritize tasks and work on the highest priority task, you can be more productive by maintaining a list of alternative tasks, and using time that you are blocked to unblock others, and to make progress on the next highest priority task that you aren’t blocked on.
It's Microsoft's twice annual performance management season (what we call "Connects"). As part of that, I've been reflecting on what differentiates some of the most productive engineers I've ever worked with. I've had discussions with a number of folks on the topic and decided to try to write some of them down, and share in case they help others. So, here goes...
Context switching is hard, but it’s also important.
Often, highest impact/priority work will require large chunks of asynchronous work. It can be useful to also have a queue of work that you can get done without blocking that you can switch to when your highest priority task is blocked.
Given that list, when you become blocked on your primary task, pick other work from your queue based on the following guidelines:
Dan Moseley suggested that using the Pomodoro technique may help with this - it gives you a regular time to check if something more important is unblocked, while allowing you to focus in the meantime. It also gives you a concrete unit to estimate tasks in to decide which ones are worth starting now based on how long you expect to be blocked.
This relates to another interesting thing to think about around tasks at work. Ideally you have a balance of ABC tasks*. That’s tasks that are:
Ideally, most of your tasks will be at your current level, some are above so that you have the opportunity to learn and grow, and all jobs end up with things below your abilities, because they are required to keep things moving. There can be an interesting correlation, where you’re frequently blocked on tasks above your level as you wait for guidance, etc. Most things below your level are probably easy to do without being blocked. Things at your current level are likely a mix of collaborative tasks that will be at least partially asynchronous, and independent work.
Context switching is expensive, so do it deliberately. However, we should recognize that we participate in many asynchronous workflows, and if we don’t context switch, we can end up wasting a lot of time. The best engineers context switch only when necessary, but actively work on being able to context switch effectively. There is a tension between context switching and distractability. For example, leaving email notifications enabled and context switching to Outlook every time a new email arrives will result in a lot of overhead from context switching, and likely prevent you from entering a highly productive flow state. However, choosing to intentionally switch to a recently unblocked higher priority task within a reasonable time is imperative.
Also thanks to Dan Moseley, Matthew Gertz, Eilon Lipton, Steve Carroll, Jeff Schwartz, Jared Parsons and others for discussing some of these ideas with me.