There are multiple ways of tracking code ownership (i.e., collective, team or individual).
In case of team or individual ownership, how do you:
- track ownership?
- deal with situations when dev leaves or team splits/re-organizes for new projects?
There are multiple ways of tracking code ownership (i.e., collective, team or individual).
In case of team or individual ownership, how do you:
As a team leader, you should always plan for someone leaving / getting hit by a bus. People implement this in many ways: Pair programming / buddy testing and so on. Sole proprietorship in a corporate environment is detrimental to both the company and the developer. The developer can never be promoted because he is too important to move away from this, or worse, could be promoted too high, just to keep him around and will be the first one to be laid off in lean times. Its a lose lose scenario.
Having said that, whenever teams split, I have seen serious knowledge transfer sessions / recorded presentations / documentation touch ups happen.
This is a great time for a code review and adding documentation to the code. Often, programmers will write large chunks of code with the intent to clean it up and make it readable later. Code reviews very much encourage the cleanup and allow others to view and learn the code.
If there is one person responsible for a region of code, have them formally hand off the code to another person -- if possible -- through pair programming, code review, or mentoring. Trouble is, if you haven't done this before you lose a developer, you may never get the chance. This can be a downfall of individual ownership.
You may use the version control system to keep tracking of code ownership. I'm not sure if you can do this with all VCSes or not, but for the git/Gerrit pair, you can put the name and contact details of the code owner in the description field. For other systems you can consider creating a text file (let's call it OWNER.txt) within the module that provides the same information; so that, if the developer can checkout the code, she already has the contact details of the module owner. If you create a template, you can also script it, so that you get an up to date list available whenever you need it (even create a web page that displays the code owners).
Developers leaving the project happens all the time and I don't see a direct link to this problem, but with my proposed solution, you can simply change the module description (or the OWNER.txt file for that matter).