Measure Complexity with Flog
There’s a lot of code out there with nasty conditionals. The tendency is often to go into excessive preferences about how the code should be structured.
Flog
Flog is a complexity metric. A metric is a crowdsource idea about something.
Flog is an ABC metric; it scores assignments, branches, and conditionals. It counts things and adds them up.
Higher scores state a more complex code that will be harder to understand and reason. Higher scores are worse.
Flog is an excellent starting point for discussing complexity in a code base.
Replacing conditionals with small objects could be more evident. Tools like Flog identify the where and the why. Reduce the cost of changing complex code by measuring it before tackling it.