Mid-level Track Roadmap

Leader: base health metrics

This course looks at code health metrics through one Ruby application's own numbers. It starts with 82.99% line coverage and reads the SimpleCov resultset to find the 126 uncovered application lines behind it. It compares the question each metric answers, from line, branch and mutation coverage to complexity, churn and suite runtime. It builds a health report from commands already installed, crosses churn with file size, and shows how a metric set as a target stops measuring. It ends with a five-row report reviewed once a cycle.

What you'll learn

  • ✓Reading coverage/.resultset.json to turn a percentage into a list of uncovered lines
  • ✓The question each health metric answers and what it cannot tell you
  • ✓Building a health report from rspec, rubocop, brakeman, find and git log
  • ✓Crossing churn with file size to find files that are risky to change
  • ✓How metrics set as targets get gamed, and what to track instead
  • ✓A five-row report and the one conversation it prompts each cycle
Free preview · Lesson 1 5 min read

The number and the lines behind it

This application reports 82.99% line coverage. That number is almost useless and the thing behind it is not, and the gap between the two is what this course is about.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...