Understanding code standards
In this chapter, we’re going to explore the idea of code standards.
Code standards are an agreed-upon set of standards your team decides should be applied to any new code created by the team.
These standards have an important role in resolving disputes, focusing attention on the areas that truly matter, reducing the amount of technical debt teams naturally accumulate, and helping pay down existing technical debt.
The importance of code standards
One of the most frustrating experiences I’ve ever had as a developer is when I’ve sent a carefully thought-out change to another developer for review and I’ve heard back remarks such as the following:
- I don’t like your curly brace formatting
- Your indentation doesn’t match mine. I use spaces instead of tabs
- I’d like it if you’d use
var
instead of the Type
In these scenarios, the developer in question ignores the substance of...