Vertical complexity

From Ssdlpedia
Jump to: navigation, search

Vertical complexity, otherwise known as the lines of code (LOC) metric is simply the number of lines in a software unit. A variation of this metric counts the total number of lines the software spans, including comment- and empty- lines.

The spartan programming methodology, dictates that all routines, and and preferably larger software units such as classes fit within a single screen. Further, the methodology suggests that most routines should be even shorter, that is only a couple of lines long. This demand is most forceful in object oriented programming, in which methods are expected to be even shorter than ordinary routines.

K&R indentation, which is part of the methodology, reduces vertical complexity by placing the opening braces "{" at the end of the line that starts the block.

Personal tools