Combating Context Switching Drain with Repetitive Tasks + Focus Time

Hand holding a miniature old-fashioned alarm clock
Photo by Towfiqu barbhuiya on Unsplash

This week we are start development! As the first step, my teammates and I are setting up our dev environments. Then, we commence digging into our tasks for the week. With the project plan as our guide, our team is focusing on the following different tasks: one teammate is setting up the Git repo with instructions on how to set up the local Django instances (so that we are all on the same page, which is so very important), then starting work on writing some model classes and routes; another teammate is working on front-end tasks, namely, building the Home page and the About page with some bootstrap and CSS customizations; I will be focusing on getting data to seed the database, as well as also working on some model classes and routes.

The slight difference that sets this project apart from other CRUD websites that I’ve built, or helped build, in the past is that we could not find a good API to use for the website’s data (our website is a Buy, Sell, Trade Hub for House Plants so we were looking specifically for a house plant information API). And so, going the scrappy route, I am scraping the information from a couple of good house plant websites that we had identified as good house plant references. Firstly, I am compiling various house plant information into a spreadsheet, which will then be reviewed, and verified (should there be any questionable information), and supplemented with any missing data via more research. Then, from this house plant mini-compendium, I will create a short description for each plant as well as care instructions, citing sources as appropriate. The plant data will be popped into a data-seed csv file. I’m not writing any scripts to scrape the websites, just plain old copy and paste. It all feels so very early 2000’s, when I was working as a temp here and there while in college (the first time around).

Having done these manual data-grabs a few times in the past, I figured that, with some experience in marketing and content editing, this task is old-hat. Grabbing some information, consuming it, and distilling it. It shouldn’t take more than a couple hours…

And here I sit, only halfway through my scraping, yet already past the couple hour mark, and quickly (or is it slowly?) approaching three. I can see why this is a task that is automated so very often. And even though this repetitive, almost mindless, task can be thought of as boring, I find myself oddly lulled into a relaxing mind space, almost like when I’m in the “zone”, as I sometimes feel I am while playing a musical instrument, or when I’m feeling like I’m at the height of productivity at work.

Perhaps I feel this sense of being in the zone all the more acutely because most of my days are spent context switching from one task to another. When I am context switching, as expected, my productivity goes down. Down, down, down, because I am only ever able to make shallow inroads of progress before dropping the current task and shifting my attention to another, most likely unrelated, task. When I revisit a task that has been interrupted, it takes me awhile to get back to the point at which I had left. “Now, where was I?” is apt.

Funny enough, at least to me, a Computer Science major, the phrase “context switching” has its roots in the CPU context switch, which is when the CPU switches from one process to another. And since context switching is computationally expensive, there is the concept of the cost associated with the operation, known as the context switch cost. This cost also exists when people switch tasks! And it can lead not only to decreased productivity, but, I find, an increasingly fragmented mind with loss of focus. I’d say that on days where I have to context switch many times, or successively in a short time frame, I find my mental state to be frazzled, grumpy, and disoriented.

Unfortunately, I’ve, of late, been jumping from task to task at work as well as at at school and at home with the kids (lots going on, suddenly). And, sometimes, with the Yahtzee-scramble of all three life-domains superimposed on one another, I need a time-out moment for myself.

This data scraping might be one cure to all this context switching madness.

I think that the web scraping task not only lets me be in a setting of controlled productivity, but it also lets me focus on a simple task for a long-ish duration of time. I’ve been in this place before, this “focus time”, where I don’t allow for disturbances and make significant headway into my work. This combination of simple, repetitive task + focus time has manifested in my life as: any housework that involves scrubbing, most sorts of crafts, and other seemingly trivial tasks. Most importantly, these activities help to “reset” my mental state.

Yesterday, on my company’s Slack, I noticed that my coworker who I sometime message (or “slack”, used as a verb) had some little sleepy Z’s in her status circle. Since I am not that familiar with using Slack, I didn’t know what those Z’s meant, until I discovered that they meant that the user has turned on a “Do not disturb” mode and the Z’s indicate that the notifications for the user will be paused. While most other folks I interact with on Slack do not use this feature, I thought it was very impressive that my colleague set aside some real chunk of her schedule to give her complete attention to a task. It was also impressive that she chose to share that status with other folks by letting them know she won’t look at their slacks until she is ready to.

These little Z’s reminded me of a practice at my previous job, where it was company policy that each team block some focus time on their shared schedule so that they can, individually, or as a group, have periods of increased productivity (with the hope of better quality and quantity of work products). It was a very effective strategy and one that I had forgotten about, in this current uber-connected work culture.

I feel that there might be a good recipe here to combat the mental drain caused by context switching: combine the calming effect of working on repetitive tasks and the importance of using focus time to deliver quality work. Perhaps scheduling short focus times throughout the day can help increase my productivity. Maybe block off an hour or so every day on my calendar and use the “Do Not Disturb” mode on Slack? Similarly, if part of that focus time was spent on repetitive tasks (say creating tests, or documentation), I might be able to reset my mental state, or at least decrease any agitation. It’s worth trying out!

For the rest of the week, my goal to apply both techniques, repetitive tasks and scheduled focus time, and apply them together, when possible, to see if I can get more done with the same amount of time. (In any case, I still have to get the data scraped, so I guess I will have ample time to test this method!)

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *