I think its not a reasonable expectation for productive programmers to be always available for random questions and conversation. Make the messages and notifications wait until you have downtime.
On the same note, I don't do mobile email either. Colleagues can call me if the shit really hits the fan. Nobody ever does though, which I think speaks for itself.
One problem with system wide muting is since we're a fully remote team if something is breaking I have to be available. Maybe it's possible, but I'd love a way to enable do not disturb except for a single app.
I am terrified of how I am going to manage this when I have kids. It's just me and my fiance right now. We both work at the same company and we're both very career driven. It's not a problem yet.
Always, always, go home for dinner and put the kids to bed, then go back to work.
If you can work from home, this is relatively easy. If you have to be at work, it involves an extra commute, which may or may not be possible. If it is not currently possible, I would anyway recommend making your commute shorter, or negligible if possible, because it will make your life so much better.As a personal anecdote, I used to commute to work by bicycle. So I would cycle home for dinner with the family. Then I would drive back to work, which was relatively short (~10mi, 15km). Sometimes, if I worked right through the night, I would drive home at dawn, change clothes, and jump on the bike to go back to work (single car family). Yes, tiring, but I was young at the time - couldn't do that now.
Luckily I hate commuting so I will do everything to avoid long commutes. Currently takes me <15minutes to get to the office.
You don't happen to live in the Netherlands? It's not often that I see people calling 15km "short".
It was short when driving :)
One route was Natick-Weston-Waltham, MA, so quite tough fighting with the snow (and snowplows) in the winter.
Another was MillValley-Sausalito-SF, including the time the Golden Gate was closed to bikes after 9/11. So all Marin cyclists had to cross the bridge on a free shuttle bus, which towed a bike rack trailer.
Not so young any more, but recently changed job, and started a 15 km bike commute again ...
I regularly leave the office a bit earlier to pick up my kids from school and spend some time with my family, then I work again 1 or 2 hours in the evening.
I would not do that on a daily basis though, it's also nice to spend time with your partner once the kids are asleep.
Pairing at first can lead to high anxiety in an introvert, but like exercise for someone out of shape, I've found built up confidence in my abilities (and also kills overconfidence which is another affliction). A unique kind of flow can be achieved with your pair, one that isn't quite as productive as 2 a.m. "in the zone" flow, but is also much easier to slip into with regularity.
Nowadays I find in general my solo work just requires freedom from distraction (shutting Slack notifications off), the anxiety builds more slowly.
If that seems impossible then you have a different problem to solve first - which is "why can't I work optimally?"
Physical exercise and mindfulness can be great helpers, and making time for them even when there doesn't seem to be any is paramount.
It wrecks the next day though, and can easily turn into an evil cycle - even more so now when having a family and there's no opportunity to sleep in to catch up.
The last thing you want to do is commit code at 02:00. Better to leave it to when you have a fresher head to review what you did beforehand, both for quality and perception reasons.
2nd EDIT: Having to be always online on Slack with all the @mentions pinging off constantly and/or just working in a busy and loud open office with meetings every few hours can be detrimental to being able to build up that mental model needed to see things clearly when tackling something new / that I'd like to get done in a better way. I'm probably not a fantastic dev, and showing my age, but I try to make up with persistence and enthusiasm for my work / field..