Add the Complexity Dimension

You now have the data to trace the spatial movements of programmers within the code. In Chapter 2, Code as a Crime Scene, we pointed out the importance of combining that data with a complexity dimension. Let’s see where the complexity is hiding in this code.

Get Complexity by Lines of Code

We’re going to use lines of code as a proxy for software complexity. Lines of code is a terrible metric, but the other ones are just as bad. (See the research by Herraiz and Hassan in Making Software [OW10] for a comparison of complexity metrics.) Using lines of code at least gives us some advantages:

  • It’s fast and simple. More elaborate metrics need to understand the language they’re processing. That means they need to parse ...

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.