You might be wondering if measuring how many lines of code is good for a developer. Does writing many lines of code make you more productive? or is it more efficient to write fewer lines of code?
The size of large software projects is frequently described in terms of the number of lines of code they have. When boasting about their accomplishments, people have developed a tendency of mentioning the size of their codebase.
But programmers have always disagreed over the significance of a single line of code. The criticism of LoC(Line of Code) was that it only evaluated how much you typed, not how much good code you produced. If this were the only statistic used, users would inflate their LoC by improperly rewriting their code and causing maintenance issues in the future.
LoC can be misleading when used as a single indicator of developer productivity and/or code quality. The impact of the code written by a team needs to be assessed by the team leader or software development manager. Since lines of code also include commented code and rewrites, using them alone as a measure of code quality is ineffective for assessing developer performance. Additionally, it often encourages undesirable teamwork.
One poor example is using it to gauge productivity. Your developers will typically utilize more lines of code while producing less work if you gauge developer productivity by daily lines of code. And that’s just one illustration of the unfavorable behavior and outcomes that wrong use of this statistic might produce.
Another method to look at the LoC count is to only study it after applying other suitable code quality indicators. Basically, you should be concerned with quality, performance, usability, and adherence to standards throughout the development process. If you get those correctly, the project is likely to be a success.
What you’re actually looking for is a set of metrics that enable you to quantify the intricacy of the work being done by the development team and to see the severity of changes when legacy code is modified, rather than tracking lines of code per day as a productivity statistic.
So, while LoC is one of the metrics to consider, you should always prioritize the performance and efficiency of the code. Or it could simply be a long line of code that executes the command of a shorter line of code.