You should be able to context switch with zero cost
You should be able to context switch with zero cost if you want to grow as a software engineer beyond a certain point.
I often see posts about the cost of context switching – e.g. how an engineer was building a complex technical solution to a problem before they were interrupted and now has to restart from scratch. From there, the usual debates start about returning to office, people not respecting quiet areas etc.
I’ll start with an observation: The more senior you are, the more likely you will be interrupted. This is merely a consequence of having more responsibilities – an outage on your system will happen, someone in your team/reporting chain will need you etc.
With that being said, context switching is possible with zero cost – I regularly do it, e.g. when working on multiple pull requests at the same time, doing emails while tests are running etc. Here are a few tips that allow me to do so and that may help you:
- You need to reduce the cognitive load of your work. You can do this by better understanding your system and being able to abstract pieces – this would allow you to have less things to “load in memory”. Similarly, you should improve your tools/muscle memory as much as possible for mundane tasks – e.g. have shotcuts for common actions like diffing your branch against a remote master, pushing to your local branch, triggering tests etc.
- While some interruption can’t be ignored (e.g. if you are paged), many can. I know this is difficult, especially as we live in an hyper-connected world but the truth is not every Slack messages need your immediate attention. My phone never rings/vibrates (unless my wife calls/texts me 😅). This allows me to address Slack messages, emails etc. when context switching has a low cost (e.g. when I’m done with a task/sub task).
Thoughts? How do you personally deal with interruptions?