You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.2 KiB

Lines of Code

Lines of code (LOC, KLOC = 10K LOC, MLOC = 1M LOC etc., also SLOC = source LOC) are a metric of software complexity that simply counts the number of lines of program's source code. It is not a perfect measure but despite some soyboys shitting on it it's actually pretty good, espcially when using only one language (C) with consistent formatting style.

Of course the metric becomes shitty when you have a project in 20 programming languages written by 100 pajeets out of which every one formats code differently. Also when you use it as a productivity measure at work then you're guaranteed your devs are gonna just shit our as much meaningless code as possible in which case the measure fails again. Fortunately, at LRS we don't have such problems :)

When counting lines, we need to define what kind of lines we count. We can either count:

  • raw (physical) lines: every single one
  • lines that actually "matter" (logical lines), e.g. excluding comments, blank lines etc.

A comfy tool for counting lines is cloc, but you can also just use wc -l to count raw lines.