ANU The Australian National University



____________________________________________________

[ANU] [DCS] [COMP2100/2500] [Description] [Schedule] [Lectures] [Labs] [Homework] [Assignments] [COMP2500] [Assessment] [PSP] [Java] [Reading] [Help]

____________________________________________________

COMP2100/2500
Lecture 19: PSP III

Summary

I will explain the updated, improved version of the process, with code review and calculations of things like defect removal rates, productivity, process yield etc.


There are several new elements we will add to our PSP and use for the rest of the semester.

From now on, use the Final Project Plan Summary form, the one that doesn't have any parts “greyed out”.

1. Code Review

(See Chapters 13 & 14 of Introduction to the Personal Software Process.)

Do a Code Review after the Code phase and before the Compile phase. (See Lecture 14 for the reasons why.)


2. Personal Code Review Checklist

Follow your Code Review Checklist developed in the old Lab 7. Next to each item put an X if you don't find any defects, and the number of defects found if you do. Keep track of the To Date number and percentage of defects found by each Checklist item from now on.

I will incorporate that part of the old lab instructions here... real soon now...


3. Projecting Defects

(See Chapter 15 of Introduction to the Personal Software Process.)

From now on we are going to calculate the defect density in our programs. The units for defect density are Defects per thousand lines of code, abbreviated Defects/KLOC.

It may seem a bit funny to be planning how many defects you will inject into a program, but that's not really the way to think about it. What you're doing is estimating, based on experience, how many defects you are likely to inject into the program. This allows you to look at the actual number of defects you find and make a judgement as to whether there are likely to be many remaining defects or not. If you know that you are likely to inject 20 defects but your Code Review only finds three, chances are that you need to go back and look again.


4. Defect Rates

(See Chapter 16 of Introduction to the Personal Software Process.)

This is part of something called defect “economics”. How many defects do you remove per hour in the different phases of development?


5. Yield

(See Chapter 16 of Introduction to the Personal Software Process.)

The process yield is defined as the percentage of defects found in the Code Review phase. (This only counts defects that were there at the start of the Compile phase, not defects that were introduced during Compile or Test. The Code Review can hardly be expected to remove those.)

At first the Plan figures won't make much sense since you haven't been doing a Code Review until now, but the numbers will settle down quickly enough.

Of course it would be great to have 100% yield, but that's very rare. A realistic long-term goal is to achieve yield values that are consistently over 70%. Even this will take some work. You need to keep reviewing your Code Review Checklist and improving it.

It's also worth working on reducing the number of defects you introduce. Although this will make it harder to achieve a high yield, remember that a high yield value is not an end in itself, it's a means to an end: the real goal is defect-free software, produced on time and under budget.


6. Process Quality

(See Chapter 19 of Introduction to the Personal Software Process. The A/FR I'm describing here is the one from Section 19.8, Calculating the True Cost of Quality, not the simplified version described earlier.)

Here we focus not on the quality of the product we produce (the finished program) but on the quality of the process we use to produce it. Ultimately the quality of your software will be determined by the quality of the process you follow.

How can you know how good your process is? One way is to look at the quality of the products it produces. But there are other things you can measure, which address the process directly.

Why bother? Because as you get better at this and your product quality improves, defect removal rates necessarily fall. When there are lots of defects to be found, you will usually find most of them pretty quickly; but when there are only a very few defects to find, all the time you spend on Code Review, Compile and Test will be devoted to finding these few defects. After an initial improvement, the measures above will seem to get worse again.

As you spend longer and longer looking for the last few defects, there has to be a point when you stop, when it's no longer worth the extra time spent. No matter how much you might hate this, you have only limited time to spend on getting your programs right, and out there in the business world time is money. So you need to measure the cost of quality, the amount of time you spend achieving low defect rates.

There are three parts to the cost of quality: prevention, appraisal and failure costs. We will only look at appraisal and failure costs here. Failure cost is the amount of time you spend fixing defects. This is the sum of all the Fix Time entries in your Defect Log. Appraisal cost is the time you spend looking for defects. This is all the time you spend in Code Review, Compile and Test when you weren't fixing defects.

We could measure both of these and record them on the Project Plan Summary, but it turns out that it's not those times (or their percentage of the total development time) that's most important, but their ratio. Research shows that the Appraisal to Failure Ratio, or A/FR is a crucial measure of quality. High A/FR correlates very strongly with low rates of defects found in the Test phase and with low time spent in the Test phase. We should be aiming for an A/FR of 3.0 or greater.

This section describes an advanced quality measure, so I'm making it optional for you to calculate in your homework exercises. It's probably only useful once you have had some experience with the PSP, code reviews, continuous improvement of your code review check list and process yield. I recommend that you calculate at least the Actual A/FR, because it's not much extra trouble and could be a useful pointer for you.


Notes

All the quality measures we're talking about here are concerned with defects: how many there are, how fast and how effectively we find them, and so on. But remember that there's a lot more to quality than this. For now, we're focussing on defects, as an important first step in achieving quality. You can't have quality software that's full of defects, but just having no defects is no guarantee of quality.

So what else is involved? For a start, it's possible to write a defect-free program that does the wrong thing. Making sure that you understand the requirements is the task of analysis, which we have hardly touched, but which you will look at in detail in COMP3110.

Secondly, there's the question of design. As you become experienced with the PSP, you will probably find that you make fewer and fewer coding errors, and that design defects become more significant. So how can you improve your designs? You will study some of that (although predominantly the higher-level aspects) in COMP2110. Some of COMP3110 is concerned with detailed design.

For those of you continuing to fourth year software engineering, quality will become your major focus. In particular you will take a whole course on process improvement.

____________________________________________________

[ANU] [DCS] [COMP2100/2500] [Description] [Schedule] [Lectures] [Labs] [Homework] [Assignments] [COMP2500] [Assessment] [PSP] [Java] [Reading] [Help]

____________________________________________________

Copyright © 2005, Ian Barnes, The Australian National University
Version 2005.2, Wednesday, 27 April 2005, 12:42:53 +1000
Feedback & Queries to comp2100@cs.anu.edu.au