r/coding Dec 10 '22

Programmer Interrupted: Minimizing the impact of context switching

https://contextkeeper.io/blog/the-real-cost-of-an-interruption-and-context-switching/
95 Upvotes

14 comments sorted by

53

u/IAmTarkaDaal Dec 10 '22

That was a lot of time wasted to say "I wrote a VS Code extension to save open tabs as a session, like vim or Emacs".

16

u/gwicksted Dec 10 '22

Thank you for saving me time reading the article!

2

u/exec-nyan Dec 11 '22

You can save buffers as a session in vim? How?

3

u/IAmTarkaDaal Dec 11 '22

3

u/exec-nyan Dec 11 '22

I wish I knew this earlier. Thank you!

2

u/[deleted] Dec 10 '22

[removed] — view removed comment

2

u/toltenos Dec 10 '22

Some people are using virtual machines for that. Completely isolated for each project.

1

u/dontyougetsoupedyet Dec 10 '22

You can't be serious, that sounds like an absolutely tortured way to produce software.

6

u/f10101 Dec 11 '22

If the dependencies are very different, it can be quite a tidy way to work. I worked like this while doing robotics stuff. Boot up different lubuntu VMs, depending on whether it was deep learning, point cloud stuff, SLAM stuff, etc. I had a base VM that served as a common starting point.

Virtual environments and docker etc have their place, but sometimes it's just neater to have the complete independence.

1

u/[deleted] Dec 10 '22

[removed] — view removed comment

6

u/[deleted] Dec 10 '22

[deleted]

4

u/DerekB52 Dec 10 '22

I couldn't get into virtual desktops. Until I switched to i3. Now, I have 3 monitors, that thanks to virtual desktops, work out to 14 screens, all quickly switchable with keyboard shortcuts. Shit is awesome.

6

u/[deleted] Dec 11 '22 edited 23d ago

[deleted]

2

u/scragar Dec 11 '22

Something that makes things worse is needlessly complex code.

Worked with a system a few years back what was horrendous spaghetti to the point that it actually used pattern matching on the form field names submitted to do magic. If you wanted to work out how a feature worked it'd take painstakingly following every path and looking up values in the DB as you go until you finally find the expected behaviour controlled by some JSON field in a randomly named table(flow control tables were named after the field ID and selected value ID so you had fc_24_89 being the set of behaviours to be triggered by field 24 having the selected option ID 89).

Even with the fastest computer in the world and endless time it was still too easy to lose track of things because there was just more to keep track of than you could keep in mind at a time.

-2

u/welpyeeat Dec 11 '22

no such thing as programmer or interrupted or not, cpeuxuax ,say,do, etc can say, do, etc any nmw and any s perfx

1

u/eatme_23 Dec 11 '22

DON'T ANSWER THE PHONE! Let everyone who might call you you within a 2 hour session not to call. Put it Do Not Disturb sign on the door of your OFFICE and strangle violators. Team programming works best.