A few months ago I was tasked with writing a small feature that wasn’t super complex but criss-crossed a couple files in an already established project. The test suite wasn’t particularly comprehensive but there was enough there to give me some confidence in my work. 

I did the things. Wrote my tests, touched three or four files and was ready to clean it up and get a pull request created when I goofed. As I bounced between tabs and projects, moving entirely too fast, I accidentally did a checkout when I should’ve done a stage + commit. I lost a few hours of my life in a single command. Damnit. There was no one to blame but myself, ugh. 

My life these days is just one massive context-switch. I’m always bouncing between multiple threads, multiple bodies of work and the occasional domestic interruption (yes, I am still working from home. IT’S FINE). I know it’s not ideal but my role requires me to shift gears quickly, put out fires, and immediately switch contexts from one environment to another in support of my team members and my clients. 

The cost of context switching

Most estimates say that up to 40 percent of productivity is lost simply by switching gears and moving between unrelated tasks. This problem is drastically magnified in an open-concept style office which is pretty much all offices these days. Or when you have feral toddlers running around upstairs (IT’S FINE). 

As developers, the tech industry has adopted a philosophy extolling the virtues of isomorphic code. This is beneficial because it encourages parity between the front-end and back-end languages (e.g. less docs, more rock 🤘🏻). Many offices have breakout rooms and daily team standup updates to isolate distractions. Slack, email, text and everything else not withstanding, some of these attitudes have really served to disrupt the status quo. The smart people in the room now have more focused time and less idle banter. And productivity has boomed. 

I, however, have not been so lucky. Despite having an office door at home and despite knowing the risks associated with context-switching, I’ve really struggled to figure this out, particularly amid COVID, constant demands for snacks, parental approval, Daddy find my other shoe now!, what’s for dinner?, etc (EVERYTHING IS FINE). And in this moment, on this day, despite feeling pretty productive in my initial execution, I blew it all away in one keystroke and was left with nary a line to show. 

So after shaking off my frustration over what an idiot I am, I set back to do again what I had just done and then later wiped out. And you know what? My second effort was even better than the first! 

The code was cleaner. The tests were more readable. And since I’d already gone down the rabbit hole of trying to figure out what needed to happen, it went pretty quickly. In the end, I think the output actually benefited from my mistake. I’m honestly considering deleting things in the future simply to ensure my next effort results in improved output. 

The reality is, context switching is not going away. The distractions of working from home or of an open office will continue. So maybe what I’m suggesting is simply an acknowledgement that these things aren’t easy — for us, our clients or our families. 

We could all use a little more space to get the job done. I’ll try to remember that the next time I start to Slack message a coworker about something. Instead, I’ll save it for tomorrow morning’s standup meeting. You never know...it may just save them from accidentally deleting a day’s worth of work.  

Interested in moving to the JAMstack? Let's talk.

Want to stay in the know on what we know?

Sign up for our email newsletter. Nothing spammy about it. Just a monthly rundown of what we’re sharing.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.