Live data from Hacker News

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

contextkeeper.io

1–10 of 271 posts

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

#2
I view coding as creative work not that different from writing or drawing. Sure there are techniques and rules to follow, but to do great work you need to get in the flow of things until your creative brain figures stuff out on its own. It takes time to warm up and any interruption destroys the momentum you had. I put my phone on airplane mode for most of the work day because of this.

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

#4
For me it's not really to do with how much stuff is on the screen. It's more that when you're doing creative work, the intermediate state is a bunch of maybe-graphs. Maybe the bug is a->b->c, maybe the bug is caused by d + e -> c, etc. Once you find it, you know what it is and you can discard the explanations that are wrong. But before that, you have a bunch of hypotheses. Plus your mind knows that you intend to forget the details.

When you're interrupted, you forget a bunch of the maybes and you have to rebuild them. This is because your evidence is not strong enough yet to have a small graph, it needs to be a big graph (or set).

Main advice is to take small steps. Little pieces that are easily recoverable. Things like unit tests help to establish the facts, allowing you to push some things out of your own memory. Also take some notes to jig your memory.

Sometimes you can't take small steps, because it just happens that you didn't consider something and now there's a large surface to think about. For those times, make sure you're not interrupted.

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

#7

[flagged]

That’s the same misconception about programming that people had decades ago. People thought the same thing when we introduced 5GLs back in the 1980s, and there was a lot of hype, and programming became more accessible, but demand for programmers increased rather than decreasing. People thought the same thing back when Fortran was introduced in the 1950s, and programming became more accessible, but the demand for programmers increased rather than decreasing.

The trick is that you need to hire someone to come up with a description of the problem which is precise enough that a computer can handle the rest. That person is the programmer.

If you’re being sarcastic, it’s not clear, just put a /s on the end or something.

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

#8
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 :)

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

#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 periphery, just you and your task at hand.

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.

With respect to the article and maintaining context while coding for different projects, I find having a tmux session for each individual project super helpful.

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

#10
post #7

[flagged]

That’s the same misconception about programming that people had decades ago. People thought the same thing when we introduced 5GLs back in the 1980s, and there was a lot of hype, and programming became more accessible, but demand for programmers increased rather than decreasing. People thought the same thing back when Fortran was introduced in the 1950s, and programming became more accessible, but the demand for prog…

Same with SQL, which was promised as a way for data processing managers to get rid of expensive programmers as the managers would now be able to get whatever information they wanted from their databases using an easy to understand, English like language. All it did was change the nature of the job of retrieving and storing database information but didn't actually get rid of the programmers.
Post reply on HN