Context switching and code reviews
You are deep in a piece of work and making great progress when a phone call or message breaks you train of thought and derails you. Context switching can have a huge impact on productivity.
A study in 2021 claimed that on it takes on average nine and half minutes to recover from a context switch. From personal experience I think that it can take a lot longer to get back to the point you were at prior to the interruption.
As part of our workflow we make sure that all code submitted is reviewed. When a developer is deeply focussed on their own tasks one of the last things they want to do is context switch to review someone else’s changes. This change of head-space means that code reviews can be left much longer than the ideal.
A post about things learnt from senior software developers contains a simple change that could speed up the review process and avoid the context switches.
Always do reviews in the morning before starting on your own work so you’re not context switching.
It does mean that a code review might not happen until the next day but at least it will happen then. And the reviewer can then focus on their task for the rest of the day without the context switch of reviewing the other code … they will still need to cope with the meetings, email and messages unfortunately.
Links