Coding standards tell developers how they must write their code instead of each developer coding in their own preferred style, they will write all code to the standards outlined in the document. This makes sure that a large project is coded in a consistent style.
Coding style is made up of numerous small decisions based on the language:
- Tabs or spaces for indentation
- How and when to use comments
- Proper naming of variables and functions
- Appropriate use of white space
- Code grouping
- Patterns to be used and avoided
There is always someone in your team who is arguing about tabs vs spaces or tab indent size, etc. Many developers may work in a single file. Different developer different coding style.
But having a simple, consistent standard in place, makes code:
- More consistent
- Easier to read
That’s why Development teams should maintain coding convention over the project
There are many tools to make your code consistent and standard.
Choose your favorite one and start using in your existing and new project.