Program 3 Assignment Kit
Program 3 Assignment Kit
Program 3
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
PSP Fundamentals
Program 3
June 2012
PSP Fundamentals
Assignment Kit for Program 3
Overview
This assignment kit covers the following topics.
Topics
Section
Prerequisites
Program 3
June 2012
See Page
Prerequisites
Program 3 requirements
Regression overview
Correlation overview
An example
Assignment instructions
11
19
20
Reading
Chapters 8 and 9
Program 3 requirements
Program 3
requirements
1
Program
Number
1
2
3
4
5
6
7
8
9
10
2
Estimated
Proxy Size
130
650
99
150
128
302
95
945
368
961
5
4
3
Plan Added and Actual Added and Actual Development
Hours
Modified Size
Modified size
163
186
15.0
765
699
69.9
141
132
6.5
166
272
22.4
137
291
28.4
355
331
65.9
136
199
19.4
1206
1890
198.7
433
788
38.8
1130
1601
138.2
Table 1
Continued on next page
Program 3
June 2012
0
-22.55
-4.039
-23.92
-4.604
Expected Values
1
r
r2
1.7279
0.9545 0.9111
0.1681
0.9333 .8711
1.43097 .9631 .9276
0.140164 .9480 .8988
P
644.429
60.858
528.4294
49.4994
Actual Values
1
r
r2
Table 2
Program 3
June 2012
Regression
Linear regression is a way of optimally fitting to a set of data. We will use a
straight line. The regression selects the slope and intercept so that the sum total
of the distance squared, of each point to that line along the y axis, is smallest.
The equation to that line is
y 0 1 x
Overview
In Figure 1, the best fit regression line has parameters of 0 = -4.0389 and 1 =
0.1681.
250
200
y = -4.0389 +0.1681x
150
100
50
0
0
200
400
600
800
Estimated Proxy Size
1000
1200
Figure 1
Program 3
June 2012
Regression, Continued
Using regression in
the PSP
Looking at Figure 1, how many hours do you think it would take to develop a
program with an estimated proxy size of 500?
Using PROBE method A for time, the estimate would be
TimeEstimate 0 1 500 , or 80.011 hours.
The PSP PROBE method uses regression parameters to make better predictions
of size and time based on your historical data.
PROBE methods A and B differ only in the historical data (x values) used to
calculate the regression parameters. In PROBE method A, estimated proxy
sizes are used as the x values. In PROBE method B, plan added and modified
sizes are used as the x values.
PROBE methods for size and time differ only in the historical data (y values)
used to calculate the regression parameters. To predict improved size estimates,
actual added and modified LOC are used as the y values. To predict time
estimates, actual development times are used as the y values.
Historical Data Used
PROBE A
Size Estimating
PROBE B
PROBE A
Time Estimating
Program 3
June 2012
PROBE B
x values
Estimated Proxy
Size
Plan Added and
Modified Size
Estimated Proxy
Size
Plan Added and
Modified Size
y values
Actual Added and
Modified Size
Actual Added and
Modified Size
Actual
Development
Time
Actual
Development
Time
Correlation
The correlation calculation determines the relationship between two sets of
numerical data.
Overview
Correlation is used in the PSP to judge the quality of the linear relation in
various historical process data that are used for planning, such as the
relationships between estimated proxy size and actual time or plan added and
modified size and actual time.
For this purpose, we examine the value of the relation r squared, or r 2 .
Limitations of
correlation
2
If r is
the relationship is
.9 r 2
.7 r 2 < .9
.5 r 2 < .7
r 2 < .5
Program 3
June 2012
xi yi nxavg yavg
1 i 1 n
2
xi2 nxavg
i 1
0 yavg 1 xavg
The formulas for calculating the correlation coefficient r and r 2 are
n
n n
n xi y i xi y i
i 1
i 1 i 1
n 2 n 2 n 2 n 2
n xi xi n y i y i
i 1 i 1 i 1 i 1
r2 r *r
where
is the symbol for summation
i is an index to the n numbers
x and y are the two paired sets of data
n is the number of items in each set x and y
x avg is the average of the x values
yavg is the average of the y values
Program 3
June 2012
An example
An example
x
130
650
99
150
128
302
95
945
368
961
y
186
699
132
272
291
331
199
1890
788
1601
Table 3
xi yi nxavg yavg
1 i 1 n
2
xi2 nxavg
i 1
1. In this example there are 10 items in each dataset, and therefore we set
n = 10.
2. We can now solve the summation items in the formulas.
n
1
2
3
4
5
6
7
8
9
10
Total
x
130
650
99
150
128
302
95
945
368
961
10
xi 3828
i 1
xavg
3828
382.8
10
x2
16900
422500
9801
22500
16384
91204
9025
893025
135424
923521
y
186
699
132
272
291
331
199
1890
788
1601
10
yi 6389
i 1
yavg
10
xi2 2540284
i 1
y2
x*y
24180
454350
13068
40800
37248
99962
18905
1786050
289984
1538561
10
34596
488601
17424
73984
84681
109561
39601
3572100
620944
2563201
xi yi 4303108
i 1
10
y
i 1
2
i
7604693
6389
638.9
10
Continued on next page
Program 3
June 2012
An example, Continued
An example, cont.
1857399
1.727932
1074926
104303108 38286389
18573988
1074925635227609
18573988
19459460.1
r 0.9545
r 2 0.9111
4. We can then substitute the values in the 0 formula.
0 yavg 1 xavg
0 638.9 1.727932 * 382.8 22.5525
5. We now find P from the formula P 0 1 E .
P 22.5525 1.727932 * 386 644.4294
Program 3
June 2012
10
Assignment instructions
Before starting Program 3, review the top-level PSP2 process script below to
ensure that you understand the big picture before you begin. Also, ensure that
you have all of the required inputs before you begin the planning phase.
Assignment
instructions
Step
1
Activities
Planning
Development
Postmortem
Description
- Produce or obtain a requirements statement.
- Use the PROBE method to estimate the added and modified size of this
program.
- Complete the Size Estimating template.
- Use the PROBE method to estimate the required development time.
- Complete a Task Planning template.
- Complete a Schedule Planning template.
- Enter the plan data in the Project Plan Summary form.
- Complete the Time Recording log.
- Design the program.
- Review the design, and fix and log all defects found.
- Implement the design.
- Review the code, and fix and log all defects found.
- Compile the program, and fix and log all defects found.
- Test the program, and fix and log all defects found.
- Complete the Time Recording log.
Complete the Project Plan Summary form with actual time, defect, and size
data.
Exit Criteria
Program 3
June 2012
11
Plan Program 3 following the PSP2 planning phase and the PROBE estimating
scripts.
Step
1
Activities
Program
Requirements
Size
Estimate
Resource
Estimate
Task and
Schedule Planning
Defect
Estimate
Description
- Produce or obtain a requirements statement for the program.
- Ensure that the requirements statement is clear and unambiguous.
- Resolve any questions.
- Produce a program conceptual design.
- Use the PROBE method to estimate the added and modified size of this
program.
- Complete the Size Estimating template and Project Plan Summary form.
- Use the PROBE method to estimate the time required to develop this
program.
- Using the To Date % from the most recently developed program as a
guide, distribute the development time over the planned project phases.
(Note: This step is completed by the SEI student workbook.)
For projects lasting several days or more, complete the Task Planning and
Schedule Planning templates.
- Based on your to-date data on defects per added and modified size unit,
estimate the total defects to be found in this program.
- Based on your To Date % data, estimate the number of defects to be
injected and removed by phase.
Exit Criteria
Verify that you have met all of the exit criteria for the planning phase, and then
have an instructor review your plan. After your plan has been reviewed,
proceed to the development phase.
Continued on next page
Program 3
June 2012
12
General
Step
1
2
Activities
Conceptual Design
Parts Additions
Size Estimating
Procedure
4A
Size Estimating
Procedure 4A
To guide the size and time estimating process using the PROBE method
- Requirements statement
- Size Estimating template and instructions
- Size per item data for part types
- Time Recording log
- Historical size and time data
- This script assumes that you are using added and modified size data as
the size-accounting types for making size and time estimates.
- If you choose some other size-accounting types, replace every added
and modified in this script with the size-accounting types of your
choice.
Description
Review the requirements and produce a conceptual design.
Follow the Size Estimating Template instructions to estimate the parts
additions and the new reusable parts sizes.
- For the base program, estimate the size of the base, deleted, modified,
and added code.
- Measure and/or estimate the size of the parts to be reused.
- If you have sufficient estimated proxy size and actual added and
modified size data (three or more points that correlate), use procedure
4A.
- If 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), use procedure 4B.
- If you have insufficient data or they do not correlate, use procedure 4C.
- If you have no historical data, use procedure 4D.
- Using the linear-regression method, calculate the 0 and 1 parameters
from the estimated proxy size and actual added and modified size data.
- If the absolute value of 0 is not near 0 (less than about 25% of the
Size Estimating
Procedure 4B
expected size of the new program), or 1 is not near 1.0 (between about
0.5 and 2.0), use procedure 4B.
- Using the linear-regression method, calculate the 0 and 1 parameters
from the plan added and modified size and actual added and modified
size data.
- If the absolute value of 0 is not near 0 (less than about 25% of the
4C
Size Estimating
Procedure 4C
4D
Size Estimating
Procedure 4D
expected size of the new program), or 1 is not near 1.0 (between about
0.5 and 2.0), use procedure 4C.
If you have any data on plan added and modified size and actual added and
modified size, set 0 = 0 and 1 = (actual total added and modified size to
date/plan total added and modified size to date).
If you have no historical data, use your judgment to estimate added and
modified size.
4B
(continued)
Continued on next page
Program 3
June 2012
13
Activities
Time Estimating
Procedure
5A
Time Estimating
Procedure 5A
5B
Time Estimating
Procedure 5B
5C
Time Estimating
Procedure 5C
5D
Time Estimating
Procedure 5D
Time and Size
Prediction Intervals
Exit Criteria
Description
- If you have sufficient estimated proxy size and actual development time
data (three or more points that correlate), use procedure 5A.
- If you do not have sufficient estimated size data but have sufficient plan
added and modified size and actual development time data (three or more
points that correlate), use procedure 5B.
- If you have insufficient data or they do not correlate, use procedure 5C.
- If you have no historical data, use procedure 5D.
- Using the linear-regression method, calculate the 0 and 1 parameters
from the estimated proxy size and actual total development time data.
- If 0 is not near 0 (substantially smaller than the expected development
time for the new program), or 1 is not within 50% of 1/(historical
productivity), use procedure 5B.
- Using the linear-regression method, calculate the 0 and 1 regression
parameters from the plan added and modified size and actual total
development time data.
- If 0 is not near 0 (substantially smaller than the expected development
time for the new program), or 1 is not within 50% of 1/(historical
productivity), use procedure 5C.
- If you have data on estimated added and modified size and actual
development time, set 0 = 0 and 1 = (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 0 = 0 and 1 = (actual total development time to
date/plan total added and modified size to date).
- If you only have actual time and size data, set 0 = 0 and 1 = (actual
total development time to date/actual total added and modified size to
date).
If you have no historical data, use your judgment to estimate the
development time from the estimated added and modified size.
- If you used regression method A or B, calculate the 70% prediction
intervals for the time and size estimates.
- If you did not use the regression method or do not know how to calculate
the prediction interval, calculate the minimum and maximum
development time estimate limits from your historical maximum and
minimum productivity for the programs written to date.
- Completed estimated and actual entries for all pertinent size categories
- Completed PROBE Calculation Worksheet with size and time entries
- Plan and actual values entered on the Project Plan Summary
Continued on next page
Program 3
June 2012
14
Development
phase
Step
1
Activities
Design
Design
Review
Code
Code
Review
Compile
Test
Description
- Review the requirements and produce a design to meet them.
- Record in the Defect Recording log any requirements defects found.
- Record time in the Time Recording log.
- Follow the Design Review script and checklist to review the design.
- Fix all defects found.
- Record defects in the Defect Recording log.
- Record time in the Time Recording log.
- Implement the design following the Coding standard.
- Record in the Defect Recording log any requirements or design defects
found.
- Record time in the Time Recording log.
- Follow the Code Review script and checklist to review the code.
- Fix all defects found.
- Record defects in the Defect Recording log.
- Record time in the Time Recording log.
- Compile the program until there are no compile errors.
- Fix all defects found.
- Record defects in the Defect Recording log.
- Record time in the Time Recording log.
- Test until all tests run without error.
- Fix all defects found.
- Record defects in the Defect Recording log.
- Record time in the Time Recording log.
- Complete a Test Report template on the tests conducted and the results
obtained.
Exit Criteria
Verify that you have met all of the exit criteria for the development phase, and then
proceed to the postmortem phase.
Continued on next page
Program 3
June 2012
15
Design
review
General
Step
1
2
Activities
Preparation
Review
Fix Check
Exit Criteria
Description
Examine the program and checklist and decide on a review strategy.
- Follow the Design Review checklist.
- Review the entire program for each checklist category; do not try to
review for more than one category at a time!
- Check off each item as you complete it.
- Complete a separate checklist for each product or product segment
reviewed.
- Check each defect fix for correctness.
- Re-review all changes.
- Record any fix defects as new defects and, where you know the defective
defect number, enter it in the fix defect space.
-
Program 3
June 2012
16
Code
review
General
Step
1
Activities
Review
Correct
Check
Exit Criteria
Program 3
June 2012
17
Postmortem
phase
Step
1
Activities
Defect Recording
Defect Data
Consistency
Size
Time
Description
- Review the Project Plan Summary to verify that all of the defects found
in each phase were recorded.
- Using your best recollection, record any omitted defects.
- Check that the data on every defect in the Defect Recording log are
accurate and complete.
- Verify that the numbers of defects injected and removed per phase are
reasonable and correct.
- Determine the process yield and verify that the value is reasonable and
correct.
- Using your best recollection, correct any missing or incorrect defect data.
- Count the size of the completed program.
- Determine the size of the base, deleted, modified, base additions, reused,
new reusable code, and added parts.
- Enter these data in the Size Estimating template.
- Determine the total program size.
- Enter this data in the Project Plan Summary form.
- Review the completed Time Recording log for errors or omissions.
- Using your best recollection, correct any missing or incomplete time
data.
Exit Criteria
Verify that you have met all of the exit criteria for the PSP2 postmortem phase,
and then review your assignment.
Continued on next page
Program 3
June 2012
18
Use the attached grading checklist to check your assignment. Ensure that your
assignment is correct before you submit it.
Your process data must be
complete
accurate
precise
self-consistent
Submitting your
assignment
When youve completed your review, package the following data files into a zip
file and upload the zip file to the program 3 assignment page on the SEI Learning
Portal.
Process data (mdb export file from SEI Student Workbook or zip data
backup file from Process Dashboard).
Source program listing.
Test results.
Test Report doc file (Process Dashboard only).
PIP form doc file (Process Dashboard only).
Design review checklist.
Code review checklist.
Suggestions
Program 3
June 2012
19
Program
Accepted or Resubmit
Comments
Accepted
Resubmit
Legend
- O.K.
X - resubmit
Assignment Package
All files are included
Process data file { .mdb (sw) or .zip (pd) }
Source program listing
Test results
Test report .doc file (pd only)
PIP form .doc file (pd only)
Design Review Checklist
Code Review Checklist
Comments
Comments
pd - Process Dashboard
Comments
Defect Log
Comments
Every defect has all required data.
Every defect, injection phase precedes removal phase.
Every defect has a fix time.
Defects injected in compile and test have fix numbers.
Defect descriptions describe what was changed.
Defect types are consistent with description.
Defect types are consistent with phase injected.
PSP2 Grading Checklist
June 2012
20
Comments
Planning Summary
Comments
Actual size data are entered correctly
The CPI value is reasonable.
Planned times are distributed much like the To Date
%..
The defect estimates are based on historical data.
The planned review times and rates are reasonable.
The actual review times are reasonable.
PIP Form
The PIP form is completed.
The entries show insight and thought.
If yield was low, improvement actions are listed.
Comments
Comments
Comments
Consistency Checks
Comments
Defects removed are consistent with compile and test
phase time and program size.
Total compile defect fix times are close to and no
greater than compile time.
Total test defect fix times are close to and no greater
than test time.
Defect dates & phases are consistent with the time log.
Actual Added on planning summary close to and no
less than actual BA+PA on size estimating template.
Between 2 and 3 defects found per hour of design
review.
Between 5 and 10 defects found per hour of code
review.
PSP2 Grading Checklist
June 2012
21
General
Followed the defined process.
Complete, consistent, and accurate process data was
collected.
The student did his or her own work.
Historical data are used in planning the work.
June 2012
22
Comments