Examine complexity and quality metrics

Completed

While there are various quality metrics, a few of the most important ones are listed here.

Complexity metrics can help in measuring quality. Cyclomatic complexity measures the number of linearly independent paths through a program's source code. Another way to understand quality is through calculating Halstead complexity measures.

This measure:

  • Program vocabulary.
  • Program length.
  • Calculated program length.
  • Volume.
  • Difficulty.
  • Effort.

Code analysis tools can be used to check for security, performance, interoperability, language usage, and globalization and should be part of every developer's toolbox and software build process.

Regularly running a static code analysis tool and reading its output is a great way to improve as a developer because the things caught by the software rules can often teach you something.

One of the promises of DevOps is to deliver software both faster and with higher quality. Previously, these two metrics have been almost opposites. The more quickly you went, the lower the quality. The higher the quality, the longer it took. But DevOps processes can help you find problems earlier, which usually means that they take less time to fix.

We've previously talked about some general project metrics and KPIs. The following is a list of metrics that directly relate to the quality of the code being produced and the build and deployment processes.

  • Failed builds percentage - Overall, what percentage of builds are failing?
  • Failed deployments percentage - Overall, what percentage of deployments are failing?
  • Ticket volume - What is the overall volume of customer or bug tickets?
  • Bug bounce percentage - What percentage of customer or bug tickets are reopened?
  • Unplanned work percentage - What percentage of the overall work is unplanned?