Chapter 6Calculate Complexity Trends from Your Code’s Shape

You just learned how to use names when investigating design issues. Most hotspots you’ll find are so complex that you need to make several passes through the code before you uncover and treat the root cause. During that time, you want to be sure the code is evolving in the right direction. Simpler and better. Here’s how.

In this chapter, we’ll use the shape of your code as a proxy for program complexity. We’ll apply indentation-based complexity measures to the hotspot’s revision history to calculate complexity trends. We’ll be able to see whether the code is deteriorating or improving over time. This is additional information we can use to prioritize the hotspots we find.

On top of ...

Get Your Code as a Crime Scene 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.