…a software metric used to indicate the complexity of a program. It is a quantitative measure of the number of linearly independent paths through a program’s source code. It was developed by Thomas J. McCabe, Sr. in 1976.
So it’s like those “Choose Your Own Adventure” books from when you were a kid, i.e. if you want to run from the dinosaur turn to page 10, if you want to stand and fight turn to page 12 (where you’ll probably meet a grisly reptile-related doom). If you counted up every possible independent scenario in “Day of the Dinosaurs” (the actual book I had as a kid) then it would roughly equal the book’s cyclomatic complexity. The more possible paths the higher likelihood you’ll get killed by a dinosaur.
One of McCabe’s original applications was to limit the complexity of routines during program development; he recommended that programmers should count the complexity of the modules they are developing, and split them into smaller modules whenever the cyclomatic complexity of the module exceeded 10…
It’s like a Rube Goldberg machine…the bigger/more complex it is, the higher likelihood to break. There’s just too much going on. 20 small RG machines that interconnect (but are self-contained) makes it easier.