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

后端 未结 30 2488
無奈伤痛
無奈伤痛 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:35

    I wrote 2 blog post detailling the pro and cons of counting Lines of Code (LoC):


    How do you count your number of Lines Of Code (LOC) ? : The idea is to explain that you need to count the logical number of lines of code instead of a physical count. To do so you can use tools like NDepend for example.


    Why is it useful to count the number of Lines Of Code (LOC) ?: The idea is that LoC should never be used to measure productivity, but more to do test coverage estimation and software deadline estimation.

提交回复
热议问题