While it is debatable exactly how to measure lines of code, discrepancies of an order of magnitude can be clear indicators of software complexity or man-hours.
[1] Logical SLOC attempts to measure the number of executable "statements", but their specific definitions are tied to specific computer languages (one simple logical SLOC measure for C-like programming languages is the number of statement-terminating semicolons).
These languages were developed at the time when punched cards were the main form of data entry for programming.
Furthermore, inexperienced developers often resort to code duplication, which is highly discouraged as it is more bug-prone and costly to maintain, but it results in higher SLOC.
Another increasingly common problem in comparing SLOC metrics is the difference between auto-generated and hand-written code.
Modern software tools often have the capability to auto-generate enormous amounts of code with a few clicks of a mouse.
By the same token, a hand-coded custom GUI class could easily be more demanding than a simple device driver; hence the shortcoming of this metric.
According to Vincent Maraia,[3] the SLOC values for various operating systems in Microsoft's Windows NT product line are as follows: David A. Wheeler studied the Red Hat distribution of the Linux operating system, and reported that Red Hat Linux version 7.1[6] (released April 2001) contained over 30 million physical SLOC.
A similar study was later made of Debian GNU/Linux version 2.2 (also known as "Potato"); this operating system was originally released in August 2000.
In the PBS documentary Triumph of the Nerds, Microsoft executive Steve Ballmer criticized the use of counting lines of code: In IBM there's a religion in software that says you have to count K-LOCs, and a K-LOC is a thousand lines of code.
According to the Computer History Museum Apple Developer Bill Atkinson in 1982 found problems with this practice: When the Lisa team was pushing to finalize their software in 1982, project managers started requiring programmers to submit weekly forms reporting on the number of lines of code they had written.
For the week in which he had rewritten QuickDraw’s region calculation routines to be six times faster and 2000 lines shorter, he put “-2000″ on the form.