Live data from Hacker News

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

contextkeeper.io

241–250 of 271 posts

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

#241

ContextKeeper sounds interesting. Can anyone here recommend a similar extension for VSCode? Ideally would offer a way to stash and unstash code and tab metadata (cursor position, undo state, etc) with one IDE keystroke.

I just open more windows.. you could also use Project Manager extension, should have at least a "recent projects" command IIRC.

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

#242
post #97

Earlier quoted context omitted.

> no slack, no zooms, no one tapping your shoulder, no conversations about the weekend distracting you on the periphery My teen jobs were in stores, restaurants, and manufacturing. In those contexts, everybody understands that when you're working, you're actually working. Even managers understand that even small discussions need to be fit neatly into the flow of the work, and actual meetings require careful planning…

Similar raising. At one point I was ASE certified, at another I was a landscaper. The first thing I noticed about white collar work was how gossipy and lazy everyone was. We didn't have time for that in blue collar work. I had no idea how these people were useful to work or society. It seems so bizarre to me, even today, that most white collar jobs make more money. It's like they took the people who couldn't work phy…

IMO you work harder in blue collar but its less stress because people don't expect you to hustle to meet a deadline.. I was also a landscaper for a while. Labor is labor in that sort of job, it marches at an expected rate and is dependent on how many hands are working. You often cannot just work for longer, either, if you are bound by the constraints of daylight, or having to clear out of the area by a certain time due to noise perhaps. There is also no way to weed, mow, or lay sod faster than you are already doing it. The deadlines end up moving to fit the realities of the speed of labor against the realities, rather than what happens in white collar work where labor being expected to meet self imposed rigid deadlines, which leads to burnout and poor quality work, and still missing deadlines.

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

#243
post #135

Earlier quoted context omitted.

> Yeah, but the point you missed was about the uninterruptedness of studying for an exam — a student might be able to dedicate a whole week to learning for an exam and then study each day with minor interruptions. I don't know why you assume that I don't understand that they're saying that their studying is uninterrupted when it's overnight. That doesn't change the fact that sleep deprivation is also something that m…

Maybe because you led in with “to be fair”? Perhaps “as an aside” may have been more appropriate, to indicate an intentional context switch? Your point is valid as a tangent, but it doesn’t read as a tangent to me - it reads as attempting to address the point you are responding to. Just my two cents here.

I guess that's possible. I don't tend to spend a lot of time thinking about introductory phrases like that either when reading or writing; they mostly convey tone and flow to me rather than being super meaningful, but I could see other people focusing on them more causing a disconnect.

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

#244
post #135

Earlier quoted context omitted.

> Yeah, but the point you missed was about the uninterruptedness of studying for an exam — a student might be able to dedicate a whole week to learning for an exam and then study each day with minor interruptions. I don't know why you assume that I don't understand that they're saying that their studying is uninterrupted when it's overnight. That doesn't change the fact that sleep deprivation is also something that m…

Maybe because you led in with “to be fair”? Perhaps “as an aside” may have been more appropriate, to indicate an intentional context switch? Your point is valid as a tangent, but it doesn’t read as a tangent to me - it reads as attempting to address the point you are responding to. Just my two cents here.

[dead]

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

#246
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.

Do you exclusively work on remote servers? I love tmux, but I have the issue that I also use it locally, and to my knowledge, you can't have local and remote sessions in one tmux daemon. So I either have to open tmux in tmux, or open it in a separate terminal window. You mentioned your editor on the remote server. Does everyone have their own account with their own settings on all remote servers? We're still at a poi…

My workflow is SSH in and run tmux on the remote server. I don't do any work directly on my laptop.

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

#247
post #161
post #156

I don't remember where I read it, in a book or on HN or even if someone told it to me. But I learned that when requesting time or disruption: certain positions need specialised handling. An example: A receptionist does not necessarily need focus time, and is interrupt driven, so their work should not stretch to more than 5 minute intervals; if something takes more than 5 minutes it must be filed for someone else. A m…

I feel that this is extremely dismissive of the reality that other people do in fact have similar focus requirements, but simply have learned to take notes or otherwise deal with interruptions. There are more demand driven roles but probably every person you interface with on a day to day basis professionally has hard work to do. Sales copy? Focus. Figuring out some accounting discrepancy? Focus. Trying to actually p…

> The reality is that everyone has similar interruption issues, but understands the existence of needs beyond themselves when working on a team. Programmers are maybe special in the level of coddling gotten on this topic.

Sure everyone deals with interruptions. But the real question is how deeply focused do they need to be to operate? How many variables to they need to keep in their head so to speak, to do effective work? Is it the same for engineers vs other disciplines?

> This mythologizing gets in the way of trying to tactically improve things. Real things programmers can do, such as take notes on paper, documenting ideas, writing exit/entry notes, and many other things people do to be able to come back into a project after interruptions.

Question is: are you willing to foot the bill? This extra reading/writing/documenting takes time. Is it worth it to get a more responsive engineer? It's really the same constrains as in operating system design; you can context switch endlessly by restoring state, but you'll pay with disk access time.

> It’s very liberating to find workflows where you can actually get stuff done even in small increments, because you are not relying on this idea of doing a hard reset of your mind every time you switch tasks

That's assuming you can break down tasks that way. Deep engineering work often doesn't work that way.

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

#248
post #161

Earlier quoted context omitted.

I feel that this is extremely dismissive of the reality that other people do in fact have similar focus requirements, but simply have learned to take notes or otherwise deal with interruptions. There are more demand driven roles but probably every person you interface with on a day to day basis professionally has hard work to do. Sales copy? Focus. Figuring out some accounting discrepancy? Focus. Trying to actually p…

I feel in turn that this comment is the dismissive one, and in fact extremely so. The issue is not that programmers need to focus, is that they need to focus on deep, complex work. At least a few of those other tasks you mention (don’t have much experience with sales copy, and in rather terrible with both sales and copy) do require focus but have smaller reasonable increments of progress. Stop thinking about the work…

Most programmers are just code plumbers. It's not like most of you are some research scientists breaking into the unknown. In fact for most jobs I've held programming has been by far the easiest part of the job. Understanding the 'real' requirements from the client (not what they think they want but what they actually want) and many other things are on a completely different level of complexity. Computers are the most basic parts of a business. I've also noticed that most software people are horrible at understanding the business that they are operating in. And think that management is the one that doesn't understand things. Except it's the other way around. Engineers are optimizing the parts that don't need optimizing and don't focus on bringing value to the business.

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

#249
I use multiple mac desktops to somewhat mitigate this.

In each desktop I have a Chrome Window open with required tabs (Jira, github other required tools).

One Emacs Frame

On iTerm2 window.

I use Rectangle to quickly arranged windows. (I wish a tool existed that can recreate the desktops and all the windows exactly , after a reboot)

Ofcourse, upon a reboot, need to set this all up again :-(

Atleast Chrome remembers the windows/tabs and which desktops they belong to... That helps a lot.

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

#250
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.

Do you exclusively work on remote servers? I love tmux, but I have the issue that I also use it locally, and to my knowledge, you can't have local and remote sessions in one tmux daemon. So I either have to open tmux in tmux, or open it in a separate terminal window. You mentioned your editor on the remote server. Does everyone have their own account with their own settings on all remote servers? We're still at a poi…

Everyone has their own account with their own home folder containing their dotfiles. There are shared project and scratch drives. I do all my work on this server, nothing is done locally other than ssh into the server.

For what you are describing the best practice is a nested tmux session with tmux running locally and on the remote server. So you would open tmux locally, then in one of the windows or panes you ssh into your machine, then open tmux on that machine. This will require you to press the tmux prefix (ctrl+b or however you've set it) twice to do the commands on the remote tmux instance. However you can get around this with some configuration (1).

1. https://www.freecodecamp.org/news/tmux-in-practice-local-and...

I think certain certain terminal emulaters like iterm2 have tmux specific features that could also be helpful, but I don't use that software so I am not as familiar.

Post reply on HN