My time as a student at Makers Academy wrapped up over a week ago now, but I was invited to come back as an “Alumni Helper” and coach the new cohort of juniors. Before Makers I was a teacher, so it’s been a natural and enjoyable reversion to form.
I’ve been thinking recently about the idea of “context switching”. In programming, context switching is when you change from one language to another. This might happen because different projects are best written in different languages, or because you segue from one part of the stack to another.
“Language interference”, the accidental use of syntax or conventions of one language when writing another, makes context switching difficult. In my previous life as a teacher, I taught elementary-age children whose first language was Korean. Their struggle with language interference was constant, commonly manifesting as inappropriate discourse indicators. When pausing for thought, exclaiming, or about to say something, they would often make very Korean sounding utterances.
Just as with bad style, misnaming, or unnecessary complexity, context switching contributes to mental dissonance. It’s jarring to have to jump from one language to another. So programmers generally try to minimize context switching by keeping the language consistent across the stack, or at least organizing blocks of work so as not to be straddling the language-fault-lines in the codebase. Context switching is also talked about as a kind of “design smell” – indicative of code that’s breaking encapsulation.
At the same time, sometimes we have to change languages and so we might call “context switching” a skill, a measure of how readily someone can readjust to working at a different point in the codebase or in a different language.
More broadly, being able to “context switch” from focusing for hours on a few dozen lines of code to scrumming with others in the team is vitally important. Many times over the past few months I have found myself struggling to go back to being my normal sociable self after a long stretch of focus.
At Makers, pair programming helps with keeping the work within a social context. And fortunately there is Dana, the party creator, yogi, guru, therapist, and broad-smiling face of Makers Academy. Through her yoga classes in particular I have learned the discipline of pulling myself out of one frame of mind to be immersed in another.