Know the Biases and Workarounds for Behavioral Code Analysis

Most of the time our version-control history is an informational gold mine, but we might stumble across pyrite, too. No analysis is better than the data it operates on, and behavioral code analysis is no exception. So let’s have a look at the pitfalls and biases so we know if—and how—they impact us.

First of all, you need a minimum amount of data before you can start to see clear patterns in a behavioral code analysis. I’ve (successfully) analyzed codebases with just a few weeks of development activity, and in general around 150 to 200 commits are enough for an initial analysis.

When you have an existing system, false positives often bias the data since hotspots are a relative measure. ...

Get Software Design X-Rays 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.