Understanding Impact

Impact is a way to measure the magnitude of code changes that are happening, in a way that goes beyond simplistic measurements like lines of code.

Impact attempts to answer the question: “Roughly how much cognitive load did the contributor/team carry when implementing these changes?

Impact is a measure of work size that takes the following into account:

  • The amount of code in the change

  • What percentage of the work is edits to old code

  • The surface area of the change (think ‘number of edit locations’)

  • The number of files affected

  • The severity of changes when old code is modified

  • How this change compares to others from the project history

One contributor makes an addition of 100 new lines of code to a single file. Compare that to another contributor effort which touches three files at multiple insertion points where they add a total of 18 lines while removing 28 lines.

The significance of each contribution can’t be boiled down to just the amount of code being checked in. Even without knowing specifics, it’s likely that the second set of changes were more difficult to implement, given that they involved several spot-edits to old code.

On one hand, we have someone adding 100 lines of new code to a single file, while on the other hand, only 18 lines of new code are written, but there’s a bit more going on here:

  • this change required modifying previous work

  • the edits happened in 4 different locations

  • 3 different files were affected

Even without knowing the severity of changes or comparing to historical changes, it’s probably safe to assume that the second contribution was more ‘expensive,’ and therefore carries a higher impact score.

Although the first set of changes is technically more code, the added complexity of the work from the second change could arguably make that change set at least as much work, and possibly more — even in the simplistic representation above, it’s clear that there’s more than just lines of code at play.