Topic List

Click a topic to learn more.


Term of the Moment

hot topics and trends


Look Up Another Term


Definition: lines of code


The instructions a programmer writes when creating a program. Lines of code are the "source code" of the program, and one line may generate one machine instruction or several depending on the programming language. A line of code in assembly language is typically converted into one machine instruction. In a high-level language such as C++ or Java, one line of code generates a series of assembly language instructions, which results in multiple machine instructions. For coding examples, see source code.

Lines of Code Are Not All the Same
A single line of code may call for the inclusion of a subroutine that can be of any size, so while lines of code are commonly used to measure the overall complexity of a program, the metric is not absolute. Comparisons can also be misleading if the programs are written in different languages. For example, 20 lines of code in Java might easily require 200 lines of code in assembly language.

In addition, measuring lines of code says absolutely nothing about code quality. Five hundred lines written by a seasoned programmer can perform the same processing as two thousand lines of code by another. See assembly language, machine language, microcode and compiler.