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

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

    I'm surprised nobody has mentioned Dijkstra's famous quote yet, so here goes:

    My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.

    The quote is from an article called "On the cruelty of really teaching computing science".

提交回复
热议问题