## Observation Score – the absolute value

The CodeImprover Analytical Engine calculates values referred to as a metric in absolute terms. This calculated (or measured) metric value is a signed integer, negative, 0 (zero), or positive. This metric value is henceforth referred to as the Observation Score.

By definition, a snapshot of a complete and ideal maximum quality codebase has the Observation Score value of zero.

Every occurrence of “not quality” source code statement lowers the quality and subtracts from the Observation Score sum. Severe quality incidents subtract more than less severe incidents. This means that the Observation Score sum expresses an absolute amount of quality – where 0 is best and -∞ ( minus infinite) is worst.

### Observation Scores in details

Almost every codebase has a negative Observation Score value and a large piece of code is more likely to score a numerically larger negative number than a small piece of code.

Observation Scores are calculated within a set of metric categories. Each category has its algorithm. The Technical Reference overview page contains a list of all the metric categories used by CodeImprover.

Observation Scores’ are directly comparable across metric categories. This means that -10 points for “cyclomatic complexity” corresponds (in severity) to -10 points for “number of parameters”.

These comparisons, calibration, or weighting of Observation Scores between categories are a topic of controversy and CodeImprover plans to offer each customer to define its custom weighting. For now, CodeImprover provides a qualified set of defaults that are suitable for most organizations.