Why cyclomatic complexity is important?
Cyclomatic complexity is computed using a graph that verifies the control flow of the program. The nodes of the graph correspond to the commands of a program. A directed edge links two nodes, if the second command might be implemented immediately after the first command. By definition,
CC = E - N + P
where
CC = cyclomatic complexity
E = the number of edges of the graph
N = the number of nodes of the graph
P = the number of connected components