Cover by Chromatic, James Shore

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Collective Code Ownership

Note

Programmers

We are all responsible for high-quality code.

There’s a metric for the risk imposed by concentrating knowledge in just a few people’s heads—it’s called the truck number. How many people can get hit by a truck before the project suffers irreparable harm?

It’s a grim thought, but it addresses a real risk. What happens when a critical person goes on holiday, stays home with a sick child, takes a new job, or suddenly retires? How much time will you spend training a replacement?

Collective code ownership spreads responsibility for maintaining the code to all the programmers. Collective code ownership is exactly what it sounds like: everyone shares reponsibility for the quality of the code. No single person claims ownership over any part of the system, and anyone can make any necessary changes anywhere.

Important

Fix problems no matter where you find them.

In fact, improved code quality may be the most important part of collective code ownership. Collective ownership allows—no, expects—everyone to fix problems they find. If you encounter duplication, unclear names, or even poorly designed code, it doesn’t matter who wrote it. It’s your code. Fix it!

Making Collective Ownership Work

Collective code ownership requires letting go of a little bit of ego. Rather than taking pride in your code, take pride in your team’s code. Rather than complaining when someone edits your code, enjoy how the code improves when you’re not working on it. Rather than pushing your ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required