Collective code ownership is an important factor of XP

in #extreme4 years ago

Strong code ownership, weak code ownership and collective code ownership are the three main categories according to Martine Fowler, "Chief Scientist" of ThoughtWorks.

  1. Strong code ownership breaks a code base into modules and is assigned to one developer. Developers are only allowed to make changes to modules they own.
  2. Weak code ownership is modules are assigned to owners, but are allowed to be changed by other people.
  3. Collective code ownership abandons any notion of individual ownership of modules. The code base is owned by the entire team and anyone may make changes anywhere.

image.png

Problems of Individual Code Ownership

Among cases I have known, the team work is mostly divided according to features. For example, Developer A is responsible for Feature A, and Developer B is responsible for Feature B. One will not take care of the other one's responsibilities. Consequently, a lot of problems are caused.

  1. No cooperation within the team.

Since one is only responsible for the module/feature s/he is developing, no one knows/understand the other one's work. It means cooperation and communication are not much.

  1. It is not easy to cultivate team spirit.

No cooperation means no team work. Besides, there are always developer who claim challenging tasks/bugs and ones who claim easy ones. This will motivate neither of the two kinds.

  1. Redundant features are developed.

This is also caused by the lack of communication. Redundant work is a waste of human resource.

  1. Knowledge cannot be shared within the team.

When developing modules/features, certaion knowledge-silo is build up. Becasue each one is only taking care his/her responsiblity and no cooperation/ communication, the accumulated knowlesge cannot be shared with others.

  1. It is very risky as only the one who develope the feature know it. Once the developer leaves, it will cause problems and affect the company.

This is the last thing a company would like to see. If the module owner leaves, no one else can take over his/her module due to the individual code ownership.

Therefore, collective code ownership is practised in Extreme Programming. It is to bridge the barrier within a team. Each module should be understood by at least two developers who back up with each other, and so knowledge could be passed around and developers can come and go without causing problems.
Collective Code Ownership

The code owned by the entire team and anyone can make changes to it. The benefit of collective code ownership is obvious.

Knowledge can be shared.
Code style can be unified.
Interdependency rather than too much responsibility on individuals.
...

However, there are always two sides to a coin. Collective code ownership makes it difficult to hold a certain developer accountable. When everyone is responsible, no one is responsible.

image.png

Conclusion

Strong code ownership and weak code ownership are individual code ownership that module owners are responsible for their own modules. The only difference lies in the weak code ownership allows other developers to change the codebase while the owner has to look after it. The choice has more to do with the team dynamics. Our team, ZenTao, prefers collective code ownership, particularly in the context of Extreme Programming.

Reference

  1. https://martinfowler.com/bliki/CodeOwnership.html

  2. https://tobeagile.com/2017/09/13/collective-code-ownership/

  3. https://dzone.com/articles/collective-code-ownership-in-agile-teams

  4. https://martinfowler.com/bliki/CodeOwnership.html

Coin Marketplace

STEEM 0.19
TRX 0.18
JST 0.033
BTC 87161.65
ETH 3057.00
USDT 1.00
SBD 2.75