|
How are effective lines of code computed? Posted: 22 May 2008 11:17 PM |
The effective lines of code are measured using the following method:
1. Get the number of lines of code
2. Subtract whitespace lines
3. Subtract comment lines
4. Subtract the lines that contains only block constructs (for example in C# begin block construct is the character '{' while end block construct is the character '}'.
For the following C# code snippet
public decimal foo(decimal source)
{
// this is a comment
return Math.Round(source, 2);
}
consists of 5 lines of code and 2 effective lines of code.
|
|
|
 |
|