Transcript psp-0102

Chapter 19
Process Quality
outline
 Then meaning of process quality
 Process measurement
 COQ


Failure costs, Appraisal costs, Prevetion Costs
Simplifications of COQ- Failure costs, Appraisal
costs
 A/FR: The Appraisal/Failure Ratio
 The calculation of A/FR
山东大学计算机学院
2
Process measure
Quality of program
取决于
Better program
Quality of process
取决于
The way you work
Change the way you work
need
need
Know your process
need
Measure the quality of process
山东大学计算机学院
3
Quality
Measurement
 It concerns:
 The volume of products produced;
 The quality of the products;
 The time and resources required.
 In this class, only the perspective of
defect injection and defect
removal are being addressed.
山东大学计算机学院
4
What not
introduced?





Requirement
Usability
Compatibility
Interface
……
山东大学计算机学院
5
Defect-Removal
Paradox
 One interesting phenomenon:
Defect-removal rates decline as
product quality improves.
 It seems like a paradox, but it’s
natural.
Clearly true for reviewing and
testing;
Less true for compiling.
山东大学计算机学院
6
Defect-Removal
Strategy
 Defects can divided into two
classes:
 Involve only one module
 Involve interactions among the modules
 Defect –removal strategy:
 Strive to develop modules of the highest
possible quality;
 Do thorough inspections of all the
modules interfaces and interactions.
 Inspect the requirements to ensure that
all of the important capablities are
properly understood, designed, and
implemented;
山东大学计算机学院
7
Defect-Removal
Strategy
 Inspect the system and program
design against the requirements to
ensure that it properly address all the
key requirements.
 Do exhaustive unit testing after the
code has been inspected;
 Do comprehensive intergration
testing;
 Do thorough system testing.
 The first step is up to you,but
most important!
山东大学计算机学院
8
Cost of Quality--COQ
Balance the time spent and quality of products
produced.
 COQ (cost measured in time)
 Failure costs of quality (纠错成本) All the costs
of fixing defects.

 Fixing defects time; Debugging time; redesigning,
retesting or recomiling;
 Appraisal costs of quality(评价成本) all the work
to assess the product to see if it has defects.
 Code reviewing time; compiling and testing time;
 Exclude the time spent on defects fixing in above phase.
 Prevention costs of quality (预防成本) modify the
process to avoid injecting defects
 Do analysing time; process of development work to
improve the requirements, design, or implementation;
 Building prototypes.
山东大学计算机学院
9
Simplifying the
calculation of COQ
 PSP counts all compile time as failure
costs.
 Even include some defect-free compile time.
 PSP counts all test time as failure costs.
 PSP counts all review time as appraisal
costs.
 Appraisal COQ: sum of all review time as
a percentage of total development time;
 Failure COQ: sum of all compile and test
time as a percentage of total development
time;
 See the example of table 19.1
山东大学计算机学院
10
A/FR-Appraisal/Failure
Ratio
 Simpler calculate: code review
time/(compile time+test time);
 It measures the relative amount
of time spent finding defects
before the first compile.
 You should attempt to achieve
A/FR of 2 or more.
 Why? See figure 19.1-19.6
 Improving the product quality;
 Saving test time.
山东大学计算机学院
11
PSP Project Plan Summary
Student
Program
Instructor
Student x
Date
Program #
Language
03/30/04
15
Ada
Plan
Actual
5.48
4.60
10.95
13.04
92.53
52.6
40.0
100.0%
0.375
1.93
Plan
Actual
49
57
62
36
Plan
Actual
To Date
17
20
140
29
38
233
116
119
911
21
29
174
15
5
105
41
10
289
To Date
Mr.liu
Summary
Minutes/LOC
LOC/Hour
Defects/KLOC
Yield
A/FR
Program Size (LOC):
Total new and changed
Maximum Size
Minimum Size
Time in Phas e (min.)
Planning
Design
Code
Code review
Compile
Test
山东大学计算机学院
5.35
11.21
86.7
45.5
0.44
To Date
392
To Date %
6.7
11.1
43.4
8.3
5.0
13.8
12
How to achieve A/FRs
above 2.0 ?
 Putting more time on code
reviewing;
 This will not improve program quality!!!
 It is important to productively use
review time in finding defects.
 Code review with high quality.
 For frequently missed defects.
 Insert appropriate steps in
checklist.
 Take more time,find more
defects,increase A/FR
山东大学计算机学院
13
Improving review
rates
 Continue check the defect data
 Continue update your personal
checklist.
 How?
山东大学计算机学院
14
Calculating the true
COQ
 Break the review, compile, and test
times to their respective appraisal and
failure time.
 C=CF+CA; R=RF+RA; T=TF+TA.
 Appraisal COQ=100*(RA +CA
+TA)/totaltime
 Failure COQ=100*(RF +CF
+TF)/totaltime.
 See example in table 19.1 and table
19.3.
 To use this method,you need a
stopwatch!
山东大学计算机学院
15
Summary




Process measurement;
COQ and its calculation;
Meaning of A/FR.
The value of A/FR should be
equal to or more than 2.0.
 Why?
 How?
山东大学计算机学院
16
assignment
 Determine the value of A/FR for
all the programs you have
written.
 Show the relations of A/FR and
test defects/KLOC like figure
19.1
山东大学计算机学院
17
Chapter 20
A Personal
Commitment to
Quality
outline
 Why you should establish quality
as your highest priority?
 Personal life purposes.
 Just for discussion, no content
for examination.
山东大学计算机学院
19
The important of
quality
 Quality of software will be
critically important to your
employers and to your
customers
 Software defects can cause
economic damage and even
physical harm.
 Airplane,auto,air traffic,
factories, power plant, nuclear
power plants.
山东大学计算机学院
20
The increasing risk of
poor quality
 Any defect in a small part of a large




program could potentially cause
serious problem.
Safety system also made of
software.
Most common cause of problem is
simple oversights and goofs.
Feel simple mistakes will be simple
find.
The quality of large system depend
on small programs.
山东大学计算机学院
21
Making a commitment
to quality
 To decided that quality is
important
 To establish the goal of
producing defect-free program
 To manage our fallibility(失误).
 Care enough to continue doing.
山东大学计算机学院
22
Your personal
objectives
 What do you want from your
life?
 This is a big problem!
 One way is to have status or
power.
 Is it good?
 No answer!
山东大学计算机学院
23
The rewards of
accomplishment
 Whatever you build ,quality will
be key!
 Sloppy job will destroy your
pride in the work and it will limit
your satisfaction with life.
 When do quality work, you will
be proud.
 So ask yourself the question:
 “Do I want to feel proud of what
I do?”
山东大学计算机学院
24
 Challenge yourself to do
superior work and you
will be surprised at what
you can accomplish.
山东大学计算机学院
25
The end
Thanks very much!