Professional Documents
Culture Documents
Program 4
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
Prerequisites Reading
• Chapter 7
Program 4 Using PSP1.1, write a program to calculate relative size ranges for very small,
requirements small, medium, large, and very large ranges using standard deviation.
Thoroughly test the program. Test the program using the data provided in
tables 1 and 2. Expected values are included in table 3.
Chapter Pages
Preface 7
Chapter 1 12
Chapter 2 10
Chapter 3 12
Chapter 4 10
Chapter 5 12
Chapter 6 12
Chapter 7 12
Chapter 8 12
Chapter 9 8
Appendix A 8
Appendix B 8
Appendix C 20
Appendix D 14
Appendix E 18
Appendix F 12
Table 2. Pgs/Chapter
Program 4
requirements,
continued
VS S M L VL
LOC/Method 4.3953 8.5081 16.4696 31.8811 61.7137
Pgs/Chapter 6.3375 8.4393 11.2381 14.9650 19.9280
Table 3. Expected Values
Using relative In the PSP, relative size tables are used to give you a framework for judging
size tables in the the size of new parts in your planned products. For example, if you know the
PSP sizes of all previously developed parts of a certain type, you can then better
judge the likely size of a new part of that type. The standard deviation
procedure described in the following section allows you to balance your
esimates so they more or less conform to the normal distribution.
The medium range (M) is the area from -0.5 standard deviations to +0.5
standard deviations from the mean, as shown in Figure 1. Assuming that the
data approximates a normal distribution, the likely number of parts that are
within plus or minus 0.5 standard deviation of the average value is 38.3
percent. Following similar logic, the range percentages area are as follows:
• 6.68 % should be very small
• 24.17% should be small
• 38.2% should be medium
• 24.17% should be large
• 6.68% should be very large
S L
VS VL
-4 -3 -2 -1 0 +1 +2 +3 +4
Calculating a The PROBE estimating method divides historical size data into categories that
relative size table represent your kind of work. One way of doing this is based on standard
using standard deviation. First, divide your historical data into functional categories that each
deviation have at least 6 to 8 members (calculation, text, and data, for example). For
each category you can then calculate the relative size ranges for VS, S, M, L,
and VL following the below procedure.
1. Divide the part sizes by the number of items in each part to determine size
per item, if applicable. For instance, you may not have enough data on
classes to develop a relative size table, but you do have sufficient data on
methods. Instead of using total LOC per class, you can use LOC/method.
Calculating a 2. Next, you’ll need to log-normally transform the data. This is necessary
relative size table because you cannot have negative sizes and the smaller values tend to
using standard bunch up. Log-normally transforming the data allows you plot the data
deviation, around a mean of zero. For each size value, x i , take the natural logarithm,
continued ln, to give ln ( x i ).
n
ln( x ) i
3. Calculate the average of these n logarithmic values: avg = i =1
.
n
n
(ln( x ) − avg )
i
2
Example of In this example, we’ll calculate the relative size ranges for very small, small,
calculating a medium, large, and very large ranges using standard deviation for the data in
relative size table the table below.
1. Divide the part sizes by the number of items in each part to determine size
per item, if applicable. In this instance, the LOC/method is calculated for
each class.
2. For each size value, x i , calculate the natural logarithm, ln, to give ln( x i ).
(ln( x ) − avg )
i
2
5.2350
var = 2 = i =1
= = 0.4363
(n − 1) 12
Example of 7. Convert the natural log values back to their original form by calculating the
calculating a anti-logarithm by calculating e to the power of the log value to determine
relative size the midpoints of the size ranges:
table, continued VS = eln(VS ) = e1.4805 = 4.3953
S = eln(S ) = e2.1410 = 8.5081
M = eln(M ) = e 2.8015 = 16.4696
L = eln(L ) = e3.4620 = 31.8811
VL = eln(VL ) = e 4.1225 = 61.7137
Assignment Before starting program 4, review the top-level PSP1.1 process script below to
instructions 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.
PSP1.1 Process Script
Purpose To guide the development of module-level programs
Entry Criteria - Problem description
- PSP1.1 Project Plan Summary form
- Size Estimating template
- Historical size and time data (estimated and actual)
- Time and Defect Recording logs
- Defect Type, Coding, and Size Counting standards
- Stopwatch (optional)
Step Activities Description
1 Planning - 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.
2 Development - Design the program.
- Implement the design.
- 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.
3 Postmortem Complete the Project Plan Summary form with actual time, defect, and size
data.
Exit Criteria - A thoroughly tested program
- Completed Project Plan Summary form with estimated and actual data
- Completed Size Estimating and Task and Schedule Planning templates
- Completed Test Report template
- Completed PIP forms
- Completed Time and Defect Recording logs
Planning phase Plan program 4 following the PSP1.1 planning phase and the PROBE estimating
scripts.
PSP1.1 Planning Script
Purpose To guide the PSP planning process
Entry Criteria - Problem description
- PSP1.1 Project Plan Summary form
- Size Estimating, Task Planning, and Schedule Planning templates
- Historical size and time data (estimated and actual)
- Time Recording log
Step Activities Description
1 Program - Produce or obtain a requirements statement for the program.
Requirements - Ensure that the requirements statement is clear and unambiguous.
- Resolve any questions.
2 Size - Produce a program conceptual design.
Estimate - Use the PROBE method to estimate the added and modified size of this
program.
- Complete the Size Estimating template and Project Plan Summary form.
3 Resource - Use the PROBE method to estimate the time required to develop this
Estimate 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.)
4 Task and For projects lasting several days or more, complete the Task Planning
Schedule Planning and Schedule Planning templates.
Exit Criteria - Documented requirements statement
- Program conceptual design
- Completed Size Estimating template
- For projects lasting several days or more, completed Task and Schedule
Planning templates
- Completed Project Plan Summary form with estimated program size and
development time data
- Completed Time Recording log
Verify that you have met all of the exit criteria for the planning phase, then have
an instructor review your plan. After your plan has been reviewed, proceed to
the development phase.
Purpose To guide the size and time estimating process using the PROBE method
Entry Criteria - Requirements statement
- Size Estimating template and instructions
- Size per item data for part types
- Time Recording log
- Historical size and time data
General - 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.
Step Activities Description
1 Conceptual Design Review the requirements and produce a conceptual design.
2 Parts Additions Follow the Size Estimating Template instructions to estimate the parts
additions and the new reusable parts sizes.
3 Base Parts and - For the base program, estimate the size of the base, deleted, modified,
Reused Parts and added code.
- Measure and/or estimate the size of the parts to be reused.
4 Size Estimating - If you have sufficient estimated proxy size and actual added and modified
Procedure 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.
4A Size Estimating - Using the linear-regression method, calculate the 0 and 1 parameters
Procedure 4A
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
expected size of the new program), or 1 is not near 1.0 (between about
0.5 and 2.0), use procedure 4B.
4B Size Estimating - Using the linear-regression method, calculate the 0 and 1 parameters
Procedure 4B
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
expected size of the new program), or 1 is not near 1.0 (between about
0.5 and 2.0), use procedure 4C.
4C Size Estimating If you have any data on plan added and modified size and actual added and
Procedure 4C modified size, set 0 = 0 and 1 = (actual total added and modified size to
date/plan total added and modified size to date).
4D Size Estimating If you have no historical data, use your judgment to estimate added and
Procedure 4D modified size.
(continued)
Development Develop the program following the PSP1.1 development phase script.
phase
PSP1.1 Development Script
Verify that you have met all of the exit criteria for the development phase, then
proceed to the postmortem phase.
Postmortem
phase Conduct the postmortem following the PSP1.1 postmortem script.
Verify that you have met all of the exit criteria for the PSP1.1 postmortem phase, then
submit your assignment.
Submitting your When you’ve completed the postmortem phase, submit your assignment
assignment package, source code, and test results to the instructor.
Keep your programs simple. You will learn as much from developing small
programs as from large ones.
If you are not sure about something, ask your instructor for clarification.