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

Workgeist Report ‘21

3 Lessons from the Smartest Developers I’ve Worked With

Random Posts

Document your house

We have manuals and guides for the software we use. We have a manual for the car we drive. Why not the house?


Read More

Fix default Android emulator not showing in Visual Studio 2022

I am working on a Maui application in my spare time and Visual Studio has this annoying habit of not showing the default Android emulator when I load the project. I could go through the hassle of creating a new emulator each time but that is painful and slow.


Read More

Negative intelligence

It is very easy to do something negative to try and show how intelligent we are.


Read More