DEV Community

Discussion on: Lines of Code don't matter.

Collapse
 
tobias_salzmann profile image
Tobias Salzmann • Edited

Of course, LOC should not be taken as a hard rule, but they can be an indicator of code that needs to be refactored, especially if it is touched frequently.
In the case of your script, it is very likely that the reader does not care about the i/o boilerplate, so that could as well be in another file or at the bottom of the same file. Then you would have one short script that is read often and a long script that is read rarely.

BTW, despite thinking that it is useful as an indicator for complexity, I absolutely agree with you that LOC per time is not a good way to measure effectivity or productivity.