Presentation is loading. Please wait.

Presentation is loading. Please wait.

SE-280 Dr. Mark L. Hornick 1 Measuring Software Size.

Similar presentations


Presentation on theme: "SE-280 Dr. Mark L. Hornick 1 Measuring Software Size."— Presentation transcript:

1 SE-280 Dr. Mark L. Hornick 1 Measuring Software Size

2 SE-280 Dr. Mark L. Hornick 2 We want to establish a historical Size-Effort Correlation for future planning purposes 0 0.5 1 1.5 2 2.5 3 3.5 050100150200 Actual Size (LOC) Actual Time (hrs) xkxk ykyk Is LOC a good measure of size? Yes, according to 20+ years of research conducted by Humphrey

3 SE-280 Dr. Mark L. Hornick 3 But how should we count LOC? LOC types Logical lines of code Physical lines of code if (a>b) c = a; else c = b; if (a>b) c = a; else c = b; if (a>b) { c = a; } else { c = b; } if (a>b) { c = a; } else { c = b; }

4 SE-280 Dr. Mark L. Hornick 4 As with many organizations, MSOE has adopted a Java Coding Standard In the SDL, the coding standard is: https://opal.msoe.edu/mediawiki/index.php/Java_Coding_D ocumentation_Standard https://opal.msoe.edu/mediawiki/index.php/Java_Coding_D ocumentation_Standard URL also included on course & lab web pages Following this standard, Logical LOC = physical LOC Count physical lines to get logical Reasonable if each countable element is on a separate physical line Don’t count comments, blank lines Don’t count braces if on separate lines

5 SE-280 Dr. Mark L. Hornick 5 Which LOC do we count? 0 0.5 1 1.5 2 2.5 3 3.5 050100150200 Actual Size (A+M LOC) Actual Time (hrs) xkxk ykyk Only the code we’ve added or modified, and we count those equally. We don’t count code we haven’t touched or any code in libraries that we only use.

6 When we build new code on an existing base, we must do size accounting properly in order to get meaningful results. DeletedModifiedAdded UnmodifiedReused Base Program – e.g., cycle 1 New Program – e.g., cycle 2 Added and Modified New Reusable

7 Let's try an example. Total LOC for cycle 1 = 200 Total LOC for cycle 2 = 300 Modified LOC = 25 Deleted LOC = 50 Reused "Calc" class from another course project = 50 LOC No new additions to “Reuse Library” How much A+M LOC? DeletedModifiedAdded Unmodified Reused Base Program New Program Added and Modified New Reusable This is the accounting method used in the textbook.

8 Example solution Total LOC for cycle 1 = 200 Total LOC for cycle 2 = 300 Modified LOC = 25 Deleted LOC = 50 Reused "Calc" class from an earlier project = 50 LOC No new additions to “Reuse Library” How much A+M LOC? DeletedModifiedAdded Unmodified Reused Base Program New Program Added and Modified New Reusable This is the accounting method used in the textbook.

9 SE-280 Dr. Mark L. Hornick 9 Code counting demo

10 Once we count LOC, we enter the values into PD PD maintains the historical time vs. effort relationships that can be used to make subsequent resource estimates More on that next week SE-280 Dr. Mark L. Hornick 10

11 Process improvement proposals (PIPs) are used to record process problems and possible solutions. Problem Proposed process modification Notes or comments

12 SE-280 Dr. Mark L. Hornick 12 Before lab Review Java Coding Standard https://opal.msoe.edu/mediawiki/index.php/Ja va_Coding_Documentation_Standard https://opal.msoe.edu/mediawiki/index.php/Ja va_Coding_Documentation_Standard


Download ppt "SE-280 Dr. Mark L. Hornick 1 Measuring Software Size."

Similar presentations


Ads by Google