Services | Coding Standards and Code Review

GET STARTED!

Coding standards are a set of rules and best practices intended to result in cleaner, more readable, more consistent, more performant, more efficient, more secure, more maintainable code with fewer defects.  

Naming conventions, limits on functional complexity (e.g. cyclomatic complexity), design principles like SOLID and DRY, avoiding deep functional nesting, insisting on meaningful inline comments, formalizing exception handling, requiring that all activity that can result in a runtime exception take place inside a try/catch block, structured logging, etc are all excellent candidates for coding standards and great criteria for code reviews.

Structural consistency and readability impact code maintenance more than any other factors, and maintenance makes up 75% of the total cost of code, compared with the 25% required to create it initially.

All of this makes it vitally important to see software development as a team activity rather than a solitary one and as a process with a large but largely hidden impact on an organization’s bottom line, both directly and indirectly.  Freedom of individual expression in code must give way to practices that support the collective good, including that of stakeholders.

As with many other aspects of software development, a layered, pragmatic approach to coding standards and code review will often yield the best results.  Our tools and processes provide several natural opportunities to ensure the best possible performance, security, observability, maintainability, efficiency, availability, testability, etc, e.g.

  • Early stage design reviews before any code is written,
  • Linting (using a small program to interactively identify and suggest alternatives to coding issues while writing and debugging), especially when combined with matching SCA criteria (below),
  • Source code control system (SCC) pull requests (PRs), approvals, and merges, and
  • Static code analysis (SCA) kicked off by commits in a CI/CD pipeline.

Optional formal team code reviews can also provide growth opportunities for team members to present, discuss, and defend their approaches and for others on the team to ask questions and to consider approaches that may differ from their own.

Let’s establish team coding standards and organic ways to ensure that they are followed in order to improve compliance and code quality while reducing costs, defects, and time to value!

Templates

Examples