Manage Your Context Switches to be More Productive
You’re in the middle of patching a bug, and a colleague taps you on the shoulder asking for your opinion on something. We’ve all been in this position. Whether or not you’re a programmer, this situation happens all the time — a phone call interrupts our planning session, a push notification distracts you from finishing your report — and it’s highly destructive to your throughput as a worker.
I decided to share some techniques I’ve started to employ that have really worked for me. I’ll start with ways to avoid distractions in the first place, and then go over what to do in the event that a context switch is inevitable.
1. Turn off all non-essential push notifications
What is an essential push notification? It depends on your engagement level with the rest of the world, but for me it’s limited to just SMS messages. Instagram, GMail, Snapchat, FB messenger (which I don’t use)… shut ’em all off.
2. Batch tasks (like email) into pre-defined chunks
For mindless tasks like email, I typically tend to reserve a part of my least productive hour: 4–5pm. I only check and respond to email during this allotment. Only coding gets my precious morning hours, when I’m most alert. Make sure your pre-defined time allotment has a end time. Set a countdown timer. You can even use Siri:
“Hey Siri, set a countdown timer for 30 minutes.”
“Okay, 30 minutes and counting!”
Great — now you have a defined end to a task that used to interweave itself into your whole day.
2. Work in DND (Do not Disturb) for at least 4 hours each day
Both your Mac and iPhone can be configured to run in DND mode. It doesn’t necessarily have to be 4 hours, but try experimenting for what works best for you. For me, I set a goal of a number of tickets I want to accomplish before allowing myself to be “disturbed.”
3. Be choosy about the music you listen to while working
Everybody is different, but we share about 99.9% of the same DNA. And study after study has shown that music with lyrics is distracting for human beings who are doing cognitively intensive tasks such as coding. For me, headphones are often necessary to escape the sounds of workplace like the clacking of keyboards and sniffling, but instead of listening to music, often I choose the ambient sound of a coffee shop. To the Spotify/Pandora streamers out there: Pay for the darn subscription plan so you aren’t subject to distracting ads.
4. Buy a pen & paper notepad
They can be purchased at any office store for $0.99. Use this as your scratch buffer for things that need to be done throughout the day. Never do something as soon as it comes up. Here’s an example: let’s say I think of a new feature that needs to be implemented…. rather than signing into Jira and filing the tickets right away, I just put a 5-word reminder on my scratchpad which I can then reference when I go to do Jira tickets in batch at the end of the day. Same thing with email — don’t send that email right away… put a note on the scratchpad and wait until your dedicated email batch time allotment to write the full draft.
5. Don’t get dragged into non-problems
Engineers in particular love to solve everybody else’s problems but their own. I’m no exception. I hear about some intern using a c4.8xlarge to run a webserver, and I immediately stop what I’m doing to optimize our EC2 allocations. That tangent then turns into a sweeping overhaul of the company’s AWS spot-pricing and IAM strategy.
In part 2/2 I’ll go over how to save your state in the event that you have to switch contexts.