Adaption SoftwareThere is a revolution going on.
 . Home . Contact .   
XP Practices: Collective Code Ownership

Collective Code Ownership means that any pair of programmers can make any change to any part of the source code at any time. No one person "owns" any part of the code.

How Can This Work?!

This can only work if pairs reqularly and frequently check their source back into the code repository and integrate it, if pairs are swapping members regularly, if everybody is running exhaustive suites of unit tests all the time, if everybody adheres to a single coding standard, and if everybody is refactoring ruthlessly. Sharing the code leads to another big boost in overall team speed, but only if all of these other practices are in place to support it.

What Do You Do About Differences and Conflicts?

You will, of course, still get some source code conflicts. But since everybody pretty much knows what everybody is working on that day, and since everybody is using continuous integration, these conflicts are minimal. And since everybody is working within earshot of each other in a single open space, the problems that do arise can easily be resolved by one pair, or, at worst, two pairs working at the same machine for a few minutes.

What Are The Benefits of Sharing the Code?

When the code is shared, everybody knows about everything in the code. The number of programmers that would need to be killed by a truck in order to kill the project (the "truck number") is nice and high. The design of the code is consistent throughout the system. Anyone can sign up for any kind of work that the stories require for the current iteration. All kinds of technical knowledge (knowledge of programming craft and specific technologies) is available to everybody in the source, and can be explained by those who did it. Also, once you get the hang of it, sharing the code is more fun. You learn so much more, and accomplish so much more.

[Next Practice]

    - One Team
    - TDD
    - Pairing
    - Refactoring
    - Simple Design
    - Small Releases
    - Planning Game
    - Integration
    - Shared Code
    - Work Pace
    - Customer Tests
    - Code Standard
    - Metaphor