Top Banner
CSC 395 – Software Engineering Lecture 32: Even More Metrics -or- More Ways To View A Project
12

CSC 395 – Software Engineering

Jan 02, 2016

Download

Documents

chandler-mullen

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 - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CSC 395 – Software Engineering

CSC 395 –Software Engineering

Lecture 32:

Even More Metrics -or-More Ways To View A Project

Page 2: CSC 395 – Software Engineering

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

Page 3: CSC 395 – Software Engineering

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

Page 4: CSC 395 – Software Engineering

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

Page 5: CSC 395 – Software Engineering

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)

Page 6: CSC 395 – Software Engineering

Objectives For Each Metric

METRIC OBJECTIVE Cyclomatic Complexity Low

Lines of Code Low

Comment Percentage ~ 20 – 30 %

Weighted Methods per Class Low

Response For a Class Low

Lack of Cohesion Of Methods Low

Coupling Between Objects Low

Inheritance Tree Depth Low (trade-off)

Number Of Children Low (trade-off)

Page 7: CSC 395 – Software Engineering

Weighted Methods per Class

Most classes are (relatively) simple Complex classes must be tested heavily

Should be examined for potential revision

Page 8: CSC 395 – Software Engineering

Response For a Class

Most methods have few methods called Higher values require complex & extensive testing

Also good candidates for revision

Page 9: CSC 395 – Software Engineering

Response For a Class

Coupling is just plain bad Used by lazy, less experienced, & incompetent

Page 10: CSC 395 – Software Engineering

Using Multiple Metrics

Combining metrics identifies problem regions

Page 11: CSC 395 – Software Engineering

Inheritance is Mixed Bag

Higher DIT increases reuse Also makes code more complex & harder to maintain

Additional metric could show if inheritance is good

Page 12: CSC 395 – Software Engineering

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