Measuring Complexity
summary
Argues that complexity breaks into technical, structural, cognitive and accidental types and can be measured with concrete metrics: McCabe (cyclomatic), dependency counts (one file importing ~200 objects), churn hotspots (files with frequent edits), and cognitive scores — though SonarQube and maintainability index mislead for Python. Shows tools used (radon, custom analyzers), examples (a FastAPI file of 4,000 lines compressible to ~400, Django ~2,000 classes/1,000 functions), and recommends KPIs plus targeting 20% hot zones for the biggest payoff.
AI-written summary · about
