"Think of cyclomatic complexity as a measure of the number of pathways through a piece of code."
-Mark Seemann, "Code That Fits in Your Head"
And add 1 for each of these functions:
Choose(+1 for each choice)
Switch(+1 for each expr-value pair)
To write code that "fits in your brain," Seemann recommends limiting cyclomatic complexity to 7.
Cover image created with Microsoft Designer