Live data from Hacker News

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

contextkeeper.io

151–160 of 271 posts

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

#151
post #137

Earlier quoted context omitted.

I'm not criticizing your logical point, but your choice of example might be unfortunate. Intermittent fasting seems to be a very effective strategy (for reasons unrelated to your point).

It's possible that my example might not be up to date. In the past I've been given advice that trying to just skip eating an entire meal at a time when one normally would makes someone less likely to be able to follow through with being as strict later in the day. Assuming that this isn't an outdated misconception, I think the comparison still somewhat holds. Studying all night and not sleeping is totally fine if you…

Fad diets like intermittent fasting or any kind of major lifestyle change like that take a lot of willpower and self-discipline, which is also why most diets fail long term.

Better thing to do is have a routine first. A lot of people don't have any eating habits, it's more of an afterthought or a "whenever I'm hungry I'll eat" kinda thing. You can't base a diet off of that.

If you fix your diet by just eating at the same moments, roughly the same amount of time, only then do you have a baseline. Then make tweaks on that baseline. Evolution instead of revolution, only that will be sustainable.

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

#152

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…

This killed me my last few years at Apple in the spaceship. Everything in the fucking building is a distraction and most of it is constantly in your line of sight at all times. Even if I managed to angle my monitor right, put on headphones, and pull my hoodie up to reduce distractions some side conversation or impromptu stand up would inevitably distract me and pull me out of my flow. I tried to come in as late as pr…

> This killed me my last few years at Apple in the spaceship. Everything in the fucking building is a distraction and most of it is constantly in your line of sight at all times.

That‘s an interesting bit of information. Maybe this is one of reasons in the decline of quality at Apple - at least in temporal terms it could correlate.

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

#153
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 pretty much write off the day entirely. I think this is the mindset that a lot of people have, but always keep in mind, the meetings is part of your job, and writing code is also only one aspect of your job. What I'm trying to say is that don't let the meetings frustrate you, instead just accept them and the distractions. Few people get to do what they really want to do all the time, and it does often seem that s…

This would be a valid way of thinking about it, but programmers aren't generally judged on their meeting attendance but rather their code output. More meetings == less code == worse perceived performance == fewer opportunities for pay increases and promotions

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

#154
post #100

Earlier quoted context omitted.

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…

> 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[...]

Tangential, but might be interesting to some:

sometime before the pandemic, after (I think) 30 years of always eating some kind of breakfast, I accidentally missed breakfast once and that day I felt I had significantly less brain fog after lunch.

So I tried again to see if it was just a coincidence, but it had happened again and again.

And, I realized, as long as I don't start to mentally prepare for breakfast I don't start feeling hunger either.

I'm not suggesting this is a good idea for everyone, only that for people like me who has followed "best practice" for decades and doesn't feel too enthusiastic about it, testing out alternative approaches might be a good idea.

PS: the total amount of hunger I feel in a day seems to have gone down too.

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

#155
Here's an idea. Buy the office some poker chips. Everybody gets a few and writes their initials on them in marker. (Maybe a manager gets a few more than his direct reports do.)

Complexity values: White 1. Red 5. Blue 10. Grey 20.

When you want to ask a question of someone who looks deep in flow, just lay the appropriate chip on their desk. They can glance at it and balance the complexity versus their mental/work state and decide to either engage at once or defer it. Maybe mumble an ETA.

People will have to use the various chip values wisely if they want to be taken seriously.

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

#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 manager manages their time in 30 minute increments, anything that can't reasonably be done inside a meeting is unfortunately unlikely to happen. This is stupid, but it's unfortunately true; you might sometimes experience other situations but I think that's not the common case.

A programmer (or, researcher, etc;etc) books time in half-day increments. If you must have a meeting with programmers, it's often better to book events in serial but only consume half a day.

I've been practising this methodology for 8 or so months in my org and it does seem to hold true in the general case, there are some minor exceptions but most people do seem to he happy.

EDIT: It was the "Makers Schedule" by PG; Serves me right not to read the comments[0] before commenting.

[0]: https://news.ycombinator.com/item?id=35462780

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

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

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 point where everyone accesses servers via the one shared "root-ish" user.

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

#158

The problem is not that some managers think that it’s OK for software engineers to be interrupted frequently. The problem is that some managers think that frequently interrupting software engineers is a feature of startup culture. I once worked for a startup where I was interrupted frequently. My boss often worked remotely, while I was in the office every day. If I tried to carve out periods to write code where I ign…

That is levels of toxicity beyond too many interruptions ! Sorry you experienced that

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

#159
post #135
post #127

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. That those studying session can sometimes be too long to be healthy is certainly true, but was not the point argued here. When someone argues that a Ferrari is a fast car and you criticize that not all red ca…

> 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…

swing and miss ;)

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

#160
post #100

Earlier quoted context omitted.

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…

> 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[...] Tangential, but might be interesting to some: sometime before the pandemic, after (I think) 30 years of always eating some kind of breakfast, I accidentally missed breakfast once and that day I felt I had significantly less br…

I noticed that too. I also started skipping lunch for the same reason. If I do eat lunch, it’s only on days with a lot of meetings in the afternoon. If I want focused work, I skip it.
Post reply on HN