Live data from Hacker News

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

contextkeeper.io

91–100 of 271 posts

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

#91
From Paul Graham's Maker's Schedule, Manager's Schedule essay:

> (programmers) generally prefer to use time in units of half a day at least. You can't write or program well in units of an hour. That's barely enough time to get started.

> meetings are a disaster. A single meeting can blow a whole afternoon, by breaking it into two pieces each too small to do anything hard in.

> I find one meeting can sometimes affect a whole day.

> I know this may sound oversensitive, but ... don't your spirits rise at the thought of having an entire day free to work, with no appointments at all? Well, that means your spirits are correspondingly depressed when you don't. And ambitious projects are by definition close to the limits of your capacity. A small decrease in morale is enough to kill them off.

http://www.paulgraham.com/makersschedule.html

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

#92

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

I was raised amongst a lot of brits (me mum was one), but I’ve left a lot of that behind (I had a British accent, as a child).

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

#93

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…

Have you considered a leadership role? It occurs to me that if flow is the natural state of programming, and interruption the natural state of business, then someone has to be able to bridge those states. Preferably someone who understands the subject matter and can prevent the software team from becoming an isolated silo.

I also do OK with interruptions, and have found a role where I'm not programming 100% of the time, and the subject matter itself -- doing experiments and hardware testing -- doesn't really lend itself to flow anyway. But being able to program means that I don't have to interrupt the programmers every time my requirements change, which can happen on an hourly basis.

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

#95
post #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.

Artists too

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

#96
post #9

If I know I am going to have my day broken into sub 1hr chunks thanks to meetings and such, I pretty much write off the day entirely. It takes time to get into the flow state, some studies cite over 20 minutes, and once you are in it you want to stay in it for like four hours. No emails to follow up with, no slack, no zooms, no one tapping your shoulder, no conversations about the weekend distracting you on the perip…

I also do much better with long chunks of time, but it should be possible to make meaningful progress on most programming tasks in a true 1-hour block. It’s common for people to use the Pomodoro technique to great success with blocks of work half that size. Often, the real problem is that people don’t actually have 1 hour of working time in between meetings. We sit at our desks and feel obligated to respond to e-mail…

> I also do much better with long chunks of time, but it should be possible to make meaningful progress on most programming tasks in a true 1-hour block. It’s common for people to use the Pomodoro technique to great success with blocks of work half that size.

Pomodoro does not need context switching.

Breaks without loading up a different context gives the brain time to bring back the body into a less tense state, so the next cycle can be more energetic/productive than a continuous one. In many cases it lets some ideas run their courses and save time by solving conflicting thought forces.

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

#97
post #9

If I know I am going to have my day broken into sub 1hr chunks thanks to meetings and such, I pretty much write off the day entirely. It takes time to get into the flow state, some studies cite over 20 minutes, and once you are in it you want to stay in it for like four hours. No emails to follow up with, no slack, no zooms, no one tapping your shoulder, no conversations about the weekend distracting you on the perip…

> 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 to not disrupt operations. The space too was carefully designed to maximize effectiveness.

So American office culture seems absolutely wild to me. Especially in software, where we are expected to fit our actual work into a sort of calendar Tetris. Oh, a grand poobah would like another status meeting, plus a lot of time spent coming up with estimates that are not going to change anybody's behavior in the slightest? Gosh, do you think that might have an effect on the completion date? And sure, why don't you put me next to the salespeople making calls all day. I'm not making any progress anyhow.

The only conclusion I can come to is that in a lot of places, productivity is much lower on the list of observed priorities than stated priorities.

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

#98

Now I have a family I often can't choose the end of my working day so it coincides with a natural break in my work. In those circumstances, when I know they're going to arrive back in less than 30 minutes, I stop working and do a brain dump of everything that's going on in my head into a plain text file. With that I can pick things up much faster the next morning. I've even started doing it during the day when both m…

Yeah, in the last few years I've started keeping a work log for projects. It's mostly a way to externalize and clarify thoughts. But I'll definitely use it for an end-of-session record of where I'm leaving off and where to pick up.

And where it's possible, I love unit tests for this. Starting off in the morning with a failing unit test from yesterday's close gets me right back into it.

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

#99
post #16
post #9

If I know I am going to have my day broken into sub 1hr chunks thanks to meetings and such, I pretty much write off the day entirely. It takes time to get into the flow state, some studies cite over 20 minutes, and once you are in it you want to stay in it for like four hours. No emails to follow up with, no slack, no zooms, no one tapping your shoulder, no conversations about the weekend distracting you on the perip…

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.

Same, but Windows desktops. Email and Slack only on the left most desktop.

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

#100
post #82

Earlier quoted context omitted.

> It's pretty ironic, because this is how a lot of people study in the library at college,show up and stay all night grinding in the flow state with your phone shut off. Yet when you graduate to the work place, you seldom have the opportunity to work like how you've been training to work for all your advanced schooling ever again. To be fair, I think staying up all night trying to be productive instead of getting a g…

I think you're still missing the point. It isn't that you need to stay up all night, but rather the flow state. In college you typically have classes during the day so you aren't going to get it then. That doesn't make it a great thing but it also isn't exactly relevant to this conversation.

I understand the point they're making, but I'm not sure you understand mine though. If someone talking about weight loss suggested that people should just never eat breakfast to reduce the amount of eating they do in a given day, it would be relevant to offer a critique this may end up being counterproductive overall to the goal due to it just pushing the issue into another part of the day; this is basically the same thing.
Post reply on HN