Table of Contents
Why are lines of code bad metric for programmer productivity?
Lack of accountability: lines-of-code measure suffers from some fundamental problems. Some think that it isn’t useful to measure the productivity of a project using only results from the coding phase, which usually accounts for only 30\% to 35\% of the overall effort.
Are long lines of code bad?
A piece of source code in your software could be compared to a page of a book. In addition to negatively affecting readability, having very long lines can destroy the positive impact of code indentation, which makes the code even harder to understand and maintain (because of chaotic line returns).
Why is it misleading to compare lines of code LOC productivity across different programming languages?
Comparing productivity across programming languages can also give misleading impressions of programmer productivity. This anomaly arises because all software development activities are considered together when computing the development time, but the LOC metric only applies to the programming process.
What are the issues in measuring the software size using LOC as a metric?
Drawbacks of LOC
- It is defined on code. For example it cannot measure the size of specification.
- It characterise only one specific view of size, namely length, it takes no account of functionality or complexity.
- Bad software design may cause excessive line of code.
- It is language dependent.
- Users cannot easly understand it.
How many lines should code be?
There is an industry-standard metric that a typical programmer should be able to write 20 lines of debugged and documented code per day.
How many lines of code should a file have?
Unless there is something special about it, no code file should reach 2000 lines. While there are good cases for some essentially pro-forma small files, my gut feel is that 200–800 lines is a good working size. Though splits should follow function, never be arbitrary.
What are some problems associated with counting LOC as a way of measuring developer productivity?
However, there are several problems with it including LOC is difficult to measure, there is no agreed standard, and LOC is dependent on programming language, etc. To achieve effective measurement, we should ask ourselves what is the final goal for the project?