4 Ways to Mitigate the Effects of Context Switching

context-switching

Finishing one engagement and starting another always sounds more clear cut than it is. Sometimes the timelines overlap and you find yourself having to constantly change your train of thought. This can cause stress and anxiety. It is amplified when the projects have very little in common.

Unfortunately, context switching is likely unavoidable. That’s why it’s important to take every step possible to mitigate its effects.

  1. Keep track of where you left off.
  2. In some cases, you will have to context switch several times between the same two or three projects. When this happens, you confuse your thoughts, and your memory becomes cluttered and disorganized. Before a switch, take a few minutes to remember where you were on a project.

    Commit messages can be a great start, but they should not be your context switching crutch. Your commit messages should not summarize how you accomplished something, but why you accomplished it. Having commit messages like “added ThisHelperClass” give you nothing more than what your version control all ready does. Instead explain why you added ThisHelperClass.

    In addition to commit messages, try jotting down a few notes about where you are leaving the state of the project. Important things you may want to note are:

    • What you accomplished
    • What still needs to be done
    • What, if any, next steps are necessary (e.g e-mails to customer, new deployment, etc.)

    This will provide a quick reference when you have to (inevitably) switch back again.

  3. Prioritize smarter, and switch less often.
  4. A simple way to reduce the number of context switches is prioritization. Every now and then, bug reports are filed, support tasks are generated, and small application changes are necessary. When you receive that e-mail or phone call about new needs or bugs that have popped up, resist the urge to delve right into the problem.

    Instead, communicate with the customer to understand the importance of these changes. If the changes are “nice-to-have” or small bugs, try to defer the work until there is enough to constitute an entire day’s worth.

    Your mind will probably start churning with ways to attack the problem, so write out your thoughts. Then set a future time to address them. Knowing that you have time set aside for making the change or adding the feature will allow you to focus on your current commitment.

  5. Use lists.
  6. Having a single list comprised of all pending work for a project can be a life saver. Lists will tell you exactly how much work is on the table. A list is a great visualization of the work to be completed. It gives you a concrete thing to determine when your work is completed.

    Lists will also help you organize your tasks to avoid context switching within the project. If several changes need to be made to one area of code, tackle them all at once.

    Lists are only useful if they are accurate, so make sure to update and groom the list as necessary.

  7. Switch environments when you switch contexts.
  8. If you must switch contexts throughout the day, try to make it a complete switch. If possible, move to a different desk or sit at a couch with your laptop. Use the physical change as a cue to clear your mind and change your focus.

    If you cannot change your environment, take a breather. Get out of your seat and walk around before re-engaging in your new context.

Context switching is an inevitable part of your job. Do yourself a favor and ease the pain of context switching by following these tricks. Please let me know what other methods you use to mitigate the effects of context switching.