Finally something LOC can really measure? :)
I believe that complexity is best viewed as the number of things that need to be interacted.
An integrated design would have n levels, while a simple design would have only two.
Complexity is needed to solve problems that simplicity cannot overcome, so this will not always be a problem.
There is a problem of defining complexity in general, since complexity usually has a problem associated with it. Something can be difficult to understand, but just look (a very short code, for example) The number of interactions that get this web page from the server to your computer is very complicated, but the abstraction of the http protocol is very simple.
Thus, having a task (for example, maintenance) before choosing a measure, it can make it more useful. (i.e. adding a configuration file and writing to the application increases its objective complexity [yes, only a little confidently], but simplifies maintenance).
Nat
source share