In my experience this works great. Context switching is a problem, but there are ways to minimize the impact (similar tech stacks, good work organization, clearly defined priorities,...).
> Instead of 2 devs working for 2 months each on their own project, put them together on the first project for a month, then on the other project for the second month (simplified example, of course).
We did try this and it sounds good in theory but as the old saying goes 'two women can't have a baby in 4.5 months'.
In my experience (in this particular team and org) it would've simply been better to invest some time into documentation and suffer a short drop in productivity on a project when owners left.
I agree that not all environments are good at managing developers though (and that is probably a huge understatement).
Simply said, that deadlines and OKRs don't account for bus factor.
If you are in a place with code-review, the 2-person system allows one person to at least read the code that is being written as it's being written, so the genesis and reasoning behind such code might be a little more obvious.
One of the biggest barriers to that (besides teams needing guidance on how to do it) is conflict of interest, which is a factor in the why. I started saying it upfront with founders at my last company, when speaking of who we wanted to hire, and how engineering should be done: "One of the jobs of an engineer is to 'document themselves out of a job'." Then I add something like "And the company has to realize that engineers who can and will do that are generally the best engineers, and extremely valuable to the company."
Though, if the engineers didn't trust management (e.g., not exhibiting analogous professionalism and duty, such only looking at near-term selfish impact), then I can't argue that engineers should go out of their way to be easier for a stereotypical anti-leader to treat poorly. I'd have to appeal to the engineer's sense of professionalism, or of some degree of duty to other team members. I'd also know it's probably only a stopgap, and to give them whatever support I can if/when they look elsewhere for a home for an unusually great engineer.
That sounds nice in theory, but I've only ever seen it be a disaster in practice. It's like that mirror thing from Harry Potter. As soon as you actually try and make a maintainable code base, it starts going the other way.
The only way to truly optimise for onboarding is by writing the simplest, cleanest code possible. Everyone is already trying to do that by hiring the best devs they can. Any further efforts just look like more dependencies, more patterns, and more incidental complexity to act as guard rails in the pursuit of a newb-friendly codebase.
The end result is that new devs are productive at small and simple tasks, but big things take longer. Also, you're never going to find a manager that understands this trade off, so your new dev is going to be left in a terrible position trying to explain how they got so much work done in the first month when they knocked off all the small cards, but now the new feature that the business desperately needs has taken 3 months all by itself.
And it's also worth to pay the price to get the owner to not leave. So many companies seem to think penny-pinching is worth it, or only start giving out raises when actual attrition starts going up and many more people are already invisibly in the process of quitting.
But often there are some or all of those pieces missing, and so yeah, code review ends up being a bit shallow and performative.
This only generally happens if you have an environment where every project is a snowflake and the ramp-up time per project is thus high. If you standardize on a stack, then the internal organization of your codebases starts to look pretty similar, and there's less for people to ramp up on when they switch projects. Kill resume-driven-development at your company.
Because all I have are anecdotes, but all of my anecdotes are on the side of shared knowledge being heavily biased towards safety and consensus building demanding a lot of time. That happens even between two people that mostly agree, and only increase with more people or different opinions.
Of course, some times a bias towards safety is exactly what you want. But on informatics projects, that happens very rarely.
Once in a long while two people can have complementary ideas that make them faster. But it tends to happen more often when one is the clear owner of the project and the other is advising. Shared ownership seems to almost kill those chances.
What matters is that there is a clear owner who is the voice of final decision. In most cases there is no objectively better way to do something, so having a person who is a tie-breaker is beneficial. Of course, they must be involved in actual coding, doing code reviews of other people's code and similar. And other people must review the owner's and each others code.
But, having an owner is not the same as having a bus factor 1. There should be an owner, but other people should know the project and the codebase enough to step in at any given time, even as (temporary) owners if needed. And this is only possible if they actually work on the project, even if the approach that the team (/owner) decides upon is not what they would pick.
Oh, and we don't do ownership thing either.
See also: documentation, testing, refactoring and all the other goodies that keep a large codebase maintainable.
why?
After a team member left and a new maintainer had to step in to maintain an unfamiliar code base, our new EM decided that the bus factor must be raised across all projects. So every quarter we shifted responsibilities to new projects and had someone else take over ownership - the idea being that the previous person would still support and we'd not be in trouble in case someone left. That's not what happened though.
It didn't really matter if the old owner was around to support. Productivity plummeted with every project. It was as if every owner of every project had left the team every quarter.
Now I'm more convinced than ever that it's better to pay the price of an owner leaving if and when it happens, rather than try to prevent or mitigate that risk up front. The productivity costs are far too high for most software products.