Into the Battle
No battle plan survives contact with the enemy.
The key properties of the systems I examine appear in Table 15-1. The quality metrics I collected can be roughly categorized into the areas of file organization, code structure, code style, preprocessing, and data organization. When it is easy to represent a metric with a single number, I list its values for each of the four systems in a table, and on the left I indicate whether ideally that number should be high (↑), low (↓), or near a particular value (e.g., ≅ 1). In other cases we must look at the distribution of the various values, and for this I use so-called candlestick figures, as in Figure 15-3. Each element in such a figure depicts five values:
The minimum, at the bottom of the line
The lower (25%) quartile, at the bottom of the box
The median (the numeric value separating the higher half of the values from the lower half), as a horizontal line within the box
The upper (75%) quartile, at the top of the box
The maximum value, at the top of the line
The arithmetic mean, as a diamond
Minima and maxima lying outside the graph’s range are indicated with a dashed line, along with a figure of their actual value.
Table 15-1. Key metrics of the four systems
Metric | FreeBSD | Linux | Solaris | WRK |
---|---|---|---|---|
Version | HEAD 2006-09-18 | 2.6.18.8-0.5 | 2007-08-28 | 1.2 |
Configuration | i386 AMD64 SPARC64 | AMD64 | Sun4v Sun4u SPARC | i386 AMD64 |
Lines (thousands) | 2,599 | 4,150 | 3,000 | 829 |
Comments (thousands) | 232 | 377 | 299 | 190 |
Statements (thousands) | 948 | 1,772 | 1,042 | 192 ... |
Get Making Software now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.