Context Switching & Multitasking: A Software Developer's Perspective
Published February 5, 2022 • 3 mins read
I am not really sure how to begin, but let me start with this statement-I worked simultaneously for two companies for one year. Which basically entailed that I worked on two different projects (within different contexts) at the same time frame. Constantly, I found myself switching between both projects, adding features, then fixing bugs on both ends repeatedly. This then leads me to the topic I want to discuss today, which is—Context switching and multitasking.
The Human Brain
Well, we all know that the human brain doesn't multitask in the actual sense, it only switches from one task to another. Therefore, switching between two projects requires that you should be able to understand the context of the project you are switching to, before you can continue on that project—this is a serious debt that your brain has to pay and it can be very draining depending on the scope of project you are working on.
Context Switching & Multitasking
A Harvard Business Review study measured the differences between monochronic teams (low multitasking) versus polychronic teams (high multitasking) and concluded that the financial performance of companies with highly polychronic teams was significantly better than that of companies with average or monochronic teams. The polychronic teams were more superior at taking in and sharing more insightful information than their average and monochronic counterparts.
Multitasking is the ability to perform multiple tasks at once. Can you really do that? Yes, to some extent. Developing your context switching capacity is a boost to your multitasking power.
Your multitasking power is determined by your ability to move around projects and easily grasp what is going on, then finally continue from where you left off.
However, how fast you can grasp the flow of what you are working and where to continue from is what increases your ability to do the same across multiple projects. I will put it this way: the easier it is to grasp the context of your projects, the easier it will be to multitask. So I can rightly say that:
The multitasking power of a person is directly proportional to his/her context switching capacity.
As a developer, there are things to do that can increase your context switching capacity.
How To Increase Your Switching Context Capacity As A Software Developer
1. Write Clean Code With Clearly Named Variables, Methods and Classes: This is the best and easiest way to improve your context switching capacity. Applying the use of meaningful names for your class, methods, and variables makes it easier for your brain to understanding what's going without trying to understand the code syntax and semantics. This actually saves you a lot of mental power, due to the fact that by doing this you can understand what your class does based on its name. Same with your methods and instance variables. I did this a lot in my code and it has really paid off in the long run.
2. Use Version Control And Write Meaningful Commit Messages: The rule to this is:ensuring every commit message is specific. It should address a particular thing you did on the project. Even if you did a lot of things, state everything inside your commit message. I usually do this by adding a full stop or a comma. This will make it easier to understand what commit you are reverting to or when you are doing code review.
3. Define Your Code Structure: Knowing where to find things is also a key factor to apply in reducing the brain power you invest in regaining context. For instance, when I am working on a Laravel project that has multiple users, like customers and administrators, I usually introduce two different controller namespaces for both users. I also register different route files and if I am writing a test for the project, I will do the same. This allows me to know where to find things without consuming much of my brain power.
Most of the things I listed out here are the things I applied while I was doing multiple jobs at Greenlite Nigeria and Across The Horizon Technologies and it really paid off. This is applicable to people working multiple jobs (Although; I don't recommend it) or people working on their side projects. This can really go a long way in helping you increase your multitasking power.
Litehost is my side project which is a shared hosting platform with PHP & Laravel developers in mind. It has Composer, Git & PHP CLI pre-installed on its servers. SSH access is also granted on request. Litehost is pretty affordable. Try it today.