Code ownership is a debated subject with two opposing trains of thought. Single person ownership or team ownership. I believe a hybrid of the two is the best choice.
In an open source project a person or a small group owns the code. Many people can contribute to the project by doing their own branch and then submitting a pull request. It is up to the code owner to approve the pull request, ask for changes, or reject. A nice thing about branching is you can choose what you want to work on.
Open source is a hybrid of code ownership, but ultimately the code owner has all the power. Sometimes this can demoralize contributors especially if the code owner never approves their pull request.
A good way to eliminate this is to have a team of code owners. Then there is a higher probability your changes will be approved.
Single person code ownership
I’ve seen all sorts of problems with single person code ownership. One example was one person owned the most important code for an automated blood processing machine. The code was, hard to understand, had poor architecture and 14 levels of inheritance. Nobody could figure it out except for the code owner.
The result was the code could not be scaled or features added without the code owner making all the changes. You never want to be in that situation.
Lets rent instead of owning
I think code renting is a better process for development. One or more people rent out the code and is responsible for the period of time they rent it. The whole team still owns it that way.
The advantage to renting is the developer owns it for a limited period of time. The code gets more understood as more people rent. Doing this long enough will result in everyone knowing the code base.
Code in the contracting environment
I have seen in the contracting space, especially in government, many firms divvy up the work. Unfortunately islands form and competition ensues. It can get nasty where one contract firm criticizes another and they don’t help each other.
In that environment it seems impossible to share the code together. Just think how effective it would be if everybody helps each other by sharing information, ideas and code.
Code nobody wants to own
There is lots of legacy code nobody wants to own or rent. Developers complain that code is so awful. They don’t want to touch it, instead they insist it has to be replaced with something totally different.
Who says the replacement will be any better. It will be new but not necessarily better. A better choice would be to clean up the legacy code.
Since nobody wants to own legacy code then everybody should own it. The weakest link in a system is the one that should get the most attention and team ownership.
If we take ownership of the code together and individually rent it out to make it better everyone wins.