Live data from Hacker News

Programmer interrupted: The cost of interruption and context switching (2022)

contextkeeper.io

31–40 of 271 posts

Re: Programmer interrupted: The cost of interruption and context switching (2022)

#31

It's the shadow work of programming I never liked. - Setting up boilerplate code - Configuring my IDE - Configuring special browsers (for web development) with no addons or tweaks done so it appears like an average person is using the browser - Configuring the OS - Separating work from play. Keeping separate machines strictly for programming - Tests - Reading best practice material - Researching if other people have…

And what's worse than all of that, is if a company tries to do it for you.

Re: Programmer interrupted: The cost of interruption and context switching (2022)

#32

I don't disagree but... If you're having a huge issue with this, I suggest trying to find ways to hold less context at one time. Write stuff down & get it out of your head more often. Write down all of your ideas & break down your tasks into smaller tasks. Don't try & solve a giant problem all at once without writing down what you're going to do. You may also discover issues earlier. It doesn't get rid of the issue 1…

>If you're having a huge issue with this, I suggest trying to find ways to hold less context at one time.

For many who experience this regularly, that basically means leaving/finding a new job.

With many employers, it's very difficult to escape being spread thin once you've proven your competence and they lean on you hard as a result.

Re: Programmer interrupted: The cost of interruption and context switching (2022)

#33
post #25

Sadly, the cost of context switching is well-known, and has been proven, over and over again, for decades. But managers don't care (and many co-workers also). A quick shufti at most modern open-plan offices, shows the contempt that managers have for developer context. They know better, and have made the conscious decision to go open, anyway. I remember visiting the Facebook/Instagram building, in NYC, and was aghast…

>But managers don't care (and many co-workers also). i bet 99% of time people are interrupting themselves. Like i just did to browse HN.

People definitely need some distractions but for me it's definitely not 99% of the time. Also, I could argue sometimes the solitaire game between coding stints is actually loading up your brain with some software thoughts, and then giving it a little break to process. Sometimes it takes a day for me to come back and feel like my brain has reconciled some details of a hard problem and only then can I make progress.

Re: Programmer interrupted: The cost of interruption and context switching (2022)

#34

Sadly, the cost of context switching is well-known, and has been proven, over and over again, for decades. But managers don't care (and many co-workers also). A quick shufti at most modern open-plan offices, shows the contempt that managers have for developer context. They know better, and have made the conscious decision to go open, anyway. I remember visiting the Facebook/Instagram building, in NYC, and was aghast…

Huh, I really thought `shufti` was a typo in this context, and one that sounded funny to my Middle Eastern ears, so I was surprised to discover it's a real word, albeit with Middle Eastern origins [1].

1. https://en.wiktionary.org/wiki/shufti

Re: Programmer interrupted: The cost of interruption and context switching (2022)

#35
post #25

Sadly, the cost of context switching is well-known, and has been proven, over and over again, for decades. But managers don't care (and many co-workers also). A quick shufti at most modern open-plan offices, shows the contempt that managers have for developer context. They know better, and have made the conscious decision to go open, anyway. I remember visiting the Facebook/Instagram building, in NYC, and was aghast…

>But managers don't care (and many co-workers also). i bet 99% of time people are interrupting themselves. Like i just did to browse HN.

A momentary distraction like a quick HN check is not the same as the context switching of, for example, going to a budget meeting while in the middle of trying to figure out some technical detail. Very different things.

Re: Programmer interrupted: The cost of interruption and context switching (2022)

#36

Non programmers won't get it. I am trying to explain it to my wife (using the cartoon on the article) but she says I am always busy. Which is probably true, but somehow she manages to interrupt my thoughts right when I was holding the whole heap in one hand, reaching for the duct tape with the other and pushing the keyboard with the nose. Never when I just started vscode :)

Programmers is not the only profession that has a high cost of context switching. Scientists, lawyers, engineers, writers - pretty much anyone doing intellectual work would understand.

Re: Programmer interrupted: The cost of interruption and context switching (2022)

#37

I actively like being distracted when I'm programming. I tend to approach a problem from lots of different directions, each time fizzling out, hitting a block or having some sort of mental reset, until something unconsciously clicks and an overall structure, understanding or solution emerges. Continually leaving and returning to the problem is a part of that process, so I tend to find someone walking up with a questi…

Indeed, this seems unusual in programmer land. As evidence we have a thread like the current one reaching the front page several times a day.

But your way is also my way. I am active in a very wide array of topics, and happy to flit between them. Sometimes I dive deep, but it's usually in a critical moment of synthesis when ideas developed over months or years come to clarity and I put them to action. This is working extremely well for me. I lack nothing and am at the absolute cutting edge in every topic I'm pursuing. Of course this is my opinion but it's sufficient to say that I'm happy.

It is sad to see how many people are made uncomfortable by interruption. It's the stuff of life, social life at least, and exactly what makes being human in a dense society so wonderful. I feel it represents a fundamental discomfort with being in situations out of one's control. But, that's the core of life. And for me it's where all the creative energy comes from.

edit: Reflecting on John Carmack and his big monitor. I habitually work in single window terminals with relatively low row counts and big fonts. I seem to be unable to get a benefit from seeing more stuff all at once.

edit2: And in terms of getting into flow state, for me it is always basically instantaneous. The flow is just sitting there under a few seconds of pause. Of course sitting at a computer or phone will cause wandering distraction at times, but if work is in play I can start driving at full speed in what would typically be seen as a horrifically uncomfortable position. Imagine a long distance train with two children jumping on you... If I can see my laptop and the kids at the same time, I'm flowing. I think this might be neurological somehow, due to training or genetics. It's unclear.

Re: Programmer interrupted: The cost of interruption and context switching (2022)

#39
Since several years ago I was starting to have health issues that if I sat still for too long my eyes/arms/legs/waist would feel pain, sometimes fiercely. So I set a timer to remind me to stop staring at the monitor and stand up to do some light exercise, at first the timer was 40 minutes and in recent years it became 20 minutes as my body wears.

So now my work is interrupted every 20 minutes, at first the timer was annoying but after several months I got used to it completely and I don’t think it affects my productivity. And actually I wish I could do it from the begining so I wouldn’t have the health issues at all.

However my interruption is short and during it I was uaually just thinking about my work while stretching my body, so it is no compare to hard context switches like being dragged to a conversation.

Re: Programmer interrupted: The cost of interruption and context switching (2022)

#40
post #18
post #16

Earlier quoted context omitted.

Having tmux sessions for each open task is a life-saver, especially in an environment where I do all my work on a remote server. Now I can close the laptop lid and never lose work. Simply reopen the ssh connection and keep going.

Its especially helpful for stuff where I haven't touched it in a while too. One alias and boom, I'm back in a session with a pane with my editor open, a pane with the log, a pane with some notes, and a pane with the shell displaying the last line of code I ran from when I was last working on this pet project over six months ago. Right where I left everything and I can jump back in as if I was working on it an hour ag…

I have a separate VS Code window connected to a dev container for each project that stays open for days, weeks or months at a time. Does the tmux approach materially improve upon that setup? Genuinely curious if I’m missing out on something here.
Post reply on HN