Tech-IS Home   Forum Home   Search   Login   Register  
OxyProject Metrics  > OxyProject Metrics Standard Edition  > How are effective lines of code computed?  
 
Display using:  
Previous Thread :: Next Thread 
 Author Thread: How are effective lines of code computed?
alpha_techis is not online. Last active: 3/6/2009 2:32:00 PM alpha_techis
Top 25 Poster
Joined: 01 Feb 2008
Total Posts: 25
 
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.


Previous Thread :: Next Thread 
Page 1 of 1
 
Tech-IS Forums  > OxyProject Metrics  > OxyProject Metrics Standard Edition  > How are effective lines of code computed?