You are on page 1of 77

PSP

(SM)

The SEI Personal Software Process Methodology and Main Concepts


January 2012

Prepared by : Moutasem Zakkar; MBA, PMP, CMQ, PSP Email : moutasem@relemit.com Linked In : www.linkedin.com/in/mzakkar

Table Of Content
1 2 3

Introduction

Main Concepts
PSP Methodology

4
5 6 7 8

Software Size Measuring


Software Quality Management Software Design

Project Planning and Controlling


Professional and Personal Responsibility Exam Preparation
2

Introduction
This presentation talks about major concepts of the PSP. I have developed it during my PSP exam preparation. I passed the exam on December 2011. This is not a study material , but still it may help as a good review . I recommend Humphrey s book PSP , which is published by Addison-Wesley.
4

My Personal Evaluation of the PSP


PSP is not a programming course, and programmers whose minds are occupied mainly by JQuery 2.1 over JQuery 2.5, AJAX, WPF, EJB, JSP and the rest of the innovations will not find it important nor necessary . In fact the PSP is not even practical for personal developers, simply because there are no personal developers, and because all of the Software Development projects require a team work

My Personal Evaluation of the PSP


The PSP is a great methodology for senior developers who work for Software Engineering companies, provided that they are supported and encouraged by their companies to use the PSP and the TSP. It is also a great methodology for people who own software development companies, as it will help them to understand what the technical requirement are for producing quality software.
6

My Personal Evaluation of the PSP


PSP requires a major change in the way %90 of the programmers have been using; for what they claim to be A Quality Control. Those programmers will have to accept the fact that Unit Testing is not a good method for Quality Control .

What I dont like in the PSP


I think that the Making and Tracking Project Plans part is weak , and does not cover major important aspects of project management such as the Risk management. Actually the Time management is more complicated than how the PSP is approaching it. I must admit however; that my opinion is based on the fact that I am a PMP certified , and I am comparing the PSP approach in project management with the more sophisticated approach of the PMI.
8

A Defined Process
A defined process provides :

a clearly delineated framework for planning, tracking, and managing work . a guide for doing the work correctly and completely, with the steps in the proper order . an objective basis for measuring the work and tracking progress against goals, and for refining the process in future iterations a tool for planning and managing the quality of products produced. agreed-upon, mutually-understood procedures for team members to use in coordinating their work to produce a common product . a mechanism that enables team members to support each other throughout the course of the project.
10

What is a Plan

A Plan

A record for the Initial agreement and commitment

An Organizing structure for doing the work

A basis for agreeing on the cost ,schedule and resources of the job

A framework for obtaining the required resources

The standard against which to measure job status

11

Processes and Plans


Whereas processes are defined sets of steps for doing a task or project, plans include both the process steps and other elements required for a specific instantiation of that process, such as resources needed, roles of various project members, schedules, budget, goals and objectives, commitments, and identified risks.
12

Why Projects Fail


Project commitments are often unrealistic. Larger projects are harder to Manage. Quality problems get worse with project size. The Lack of Leadership and Coaching

13

PSP Principles
1. To have predictable schedules, you must plan and track your work. 2. To make accurate and trackable plans, you must make detailed plans. 3. To make accurate detailed plans, you must base the plans on historical data. 4. To get the data needed to make accurate plans, you must use a defined and measured personal process. 5. To do high-quality work, you must measure and manage the quality of your development process. 6. Because poor-quality work is not predictable, quality is a prerequisite to predictability.
14

PSP Principles
use a defined and measured personal process

Structured Historical Data

Quality Management

Detailed Plans

High Quality Products

Accurate and Trackable Plans

Predictable Schedule and cost

15

PSP Principles
The quality of a software system is determined by the quality of its worst components. The quality of a software component is governed by the individual who developed it.
The quality of a software component is governed by the quality of the process used to develop it.

The key to quality is the individual developers skill, commitment, and personal process discipline.
Source : PSP , Humphrey , Addison Wesley .
16

PSP Principles
Responsibility : As a software professional, you are responsible for your personal process.
You should measure, track, and analyze your work. You should learn from your performance variations.

You should incorporate lessons learned into your personal practices.


17

Precision and Accuracy


Precision is the amount of data that you use to represent or talk about something . Accuracy is how much correct this data is . This is a good article about these two concepts by a major figure in Software Engineering :
http://alistair.cockburn.us/Parts%3a+precision%2c+accuracy%2c+relevance %2c+tolerance%2c+scale+in+object+design

18

19

The PSP Methodology

Source : Relemit IT Solutions (www.relemit.com)

20

The PSP BOK

Source : http://www.sei.cmu.edu/reports/09sr018.pdf

21

The Project Planning Framework


Define requirements Produce conceptual design Estimate size Estimate resources Produce schedule
Product delivery

Size database Productivity database Resources available Size, resource, schedule data Process analysis
Tracking reports
22

Develop product

Management Support
Management will agree to you and your team mates working as a self-directed team as long as you:
strive to meet their needs regularly report on your work convince them that your plans are sound do quality work respond to changing needs come to them for help when you need it

While this is not hard for you to do, it takes


skill disciplined work guidance and support

23

24

The PSP Measurements


The basic PSP data are
program size time spent by phase defects found and injected by phase

Both actual and estimated data are gathered on every item.


Measures derived from these data
support planning characterize process quality
25

Size Measurement Criteria


Size measurements must be
related to development effort precise machine countable suitable for early planning

The principal requirement: If the size measure is not directly related to development cost, it is not worth using. The size measure should be sensitive to language, design, and development practice.
26

Size Measuring and Estimating


The Planned A & M : This is the size that we get using any means other than Proxy Based , such as :
Expert Judgment Organizational Experience

The Estimated A & M : This is the size that we get from using a Proxy based measuring. The Projected A & M : This is the size that we get from using the PROBE method .
27

Proxy Based Estimation(1)


1. Start from your Relative Size Table 2. Divide your project as per the items in the Relative size table 3. Do estimation

28

Proxy Based Estimation(2)


Relative Size table (Class Proxy)
LOC per item

Type
Calculation

VS
2.34

S
5.13

M
11.25

L
24.66

VL
54.04

Data
I/O Logic

2.60
9.01 7.55

4.79
12.06 10.98

8.84
16.15 15.98

16.31
21.62 23.25

30.09
28.93 33.83

Set-up
Text

3.88
3.75

5.04
8.00

6.56
17.07

8.53
36.41

11.09
77.66
29

Proxy Based Estimation(3)


Size Estimation
My ABC Project
Type Calculation Calculation Data Relative Size S L M Loc Per Item 5.13 24.66 8.84 Estimated Number Of Items 20 45 124 Estimated LOC 106.2 1109.7 1096.16

I/O
I/O Logic Set-up Text Total

M
VL L M L

16.15
28.93 23.25 6.56 36.41

56
37 168 7 43

904.4
1070.41 3906 45.92 1565.63 9804.42
30

Proxy Based Estimation(4)


With sound estimating methods, actual program size will be closely related to estimated program size. The differences will be due to the overhead code and the estimating error. Actual development time is also often related to estimated program size.

Again, with sound methods, the differences will be largely due to overhead activities and estimating error.

31

Proxy Based Estimation(5)


How to Classify New Functionality
When assigning new functionality to size categories, it's important that the assumptions about what constitutes a Very Small, Small, Medium, Large, or Very Large item in the estimate are the same as the assumptions that went into creating the average sizes in the first place. You can accomplish this in any of three ways:

Have the same people who are going to create the estimate create the original numbers for the sizes. Train the estimators so that they classify features accurately. Document the specific criteria for Very Small, Small, Medium, Large, and Very Large so that estimators can apply the size categories consistently. See the next slide for two possible ways to produce the relative size table (as per Humphrey PSP book ) .
32

Proxy Based Estimation(6)


Producing the Relative Size Table

Statistically Mathematically See Page 78 in Humphrey PSP book.

33

PROBE Method (1)


Added Size (The Total Code to be Added) A = BA (Any additions to the Base code) + PA (The Planned new code to be developed) Estimated Size (LOC) E = Added Size + the Modified Size (of the Base Code) E = A + M or E = BA + PA . BA and M are two close concepts of any updates on the Base Code . Projected Development Time = 0time + 1time * Estimated Size.
Projected Added & Modified Size(LOC) = 0size + 1size * Estimated Size

34

PROBE Method (2)


Plan Added and Modified Size
It is more of a guessing and intuitive estimation See PSP 0.1 Planning Process Script

Estimated Size
we use a measurement framework such as Proxy based, Functional point , and others . Estimated Size (LOC) E = Added Size + the Modified Size (of the Base Code) E = A + M or E = BA + PA .
35

PROBE Method (3)


The Projected Development Time calculated by the PROBE is for the whole project phases . Using the To Date % from the historical Data as a guide, we can distribute the development time over the planned project phases.

36

PROBE Method (4) : Size Estimate


Method A (Linear Regression)
you have sufficient estimated proxy size and actual added and modified size data (three or more points that correlate)

Method B (Linear Regression)


If from Method A the absolute value of b0 is not near 0 (less than about 25% of the expected size of the new program), or b1 is not near 1.0 (between about 0.5 and 2.0) you do not have sufficient estimated data but have sufficient plan added and modified and actual added and modified size data (three or more points that correlate),

Method C
If from Method B the absolute value of b0 is not near 0 (less than about 25% of the expected size of the new program), or b1 is not near 1.0 (between about 0.5 and 2.0) you have insufficient data or they do not correlate set b0= 0 and b1= (actual total added and modified size to date/plan total added and modified size to date).

Method D
you have no historical data, use your judgment to estimate added and modified size,

37

PROBE Method (4) : Development Time (Resource) Estimate


Method A (Linear Regression) you have sufficient estimated proxy size and actual development time data (three or more points that correlate)

Method B (Linear Regression) If from Method A b0 is not near 0 (substantially smaller than the expected development time for the new program), or b1 is not within 50% of 1/(historical productivity) you do not have sufficient estimated data but have sufficient plan added and modified and actual development time data (three or more points that correlate), Method C
If from Method B b0 is not near 0 (substantially smaller than the expected development time for the new program), or b1 is not within 50% of 1/(historical productivity) If you have data on estimated added and modified size and actual development time, set b0 = 0 and b1 = (actual total development time to date/estimated total added and modified size to date). If you have data on plan added and modified size and actual development time, set = b0 0 and b1 = (actual total development time to date/plan total added and modified size to date). If you only have actual time and size data, set b0= 0 and b1 = (actual total development time to date/actual total added and modified size to date).

Method D you have no historical data, use your judgment to estimate the development time from the estimated added and modified size.

38

39

Quality Planning
Quality Planning involves :

Estimating the total number of defects that will be injected: Estimating the number of defects that will be injected and removed in each process phase Estimating the amount of time needed for design and code reviews Adjusting these parameters as needed to ensure a high quality result

40

Quality Planning
Estimating Total Defects
Planned total defects = To-date total defects/KLOC (Planned Added and Modified LOC / 1000)

To estimate defects injected and removed by phase, distribute the planned total defects injected and removed based on historical data.
Planned Total Defects To Date % defects injected in each phase To Date % defects removed in each phase
41

Quality Planning
Benchmarks
These PSP benchmarks can be used to estimate design review and code review time in a phase.

Benchmark Code review rate Defect removal rate Design review Code review

Planning Target < 200 LOC/hour 3 to 5 defects/hour 5 to 10 defects/hour > 2.0

A/FR (appraisal to failure ratio)


The Defect Removal Rate is sometime called Removal Efficiency Benchmark data on code review rates can be used to estimate review time: Code Review Time (Minutes) = 60 x (Planned Added and Modified Size LOC) / 200 Design Review Time is the same as Code Review time
42

Defect Removal Rate(Efficiency)


1. 2. 3. 4. It is the number of defects removed per hour for Design review Code review Compile Test
Defect removal efficiency 60 Defects removed in phase Time in phase (minutes)

43

Defect Removal Leverage


Defect removal leverage compares removal efficiency for 1. Design Review vs. Unit Test 2. Code Review vs. Unit Test 3. Compile vs. Unit Test
Defect removal leverage Defects removed per hour for a review or compile phase Defects removed per hour for unit test

44

Quality Indicators
Total defects per KLOC is a measure of the total defects injected during the process. Total Defects Per KLOC = 1000 x Total Defects Removed / Total Added and Modified Size (LOC)

Test defects per KLOC is an indicator of the quality of the program that you put into test.
Test Defects Per KLOC = 1000 x Defects Removed in Test / Total Added and Modified Size (LOC)
45

Software Quality Measures


The Yield
The Yield of a phase is the percentage of defects that are removed in that phase. If a product contained 20 defects at the start of unit testing phase , and seven were found and removed during this phase then the yield is (7/20) * 100 = 35% . The Yield also includes the number of defects found and fixed during the fixing process itself. The Process Yield is the total yield before compiling or before unit testing phase .
Yield(Overall) = 100 x (Defects removed before compile)/ (Defects injected before compile)

Yield benchmark is > 60%


46

Estimating Defects Removed


If we dont have historical data to estimate :

Defects removed in a phase can be calculated using :


number of defects escaping from prior phases number of defects injected in a phase Phase Yield

Defects Present = escapes + injected Defects Removed = Defects present * Phase yield

47

Software Quality Measures


COQ

The cost of quality is a way to quantify the size of quality problem in language that will have impact on upper management. (Juran). Failure Cost : Total time spent in compiling and Testing Appraisal cost : The Total Time spent in design and code reviews and inspections.
48

Software Quality Measures


COQ
%Failure COQ : ((Compile Time + test Time)/(total Project Time)) * 100 %Appraisal COQ : ((design review time + code review time)/(total Project time)) * 100. COQ = %Appraisal COQ + %Failure COQ Appraisal to Failure Ratio (A/FR) : %Appraisal COQ / %Failure COQ PSP benchmark for the A/FR is 2.0

49

Software Quality Measures


COQ : Prevention Cost

For the PSP no measurement is there, since it span across multiple projects . It includes however , prototype development, causal analysis meetings, process improvement action meetings, developing coding standards, and developing design standards.
50

Software Quality Measures


Review Rate

The LOC or pages reviewed per hour. High Review Rates always give low Yield. A Zero Yield review is a high tech way to waste time ! The PSP rule is that 100 LOC per hour is recommended . The best review rate is the one that gives 70% yields or higher.
51

Software Quality Measures


Review Ratio

Design Time to Coding Time : 1 minimum, 1.5 optimum Design Review Time to Design Time : 50% minimum, 70% maximum. Code Review Time to Coding Time : 50% minimum, 70% maximum.

52

Software Quality Measures


Removal Rate

Planned Defects Removal in the phase / Planned Phase time in hour


Defect - Removal Leverage

The Ratio of the defects removed per hour in any two phase.

53

The Design Review Strategy


Produce designs that can be reviewed in stages.

The suggested review stages are as follows. 1. 2. 3. 4. 5. Review against the requirements to ensure that each required function is addressed by the design. Verify the overall program structure and flow. Check the logical constructs for correctness. Check for robustness, safety, and security. Check the function, method, and procedure calls to ensure proper use. Check special variables, parameters, types, and files for proper use.

6.

54

Software Quality Strategy (1)


1. Use Historical Data 2. Follow the PQI guidelines (See previous slide) 3. The most cost effective strategy is to ensure that all program elements are of highest quality when they are first produced. 4. The aim is to remove as many defects as possible before testing 5. This strategy will improve product quality and development productivity. 6. Use the most effective methods to find defects and to prevent them.
55

Software Quality Strategy (2)


The costs of finding and fixing defects escalate rapidly the longer the defects remain in the products. Defects are most economically and effectively handled at the individual level.

56

The Cost Performance Index


The cost performance index (CPI) is
Formula: Planned Total Project Time To Date / Actual Total Project Time To Date a measure of the degree to which projects are completed within planned cost an index of around 1.0 is most desirable an index of less than 1.0 indicates that projects are costing more than planned an index of more than 1.0 indicates that projects are costing less than planned if the index is much more than 1.0, it indicates overly conservative planning
57

58

Software Design
Objectives

The Design should provide the following information


a picture of where the program fits into the system a description of how the program will be used a specification for all related classes and parts a structural view of the product a specification of all external calls and references a list of all external variables, parameters, and constants a clear statement of the programs logic
59

Design Views
Dynamic Static

External

Interactions (services, messages)

Functions (inheritance, class structure)

Internal

Behavior (state machine)

Structure (attributes, constraints)

Design Templates
Four design templates are used in the PSP to cover the four design views.
operational specification template functional specification template state specification template logic specification template

These four templates provide the framework for completely and precisely recording a software design.

Mapping Templates to Views


Dynamic Operational and functional specification templates Static

External

Functional specification template

Internal

State specification template

Logic specification template

Design is an Investment
Experienced programmers do not need to produce designs to write most small programs.

Designs are needed when small programs are to be used as parts of larger systems or when quality is critical.
Based on data from 8,100 PSP programs, programmers who produced designs : spent 53% more time than those who did not wrote programs that were 46% smaller Most programmers know how to write small programs. The critical skill is for developing large programs.
63

64

The Project Plan Summary (PSP 1)

65

The Project Plan Summary (PSP 1.1)

66

The Project Plan Summary (PSP 2)

67

The Project Plan Summary (PSP 2.1)

68

Earned Value Management Example 1


Week 7
Weekly Data Schedule hours for this week Schedule hours this cycle to date Earned value for this week Earned value this cycle to date To-date hours for tasks completed To-date average hours per week Plan 121.0 467.0 7.6 28.2 354.3 Actual 126.7 493.4 6.4 22.3 458.0 Plan/ Actual 0.95 0.95 1.19 1.26 0.77

Is this team ahead of or behind schedule, and by how much?


The team has earned only 22.3 EV against a plan of 28.2 EV, so they are 26.6% behind : The Current Rate : 22.3 / 7 = 3.185 EV per week. To Finish the whole project we need 100 / 3.185 = 31.4 week The Planned rate is : 28.2 / 7 = 4.03 To Finish the whole project we need 100 / 4.03 = 24.8 week We will be behind the schedule in 31.4 24.8 = 6.6 week which is (6.6 / 24.8) * 100 = 26.6 %

At the current rate, it will take 1.85 weeks to reach the planned 28.2 EV, so they are 1.85 weeks behind schedule.
69

Earned Value Management Example 1


What can this team do to finish the work on time? To Finish the whole project we need 100 / 4.03 = 24.8 week (see previous slide)

So the planned execution time is approximately 25 weeks We have finished 22.3 till date so we still have 100 22.3 = 77.7% to finish We already spent 7 weeks out of 25 so we have only 18 weeks . We need to work at the rate of (77.7 / 18) = 4.31 EV per week We are currently working at rate of 3.185 We need to increase it by (4.31 3.185) = 1.125 which is (1.125 / 3.185 ) * 100 = 35% So we need to work 35% more hours per week or add more team members

70

71

The Responsible PSP Professional


As a responsible professional, you need to
find and learn new methods use these methods in your work recognize your strengths and weaknesses identify areas for improvement practice, practice, practice publicize the methods that you find helpful learn from history

This will assure your continuing professional growth and improvement.


72

73

Exam Preparation
Get The necessary materials :
1. Get a Text Book , and I recommend the PSP , Humphrey , Addison Wesley, ISBN10: 0321305493. (Amazon.com Link) 2. If you have the chance attend the official training. 3. Download the Student self Study Material : http://www.sei.cmu.edu/tsp/tools/student/ 4. Download an updated version of Body Of Knowledge.
74

Exam Preparation
A Study Plan
1. Read the text book, and while reading just forget that you are preparing for an exam. 2. Work on the Self-study material.
You need to have Microsoft Access to open it. Read The guidelines on Each assignment and understand the scripts, thoroughly. The Project Plan Summary , is the most important part of the whole PSP methodology. You must understand each figure and you must try to do the calculation manually to verify that you are interpreting the figures correctly , as I did in this presentation.
75

Exam Preparation
A Study Plan

3. Read the Body of knowledge , it is a well prepared material , and the exam will be about it not about any Reference Text Book. 4. There are lots of formulas , you need to understand all of them , and you need to remember the important ones such as all of the COQ formulas .
76

Exam Preparation
What you will see in the exam
1. This is a professional exam , and a tricky exam , so you need to be well prepared. 2. You will get lots of questions about Project Plan Summary , with screenshots of actual summaries where you will be asked to interpret or verify some figures in them. 3. You will get questions about the Earned Value Management. 4. You will get lots of questions about calculating COQ.
77

You might also like