When, if ever, is “number of lines of code” a useful metric?

后端 未结 30 2499
無奈伤痛
無奈伤痛 2020-12-08 09:32

Some people claim that code\'s worst enemy is its size, and I tend to agree. Yet every day you keep hearing things like

  • I write blah lines of code in a day.
30条回答
  •  眼角桃花
    2020-12-08 09:38

    Check out wikipedia's definition: http://en.wikipedia.org/wiki/Source_lines_of_code

    SLOC = 'source lines of code'

    There is actually quite a bit of time put into these metrics where I work. There are also different ways to count SLOC.

    From the wikipedia article:

    There are two major types of SLOC measures: physical SLOC and logical SLOC.

    Another good resource: http://www.dwheeler.com/sloc/

提交回复
热议问题