8 ms·
It is fascinating that code is now being measured quantitatively. Number of "lines of code".
by reactspa 5y ago
It is fascinating that code is now being measured quantitatively. Number of "lines of code".
- benburleson 5y agoMy first manager, when I was a young engineer at Raytheon would like a word.
- gabereiser 5y agoIt's 2021 and I still come across managers that use this as a metric.
- saalweachter 5y agoIt may be a poor metric, but it's not like we have any other metrics to measure code by. Well, "dollars / year", if you work in an industry where you can directly A-B test against revenue, but I think most of us are happiest not knowing whether our particular lines of code are EV-positive.
- gabereiser 5y agowe absolutely have other metrics. Features, Stories, Ease-of-use, Dev Friendly, Qualitive Value. LoC is simply broadcasting how complex either A) the problem is (fair) or B) how you've made it (not fair) - most fall into the latter camp. Code bases like kubernetes come to mind for LoC far exceeding its value. Code bases like Quake3 come to mind for LoC that provide tremendous value. Every line is an explicit decision to improve the code or make it worse. Refactoring a system to be generic and re-usable, for example, would reduce LoC yet provide tremendous value. If I were her manager, would I deduct points for -2000 LoC? Would I praise her for taking copy-pasta and making a pattern? I know which I'd choose.
- sriku 5y agoI suppose it makes sense from the perspective of copyright law, which protects artifacts. After all, one could say the same for quoting from a famous literary work .."ha now they're valuing literature in terms of number of words of prose!"
- ocdtrekkie 5y agoThe dissent clearly highlights the fallacy of the ruling, where it discussed the importance of the "heart" of the work, rather than the portion of exact lines copied. Aka, that you could clone Harry Potter's plot, characters, and story while not copying each word of the book verbatim, and it still be a copy of Harry Potter.
- drwiggly 5y agoThey do state, copy-write isn't the same in the programming world. Programming is always functional in nature, unlike a book.
- jayd16 5y ago>Aka, that you could clone Harry Potter's plot, characters, and story while not copying each word of the book verbatim, and it still be a copy of Harry Potter. Would that be a copyright infringement? Probably just trademark infringement at that point?
- ocdtrekkie 5y agoIt would be trademark infringement to use the names, it would be copyright infringement to use the meaningful content of the plot and story.
- mattkrause 5y agoNot sure that’s correct. Copyright attaches to the actual text (illustrations, etc; whatever is “fixed in a tangible form”), not the ideas. You could write a story about a boy of humble origins who is whisked off to a special school, discovers he’s special, and fights evil. There aren’t that many original plots, after all.... You’ll only get into trouble if the main character is called Harry Potter of 10 Privett Drive, where he resides with his mother’s sister and her awful family, and he later attends Hogwarts, etc.
- EvanAnderson 5y agoNow? I've personally heard quantities of code measured in "lines of code" (or, thousands of lines of code-- "K-LOCs") going back to the mid-90's. An acquaintance who worked for IBM in the 70's said it dates back at least that far (measuring developer productivity in the "K-LOCs" they produce).
- mega_dingus 5y agoSee Mythical Man-Month published in 1975 - https://en.wikipedia.org/wiki/The_Mythical_Man-Month https://en.wikipedia.org/wiki/The_Mythical_Man-Month
- ChrisMarshallNY 5y agoIt's been going on since the 1960s (maybe longer). Personally, I think the best code is the code I don't write. A significant part of my refactoring, is removing as much code as possible, by tweaking algorithms, deriving common base classes, and removing unused code branches. Every line of code is a potential bug. The less code, the less bugs.
- beckingz 5y agoNegative lines of code are a good day's work. https://www.folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt https://www.folklore.org/StoryView.py?story=Negative_2000_Li...
- ChrisMarshallNY 5y agoLove that story!
- BXLE_1-1-BitIs1 5y agoThere's a number of times I added significant new function to programs while ripping out great gobs of code. My favorite was replacing a function call with a single character constant. Then there were two employers who demanded code proliferation (management incentives tied to KLOCs?). Didn't last long at either place.
- lostcolony 5y agoHow else do you determine what amount infringes? One of the four factors is "The Amount or Substantiality of the Portion Used".
- koolba 5y agoObjective measures are better suited to uniform application of justice vs subjective ones.
- raverbashing 5y agoI'm actually ok with that metric in this case as it's easy for judges to understand and it's actually a good proxy.
- amalcon 5y agoNumber of lines is actually a pretty good (though imperfect) measure of how difficult a code base is to work with, which is why many developers are delighted by the opportunity to delete code.
- kyberias 5y agoLoC is an old and classic software size metric. It's not perfect, but not completely useless either.