Coding Standards: High Quality Codes

18 Sep 2023

Coding standards, perceived as trivial rules, hold a profound significance in software development. While some may view them as nitpicky details about indentation and brace placement, I believe that coding standards define the quality of the code.

The Act

Focusing solely on compliance with coding standards does not encourage a deeper understanding of the principles behind those standards. Yes, achieving that green checkmark on IntelliJ is satisfying, but this shallow learning approach might allow you to write code that lacks a true grasp of why certain practices are recommended. Without understanding the rationale, you may struggle to adapt to new situations and languages.

The Habit

Instead of blindly following rules, take the time to understand the rationale behind coding standards. Learn why certain practices are recommended and how they contribute to code readability and maintainability. For instance, ESlint can explain why using “let” instead of “var” is recommended or why a specific indentation style should be followed. Learning the “why’s” not only aids in adhering to standards but also enhances your understanding of coding best practices. Making a habit and being consistent with adhering to coding standards pay off in the long run. It’ll not only make that green checkmark easier to get, but also will help you become a better overall programmer.

The Quote

“Quality is not act. It is a habit.” ~Aristotle

Coding standards align remarkably well with Aristotle’s philosophy. They represent a framework for cultivating a habit of quality in the codebase. Just as a virtuous person consistently exhibits virtuous behavior, adhering to coding standards consistently produces high-quality code. Blindly following rules, may lead to code that appears well-formatted on the surface. However, without comprehending why specific practices are recommended, developers may not adopt these rules, performing the same mistake again when trialed. This is why it is important to follow coding standards habitually.