"Water is wet. News at 11."

I don't think that context switching costs more than I give it credit for, because I already consider it to be outrageously expensive.

I am not a fan of IM platforms, like Slack. I don't listen to music while I'm coding, and I schedule my life around coding sessions; not the other way around.

I seem to get a lot done.

I was a manager for many years, and I had a few basic philosophies (that I sometimes had to shelve, because, corporation):

1) It was my job to act as an "interruption shield" for my team.

If one of my managers, or outside developers wanted information or access that required one of my team stop what they were doing, and attend, then it was my job to be "bad cop," and say "no," or "wait."

I often wouldn't even let my team member know that they would have an interruption, until they came up for air.

2) It was my job to know what my team was doing; not their job to tell me what they were doing.

This meant no standups (except that I didn't have a choice, as it was policy, so we had useless standups; even though I didn't want them). If I needed regularly scheduled meetings, I would schedule them in a fashion that would reduce the likelihood of interrupting developer "flow."

It also meant using things like infrastructure tools, integration testing, and frequent checkins to monitor progress. It was my job to interpret them, and ask questions; not my team's job to send me reports (except that I was required to send a weekly report, so I had to gather reports every Thursday. I worked around that, by letting my team members send a quick, one-paragraph email, then annotating that with details from my observations).

3) I made sure that my team was always able to take care of family and life priorities.

I cannot stress enough the importance of this. I had a team of experienced developers with families and medical issues. These would always take priority over their work, and I'd be a coldhearted S.O.B. to refuse to acknowledge that.

I wasn't real big on letting them have "me" time, but, if they needed to run out to get their kid out of school in a hurry, I would let them do that. Otherwise, I'd get to hear them spending three hours on the phone, trying to get relatives to step in and help.

If they were doing something like selling/buying a house, or having contractors in, I'd support them doing what was needed, but I would insist on making sure they got whatever tasks needed doing out of the way.

I also encouraged them to confide in me, issues like divorces, and severe medical issues. I did that by being empathetic, and also closed-mouth. Sometimes, I violated company policy by not informing people of issues with employees, as it would have been completely inappropriate. If the issue ended up causing a disaster (it never did, in over 25 years), then I would take the fall.

I learned that lesson, real quick.

4) Classic Management 101: Things go well, I highlight the team. Things go bad, I take the heat.

This meant that they felt supported in taking risks, and going down rabbitholes, and not having to spend time in a panic, if the avenue they were exploring wasn't giving good results.

5) The smallest unit of schedule time was 1 day. In extreme circumstances, I would schedule for half days.

This allowed context switching to happen in normal cycles.

In my experience, this ended up with a very productive team, that worked well together, was extremely motivated, cohesive, honorable and honest, and highly productive. I kept engineers on board for decades.

But that was just me. YMMV.