Codescene clever approach to measuring complexity: whitespace
I've heard or of Codescene through Matthew Skelton who mentioned it in his presentation "Untangling software delivery with Team Topologies, flow metrics, and careful decoupling".
I was playing around with Codescene and came across a chart referencing a ws_complexity metric. Curious about how complexity was measured, I asked and they pointed me to this document page: https://codescene.io/docs/guides/technical/complexity-trends.html#what-s-complexity-anyway
AFAIU Codescene is a contraption of the title of the book "You code as a Crime Scene" by CTO and Founder of Codescene Adam Tornhill.
Illustration from Codescene documentation |
Essentially Codescene measures amount of (leading) whitespace as a proxy for complexity. As they explain this has several advantages, the most important being that it is simple (both in terms of implementation and computation) to implement for almost all programming languages.