The Key Concept of Change versus Status Analysis

The Status Analysis

The status of the quality of the code is obtained by analyzing the head of the most significant branch of the codebase (typically called master or main). The observation score and especially the rating of your entire set of source files is a very good snapshot indicator of your technical agility potential at this moment. 

However, it says nothing about how the current status has materialized which means that it can’t be used to forecast the likely future, nor does it tell you very much about the capabilities, performance, or skills of your current development staff unless you know that they are the ones that made the bulk of the current code.

A very poor rating from a Status Analysis may represent an improvement from an even worse situation. A very good rating may be the legacy of great developers that haven’t been part of the staff for some time.

However important in itself, knowledge of the current status of the quality of the source code can’t stand alone.

The natural answer would be to carry out regular analysis over time and compare the change in quality. The CodeImprover Web Portal will provide this facility, but the CodeImprover platform offers an even more potent tool for monitoring and influencing the ever ongoing strive to improve the code quality.

The Change Analysis

Using a CodeImprover app that is deeply integrated with the master Git repository CodeImprover provides code quality analysis of the code in every commit and pull request produced by the developers.  The Change Analysis involves only code that is added to and subtracted from the codebase as contained in the commit or pull request.

Tech hint: Changes in a Git repository always takes the form of lines deleted or lines added. Hence if you change something in an existing line of code, Git perceives this as deleting the old line and adding the line (with the changed text) as a new line.

Analyzing a commit or pull request involves

  1. Analyzing the deleted lines and calculating the removed Observation Score points. 
  2. Analyzing the added lines and calculating the added Observation Score point
  3. Summing up the added and removed Observation Score point 

This means that when the CodeImprover platform analyzes a single commit or pull request there is a possibility of scoring both negative and positive Observation Score points. This happens if a commit or pull request removes more quality problems than it adds. 

The complexity of this can be illustrated by the following claims

  • A commit involving only the deletion of code tends to result in a positive number of Observation Score points, even though Observation Scores by definition are negative. 
  • A Change Analysis with a negative Observation Score adds bad quality to the codebase, even though it might improve the rating of the entire codebase. 
  • A Change Analysis with a positive Observation Score increases the quality of the codebase, even though it might lower the rating of the entire codebase.

Nevertheless, change analysis is an indicator of how the programmer is performing in the area of code quality. It also provides a lot of other valuable information, such as experience code coverage, mentioned elsewhere.