Lecture 1 - introduction to software metrics.pptx

RealEffie 127 views 42 slides Oct 05, 2024
Slide 1
Slide 1 of 42
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42

About This Presentation

Software metrics intro


Slide Content

Software Metrics Dr. Odongo Steven Eyobu [email protected]

Content Software Metrics Expectations Organization Reference 2

Organization Class representative + contact Enroll for course on MUELE (http://muele.mak.ac.ug/), enrollment closes after two weeks Communication: use email Compulsory lecture attendance: sign attendance register at every lecture No use of mobile phones during class - either SWITCH OFF or put on SILENCE 3

Organization cont’d Assessments Course work (Assignments, tests, class discussions, participation and attendance) - 40% Final exam (60%) Groups of 5 for course assignments 4

Reference Software Metrics: A Rigorous and Practical Approach, (2nd ed.) (638p.), N.E. Fenton and S.L. Peeger, PWS Publishing, 1998. ISBN 0-534-95425-1. Metrics and Models in Software Quality Engineering, Stephen H. Kan, 2nd ed. (560 p.),Addison-Wesley Professional (2002). ISBN: 0201729156. Software Engineering: A Practitioners Approach, (5th ed.), Roger S.Pressman Web/Internet, some links may be posted on MUELE 5

Teaser Why doesn't your weight increase when you eat a kg of food? Why does a 1GB ash thats full weigh the same as an empty one? 6

Reference for Today’s lecture Material in this lecture is taken from chapters 1-3 of Software Metrics: A Rigorous and Practical Approach (2 nd ed.) , Norman E. Fenton and Shari Lawrence Pfleeger, 1997, PWS Publishing Company, Boston, MA, ISBN 0534954251 7

Overview Measurement – what is it and why do we do it? Measurement basics A goal-based software measurement framework 8

Measurement – What Is It and Why Do We Do It? Measurement in Everyday Life Measurement in Software Engineering The Scope of Software Metrics 9

Measurement in Everyday Life Measurement governs many aspects of everyday life: Economic indicators determine prices, pay raises Medical system measurements enable diagnosis of specific illnesses Measurements in atmospheric systems are the basis of weather prediction 10

How do we use measurement in our lives? In a shop, price is a measure of the value of an item, and we calculate the bill to make sure we get the correct change. Height and size measurements ensure clothing will fit correctly. When traveling, we calculate distance, choose a route, measure speed, and predict when we ’ ll arrive 11

Measurement helps us to: Measurement helps us to: Understand our world Interact with our surroundings Improve our lives Examples Economics Radar Medical Weather Without measurements, technology cant function 12

What is Measurement? some aspect of a thing is assigned a descriptor that allows us to compare it with other things. More formally – the process by which Numbers or symbols are assigned to attributes of entities in the real world in such a way as to describe them according to defined rules . 13

What is Measurement? Measure is a relation between an attribute and a measurement scale Entity : object, event in real world Attribute : feature, property of entity We measure attributes of things 14

Entity in Software Engineering 15 Can be any of the following

Attribute An Attribute is a feature or property of an entity E.g. Blood pressure of a person, duration of the software specification process Two general types Internal Attributes , can be measures based on the enity itself E.g code, coupling, modulariy , internal attribute External Attributes , can be measures only with respect to how the entities relates to the environment Eg , reliability, maintainability 16

Measurement Example 17

Software Metrics It refers to a broad range of quantitative measurements for computer software that enable to improve the software process continuously assist in quality control and productivity assess the quality of technical products assist in tactical decision-making 18

19 What Should Be Measured? measurement What do we use as a basis? • size? • function? project metrics process metrics process product product metrics

Measurement Types Measurements are needed as: Descriptors of entities already in existence Prescriptors (standards, norms, failure intensity objects, benchmarks) which entities of certain class of category should satisfy Predictors to estimate properties of entries yet to be designed or implemented 20

Measurements: How to In order to make entities measurable What entities (objects) should be selected? What attributes should be selected? What values should be assigned to the attributes? What shall be the rules (relationships) ascribed to the attributes and their entiries NOTE: assigned values and /or ascribed rules can be quantitative of qualitative 21

quantitative vs qualitative 22

Understanding Measurement? we must ask questions that are difficult to answer: In a room with blue walls, is “ blue ” a measure of the color of the room? A person ’ s height is a commonly understood attribute that can be easily measured. What other attributes, such as intelligence? Some measurements (e.g., intelligence, wine quality) may have wide error margins – is this a reason to reject them? How do we decide which error margins are acceptable? When is a measurement scale acceptable for the purpose to which it is put (e.g., is it appropriate to measure a person ’ s height in kilometers)? What types of manipulations can we apply to the results of measurement? 23

Example 1: Code Entiry Code: What are the attributes? What are the possible measures? 24

Example 1: Code 25

Example 2: Availability Entity : Availability Attributes: ? Values : ? Relations : ? How are the attributes related? 26

Example 2: Availability Entity : availability Attributes , system uptime, system downtime Values : time is seconds Relations : Availability = uptimes/ (uptime + downtime) 27

Software Metric Challenges 28

Misleading Metrics! Fact (1): Knowledge is power Fact (2): Time is money Relation (rule): power = work/time Substituting ‘power’ & ‘time” Knowledge = work / money As knowledge approaches zero money approaches infinity regardless of the amount for work done Conclusion The less you know, the more you make. 29 What went wrong here!? - Needs validation

Making Things Measurable One aim of science is to find ways of measuring attributes of things we ’ re interested in. Measurement makes concepts more visible, therefore more understandable and controllable. Attributes previously thought to be unmeasurable now form basis for decisions affecting our lives (e.g., air quality, inflation index). Measuring the unmeasurable improves understanding of particular entities, attributes Act of proposing a particular measure can open discussion that will lead to greater understanding Making new measurement may requiring modifying environment or practices (e.g., using a new tool, adding a step in a process) 30 “ What is not measurable, make measurable ” (Galileo Galilei)

What is Software Measurement Software metrics are measures that are used to quantify software, software development resource and/or the software development process This includes items which are directly measureable, such as lines of code, as well as item which are calculated from measurements, such as software quality Involves selecting, measuring & putting together many diff attributes.. Not a trivial task, 300+ metrics have been defined 31

Measurements in SE 32

Measurement in SE In many instances, measurement is considered a luxury. For many projects: Measurable targets are not set (e.g., products are supposed to be user-friendly, reliable, and maintainable, but we don ’ t quantify what that means). The component costs of projects are not quantified or understood. Product quality is not quantified. Too much reliance on anecdotal evidence (e.g., try our product and you ’ ll improve your productivity by 50%!). Most of the time, there ’ s no measurable basis for the claims. 33

.. the effect According to American Programmer, 31.1% of computer software projects get canceled before they are completed, 52.7% will overrun their initial cost estimates by 189%. 94% of project start-ups are restarts of previously failed projects. Solution? systematic approach to software development and measurement 34

Measurement in SE (cont ’ d) When measurements are made, they tend to be: Incomplete Inconsistent Infrequent Most of the time, we ’ re not told anything about: How experiments were designed What was measured and how Realistic error margins Without this information, can ’ t decide whether to apply results to a development effort, and can ’ t do an objective study to repeat the measurements. Lack of measurement in SW engineering is compounded by lack of a rigorous approach . 35

Software Measurement Objectives Assessing status Projects Products for a specific project or projects Processes Resources Identifying trends Need to be able to differentiate between a healthy project and one that ’ s in trouble Determine corrective action Measurements should indicate the appropriate corrective action, if any is required. 36

Info to understand… Managers What does the process cost? How productive is the staff? How good is the code? Will the customer/user be satisfied? How can we improve? Engineers Are the requirements testable? Have all the faults been found? Have the product or process goals been met? What will happen in the future? Users?? 37

Example – why do we need measurement? 38

Example 1 39

Example 2 40

Example 2 41

42
Tags