Skip to content

Basics of Measurement

Measurement is the process of assigning a numerical value or symbol to an attribute of an entity according to specific rules, allowing for comparison and analysis. An ‘entity’ can be an object (like a software module, a project), an event (like a build process, a test run), or a process (like the development lifecycle).

Formally, measurement involves mapping attributes of entities from the real world (the empirical system) to a formal world of numbers or symbols (the formal relational system) using clearly defined rules.

Measurement is fundamental to engineering disciplines, and software engineering is no exception. While we intuitively measure things in daily life (price, size, weight), applying measurement rigorously in software development is crucial for moving from anecdotal evidence to objective assessment.

Key reasons for measurement in software engineering include:

  • Understanding: Gaining insight into project status, product quality, process performance, and resource utilization. (e.g., How complex is this module? How long does our build take?)
  • Control: Monitoring progress against plans and targets, identifying deviations, and taking corrective actions. (e.g., Is the defect rate increasing? Are we on schedule?)
  • Improvement: Identifying bottlenecks, inefficiencies, and areas for process or product enhancement based on objective data. (e.g., Where are most defects introduced? Which refactoring improved maintainability metrics?).

Without measurement, software development often struggles with:

  • Vague quality targets (e.g., ‘make it user-friendly’ vs. ‘achieve a usability score of >80% on standard SUS survey’).
  • Poor estimation and cost control.
  • Inability to objectively assess the impact of new tools or techniques.
  • Difficulty in demonstrating progress or quality improvements.

Effective measurement requires clear goals (often defined using frameworks like GQM - Goal, Question, Metric), precise definitions of what is being measured, and consistent collection procedures.

The Representational Theory of Measurement

Section titled “The Representational Theory of Measurement”

This theory provides a formal basis for measurement. It views measurement as establishing a correspondence (a mapping) between empirical observations and relations in the real world and numerical representations and relations in the mathematical world.

In the real world, we perceive relationships between entities based on their attributes. Examples:

  • Binary Relation: Module A ‘is more complex than’ Module B.
  • Binary Relation: Test Case X ‘covers the same requirement as’ Test Case Y.
  • Unary Relation: Requirement Z ‘is critical’.

These relations reflect our understanding or comparison of attributes before assigning numbers.

Measurement requires explicit rules for assigning numbers or symbols. These rules define the mapping from the empirical world (e.g., the perceived complexity of a module) to the formal world (e.g., a Cyclomatic Complexity score).

Examples of rules in software measurement:

  • Lines of Code (LOC): Specify what constitutes a ‘line’ (e.g., non-comment, non-blank source lines).
  • Defect Severity Rating: Define the criteria for ‘Critical’, ‘High’, ‘Medium’, ‘Low’ based on impact.
  • Usability Score: Define the questionnaire (e.g., System Usability Scale - SUS) and the calculation method.

A fundamental principle is that the measurement mapping (M) must preserve the observed empirical relations in the numerical relations. The relationships we observe in the real world should hold true for the numbers assigned.

Example: If we observe empirically that Module A ‘is more complex than’ Module B, then a valid complexity measure M must satisfy: M(A) > M(B).

Example: If we classify defects by type (Nominal Scale), the mapping should ensure that two defects are assigned the same type label if and only if they are empirically considered the same type.

Examples of Data Elicitation Techniques (Mapping Empirical Perceptions)

Section titled “Examples of Data Elicitation Techniques (Mapping Empirical Perceptions)”

Sometimes, measurement involves capturing subjective perceptions (e.g., usability, maintainability difficulty). Various techniques help structure this mapping:

  • Likert Scale: Respondents rate their agreement with a statement on an ordered scale (e.g., Strongly Disagree to Strongly Agree). Often treated as ordinal, sometimes approximated as interval for analysis.
  • Example Statement: ‘The error messages provided by the system are helpful.’ [Scale: 1=Strongly Disagree … 5=Strongly Agree]
  • Forced Ranking: Respondents order a set of items based on a specific criterion.
  • Example: ‘Rank the following features in order of importance (1 = most important): Feature A, Feature B, Feature C.’ (Ordinal)
  • Semantic Differential Scale: Respondents rate a concept on a bipolar scale with contrasting adjectives at the ends.
  • Example: Rate the system’s performance: [Slow] 1 — 2 — 3 — 4 — 5 [Fast] (Often treated as interval)
  • Checklists: Confirming the presence or absence of specific attributes. (Nominal)

A structured approach to measurement typically involves:

  1. Identify Goal: Define the purpose of the measurement (e.g., improve maintainability).
  2. Define Entity & Attribute: Specify what object/process is being measured (e.g., source code module) and which property (e.g., structural complexity).
  3. Characterize Attribute: Understand the empirical relations associated with the attribute (e.g., module A is more complex than B).
  4. Define Measurement Instrument/Rule: Specify how the attribute will be quantified (e.g., calculate Cyclomatic Complexity using tool X).
  5. Select Scale: Determine the appropriate measurement scale (e.g., Ratio scale for Cyclomatic Complexity).
  6. Perform Measurement: Apply the instrument/rule to collect data.
  7. Analyze & Interpret: Use appropriate statistical techniques based on the scale and goal to draw conclusions.