The productivity tax you pay for context switching
One aspect of context switching I struggle with is that often a task requires short periods of forced inactivity, like waiting for a script or query to finish. Often times it’s in the scale of 1-2 minutes. It feels long enough that I don’t want to sit there staring at a progress bar, but switching to another task momentarily definitely can cause a loss of focus.The solution is probably something along the lines of: become more comfortable sitting and reflecting on the current task. Find ways to remain engaged with the current task during the waiting period (reviewing the code, adding more comments, fleshing out next steps, etc.). Don’t give in to a perception of “justified” context switching.