Skip to main content
hhow09's Blog

Code complexity

Can we measure software complexity? #

Reddit - Measuring Software Complexity: What Metrics to Use?

WTFs per minute in code review. Very reliable.

The frequency with which someone tracing a code path forgets what they were trying to figure out.

I don't think there is a metrics to measure software complexity since it's not going to be objective.

Cognitive load are underestimated #

Necessary complexity comes from product, business domain which is unavoidable and valuable. But we should reduce unnecessary complexity.

What makes the code complex (while it doesn't have to)? #

Condition blowup #

Unexpected side effect #

(TBD...)

Compile-time complexity over runtime complexity #