Dealing with Context Switching Hell


For the short interim, I'm working a multitude number of different jobs/commitments, none of them really by choice. It's incredibly stressful, and I highly don't recommend it unless you want to be overemployed

If you are faced in a position of dealing with being forced to context switch often - and putting new hats on all the time - these are things that helped me

1. Do your "deep work" sessions in 3 hour segments

I can't do any productive level of coding work unless I have at least 2-3 hours of free time to knock a ticket out. Check your schedule ahead of time to find where this block of time is.

For me, our company core hours for both teams are from 12 to 4 pm EST, which seems to be pretty standard. I avoid doing any real "focus" work here because I know I'll be inevitably dragged into a last minute meeting or message, have to check slack updates frequently

Instead, I do all of my coding work that requires deep focus early morning, or late at night (but not too late)

2. Protect your time and don't context switch often

In the past I've always said "yes" to mostly everything because I like helping out, but it always came at the expense of putting other's needs before my own.

Don't do this. Be really aggressive about how much time you need for yourself, because context switching requires mentally unloading one project and loading another into your head. That whole transition eats up a lot of mental space and can be draining very quickly, especially if you swap multiple times throughout the way.

Try to limit the number of times you have to context switch

3. Aggregate your chores


A lot of low hanging fruit can be done without much thought at all. These are best to aggregate in chunks - so you can knock it all out in one swoop

Here's some examples:

Checking messages: You can message all the updates to your teammates across all project, check emails, text messages, etc all in one go around. Even if you are working 5+ different projects, this doesn't require a huge amount of mental capacity normally. Churn out an email with ChatGPT if you need to, and call it a day

Physical tasks: - In meetings where I'm not critical or need to be fully present (e.g. I'm just a fly on the wall), I usually go around the house doing chores and keep my cameras turned off. In the end you save so much time to enjoy later after work

Do these tasks inbetween meetings where you are already forced to do low hanging context switching often.

It's a good practice to also do all of your collaboration work here as well - and figure out ways to optimize your work doing chores

4. Choose what hat you are going to wear at different times through the day


I usually wear a number of different hats. Sometimes I have to wear a "leadership" hat for Tampa Devs, othertimes I need to wear a "coder" hat for work.

Depending on the situation, I'll wear different hats. During heavy meetings at work, I will don a "leadership" hat, and context switch this away when I have a larger chunk of time for focus work, e.g. don a "coder" hat.

Sometimes I have to wear a "financial planning" hat - for things I need to do for family, work, etc. Here I'll also lump in other chores that require long term planning focus - updating passwords to accounts, etc

Other times I will be wearing a "Reflection" hat. Related tasks here include posting some of my travel photos on social media, writing blog posts, and making slide decks for Tampa Devs.

Ideally I try to wear that hat once, at most daily. And I try to limit myself to only wearing 3 hats at most in a day. I trigger different phases of when I want to wear a new hat. For instance, when I code - I put on my favorite lofi hip-hop soundtracks. If I'm reflecting, I'll pop open onenote for private articles, for public works.

I associate different objects, tools, with different "hats" that I wear to so speak

I wrote a blog post more about donning hat and how it's good for team communication: describe what hat you are wearing


These are some lessons I've learned in dealing with a lot of context switching. The hardest challenge is if things become a dumpster fire across all the commitments going on - things will be incredibly stressful. I don't recommend overcommitting, or being overemployed for long durations of time

Hi 👋

I'm Vincent Tang, a web developer specializing in modern Javascript. This website is my digital garden of notes on backend, frontend, and devops! I'm the founder of Tampa Devs and I also run a coding podcast called Code Chefs