120 likes | 261 Views
CSC 395 – Software Engineering. Lecture 32: Even More Metrics -or- More Ways To View A Project. In This Lecture. Examine metrics and why important Review metrics from last lecture Evaluate which ones are most used and why Theorize proper use of these metrics
E N D
CSC 395 –Software Engineering Lecture 32: Even More Metrics -or-More Ways To View A Project
In This Lecture • Examine metrics and why important • Review metrics from last lecture • Evaluate which ones are most used and why • Theorize proper use of these metrics • More touchy-feely manager issues • Conventional wisdom on middle management does not examine life as non-management • Example of real metric collection and analysis
Midterm Part 2 Cofee Talk • What should go in a use-case? • What starts this program? What ends it? • How should event flow states be connected? • Is software engineering worth it? • Holy Roman Empire was neither holy, nor Roman, nor an Empire
Code Monkeys • Do not want to trust code monkeys • Often untrained & unskilled programmers • Also includes new graduates starting their first job • Internal candidate pool for engineer positions • Nobody and nothing is perfect • At implementation start, design contain faults • Code monkeys must find faults • Often will just fix the small ones • Good monkeys will clean & optimize the ugly design bits • Managers must identify & nurture these diamonds
NASA Metrics Suite http://satc.gsfc.nasa.gov/support/STC_APR98/apply_oo/apply_oo.html • Cyclomatic Complexity (CC) • Lines of Code (LOC) • Comment Percentage (CP) • Weighted Methods per Class (WMC) • Response For a Class (RFC) • Lack of Cohesion Of Methods (LCOM) • Coupling Between Objects (CBO) • Inheritance Tree Depth (DIT) • Number Of Children (NOC)
Weighted Methods per Class • Most classes are (relatively) simple • Complex classes must be tested heavily • Should be examined for potential revision
Response For a Class • Most methods have few methods called • Higher values require complex & extensive testing • Also good candidates for revision
Response For a Class • Coupling is just plain bad • Used by lazy, less experienced, & incompetent
Using Multiple Metrics • Combining metrics identifies problem regions
Inheritance is Mixed Bag • Higher DIT increases reuse • Also makes code more complex & harder to maintain • Additional metric could show if inheritance is good
For Next Lecture • Continue looking at metrics • Changing hows, whens, & whys of measurement • Will be discussing chapter 9 of the book • Do your reading • Looking at how to plan and measure project • Programmers universally under estimate needs • Important when bidding on contracts, charging for changes, & other business functions