Practice: Adhere to a Coding Standard

Listen to this post
Subscribe

One of the simplest practices a development team can benefit from is the adoption of a coding standard. A standard is simply a set of straightforward rules that everyone on the team agrees to. Here are some rules to include in a coding standard.

  • Naming conventions. How to name things such as variables, objects, functions, and components.
  • Structural choices. How to arrange things such as  packages and namespaces.
  • Lexicographical consistency. Standards for tabbing, placement of braces, and capitalization.
  • Terminology. A set of domain terms that everyone know, understands, and agrees upon. These should also be agreed to by non-technical parts of the organization. This is often called a Domain-Specific Language (DSL).

Each organization can and should decide what is important in the standard, and everyone must agree to adhere to it. It should also be easy to find and easy to update. A wiki is one good solution for storing it.

These are not hard to follow; they are simple little choices that can become second nature over time.

If they are universally adopted, then everyone can read everyone else’s code efficiently. This is essential for effective collaboration.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.