Transparency Masters for Software Engineering: A

Download Report

Transcript Transparency Masters for Software Engineering: A

SEC 308 Yazılım Mühendisliği
Software Project Planning
1
The Four P’s
0 People — the most important element of a successful project
0 Product — the software to be built
0 Process — the set of framework activities and software
engineering tasks to get the job done
0 Project — all work required to make the product a reality
People
Product
Process
Project
2
The People: The Stakeholders
0 Five categories of stakeholders
0 Senior managers who define the business issues that often
have significant influence on the project.
0 Project (technical) managers who must plan, motivate,
organize, and control the practitioners who do software work.
0 Practitioners who deliver the technical skills that are
necessary to engineer a product or application.
0 Customers who specify the requirements for the software to be
engineered and other stakeholders who have a peripheral
interest in the outcome.
0 End-users who interact with the software once it is released for
production use.
3
Software Teams
How to lead?
How to organize?
How to collaborate?
How to motivate?
How to create good ideas?
4
The People: Team Leaders
0 Qualities to look for in a team leader
0 Motivation. The ability to encourage (by “push or pull”)
technical people to produce to their best ability.
0 Organization. The ability to mold existing processes (or
invent new ones) that will enable the initial concept to be
translated into a final product.
0 Ideas or innovation. The ability to encourage people to
create and feel creative even when they must work within
bounds established for a particular software product or
application.
5
The People: The Software
Team
0 Seven project factors to consider when structuring a
software development team
0 the difficulty of the problem to be solved
0 the size of the resultant program(s) in lines of code or function
0
0
0
0
0
points
the time that the team will stay together (team lifetime)
the degree to which the problem can be modularized
the required quality and reliability of the system to be built
the rigidity of the delivery date
the degree of sociability (communication) required for the
project
6
The Product Scope
0 Scope
0 Context. How does the software to be built fit into a larger
system, product, or business context and what constraints
are imposed as a result of the context?
0 Information objectives. What customer-visible data
objects are produced as output from the software? What
data objects are required for input?
0 Function and performance. What function does the
software perform to transform input data into output? Are
any special performance characteristics to be addressed?
0 Software project scope must be unambiguous and
understandable at the management and technical levels.
7
Problem Decomposition
0 Sometimes called partitioning or problem
elaboration
0 Once scope is defined …
0 It is decomposed into constituent functions
0 It is decomposed into user-visible data objects
or
0 It is decomposed into a set of problem classes
0 Decomposition process continues until all
functions or problem classes have been defined
8
The Process
0 Once a process framework has been established
0 Consider project characteristics
0 Determine the degree of rigor required
0 Define a task set for each software engineering activity
0 Task set =
0 Software engineering tasks
0 Work products
0 Quality assurance points
0 Milestones
9
The Project
0 Projects get into trouble when …
0
0
0
0
0
0
0
0
0
0
Software people don’t understand their customer’s needs.
The product scope is poorly defined.
Changes are managed poorly.
The chosen technology changes.
Business needs change [or are ill-defined].
Deadlines are unrealistic.
Users are resistant.
Sponsorship is lost [or was never properly obtained].
The project team lacks people with appropriate skills.
Managers [and practitioners] avoid best practices and lessons
learned.
10
To Get to the Essence of a
Project
0 Why is the system being developed?
0 What will be done?
0 When will it be accomplished?
0 Who is responsible?
0 Where are they organizationally located?
0 How will the job be done technically and
managerially?
0 How much of each resource (e.g., people, software,
tools, database) will be needed?
11
A Good Manager Measures
process
process metrics
project metrics
measurement
product metrics
product
What do we
use as a
basis?
• size?
• function?
12
Why Do We Measure?
0 assess the status of an ongoing project
0 track potential risks
0 uncover problem areas before they go “critical,”
0 adjust work flow or tasks,
0 evaluate the project team’s ability to control quality
of software work products.
13
Process Metrics
0 Quality-related
0 focus on quality of work products and deliverables
0 Productivity-related
0 Production of work-products related to effort expended
0 Statistical SQA data
0 error categorization & analysis
0 Defect removal efficiency
0 propagation of errors from process activity to activity
0 Reuse data
0 The number of components produced and their degree of
reusability
14
Typical Project Metrics
0 Effort/time per software engineering task
0 Errors uncovered per review hour
0 Scheduled vs. actual milestone dates
0 Changes (number) and their characteristics
0 Distribution of effort on software engineering tasks
15
Typical Size-Oriented Metrics
0
0
0
0
0
0
0
0
errors per KLOC (thousand lines of code)
defects per KLOC
$ per LOC
pages of documentation per KLOC
errors per person-month
errors per review hour
LOC per person-month
$ per page of documentation
16
Typical Function-Oriented Metrics
0 errors per FP (function point)
0 defects per FP
0 $ per FP
0 pages of documentation per FP
0 FP per person-month
17
Function-Oriented Metrics
0 FP are computed by
FP = count-total * [0.65 + 0.01 * Sum(Fi)]
0 count-total is the sum of all FP entries
0 The Fi (i = 1 to 14) are "complexity adjustment values" based
on responses to the following questions [ART85]:
1. Does the system require reliable backup and recovery?
2. Are data communications required?
3. Are there distributed processing functions?
4. Is performance critical?
...
0 Each of these questions is answered using a scale that ranges from 0
(not important or applicable) to 5 (absolutely essential).
18
Comparing LOC and FP
Programming
Language
Ada
Assemb ler
C
C++
COBOL
Java
JavaSc ript
Perl
PL/1
Powerbuilder
SAS
Smalltalk
SQL
Visual Basic
LOC per Function point
avg.
median
low
high
154
337
162
66
315
109
53
104
91
33
29
205
694
704
178
77
63
58
60
78
32
40
26
40
47
77
53
63
67
31
41
19
37
42
14
77
42
22
11
33
10
7
16
400
75
263
105
49
55
110
158
Representative values developed by QSM
19
Object-Oriented Metrics
0 Number of scenario scripts (use-cases)
0 Number of support classes (required to implement
the system but are not immediately related to the
problem domain)
0 Average number of support classes per key class
(analysis class)
0 Number of subsystems (an aggregation of classes
that support a function that is visible to the enduser of a system)
20
WebApp Project Metrics
0 Number of static Web pages (the end-user has no control over the
0
0
0
0
0
0
0
content displayed on the page)
Number of dynamic Web pages (end-user actions result in customized
content displayed on the page)
Number of internal page links (internal page links are pointers that
provide a hyperlink to some other Web page within the WebApp)
Number of persistent data objects
Number of external systems interfaced
Number of static content objects
Number of dynamic content objects
Number of executable functions
21
Measuring Quality
0 Correctness — the degree to which a program
operates according to specification
0 Maintainability—the degree to which a program is
amenable to change
0 Integrity—the degree to which a program is
impervious to outside attack
0 Usability—the degree to which a program is easy to
use
22
Defect Removal Efficiency
DRE = E /(E + D)
where:
E is the number of errors found before
delivery of the software to the end-user
D is the number of defects found after
delivery.
23
Software Project Planning
The overall goal of project planning is to
establish a pragmatic strategy for controlling,
tracking, and monitoring a complex technical
project.
Why?
So the end result gets done on time, with quality!
24
Project Planning Task Set
0 Establish project scope
0 Determine feasibility
0 Analyze risks
0 Define required resources
0 Determine required human resources
0 Define reusable software resources
0 Identify environmental resources
25
Project Planning Task Set (cont.)
0 Estimate cost and effort
0 Decompose the problem
0 Develop two or more estimates using size, function
points, process tasks or use-cases
0 Reconcile the estimates
0 Develop a project schedule
0 Establish a meaningful task set
0 Define a task network
0 Use scheduling tools to develop a timeline chart
0 Define schedule tracking mechanisms
26
Estimation
0 Estimation of resources, cost, and schedule
for a software engineering effort requires
0 experience
0 access to good historical information (metrics)
0 the courage to commit to quantitative
predictions when qualitative information is all
that exists
0 Estimation carries inherent risk and this risk
leads to uncertainty
27
Write it Down!
Project Scope
Estimates
Risks
Schedule
Control strategy
Software
Project
Plan
28
What is Scope?
0 Software scope describes
0 the functions and features that are to be delivered to end-users
0 the data that are input and output
0 the “content” that is presented to users as a consequence of
using the software
0 the performance, constraints, interfaces, and reliability that
bound the system.
0 Scope is defined using one of two techniques:
0 A narrative description of software scope is developed after
communication with all stakeholders.
0 A set of use-cases is developed by end-users.
29
Resource Estimation
0 Three major categories of software engineering resources
0 People
0 Development environment
0 Reusable software components
0 Often neglected during planning but become a paramount concern during
the construction phase of the software process
0 Each resource is specified with
0 A description of the resource
0 A statement of availability
0 The time when the resource will be required
0 The duration of time that the resource will be applied
Time window
30
Categories of Resources
People
- Number required
- Skills required
- Geographical location
Development Environment
- Software tools
- Computer hardware
- Network resources
The
Project
Reusable Software Components
- Off-the-shelf components
- Full-experience components
- Partial-experience components
- New components
31
Human Resources
0 Planners need to select the number and the kind of
people skills needed to complete the project
0 They need to specify the organizational position
and job specialty for each person
0 Small projects of a few person-months may only
need one individual
0 Large projects spanning many person-months or
years require the location of the person to be
specified also
0 The number of people required can be determined
only after an estimate of the development effort 32
Development Environment
Resources
0 A software engineering environment (SEE)
incorporates hardware, software, and network
resources that provide platforms and tools to
develop and test software work products
0 Most software organizations have many projects
that require access to the SEE provided by the
organization
0 Planners must identify the time window required
for hardware and software and verify that these
33
resources will be available
Reusable Software Resources
0 Off-the-shelf components
0 Components are from a third party or were developed for
a previous project
0 Ready to use; fully validated and documented; virtually
no risk
0 Full-experience components
0 Components are similar to the software that needs to be
built
0 Software team has full experience in the application area
of these components
0 Modification of components will incur relatively low risk34
Reusable Software Resources
0 Partial-experience components
0 Components are related somehow to the software that
needs to be built but will require substantial modification
0 Software team has only limited experience in the
application area of these components
0 Modifications that are required have a fair degree of risk
0 New components
0 Components must be built from scratch by the software
team specifically for the needs of the current project
0 Software team has no practical experience in the
application area
0 Software development of components has a high degree35
of risk
Estimation Techniques
• Past (similar) project experience
• Conventional estimation techniques
• task breakdown and effort
estimates
• size (e.g., FP) estimates
• Empirical models
• Automated tools
36
Functional Decomposition
Statement
of
Scope
Perform a
Grammatical “parse”
functional
decomposition
37
Problem-Based Estimation
0 Start with a bounded statement of scope
0 Decompose the software into problem functions
that can each be estimated individually
0 Compute an LOC or FP value for each function
0 Derive cost or effort estimates by applying the LOC
or FP values to your baseline productivity metrics
(e.g., LOC/person-month or FP/person-month)
0 Combine function estimates to produce an overall
estimate for the entire project
38
Problem-Based Estimation
0 In general, the LOC/pm and FP/pm metrics should be
computed by project domain
0 Important factors are team size, application area, and
complexity
0 LOC and FP estimation differ in the level of detail required
for decomposition with each value
0 For LOC, decomposition of functions is essential and should go
into considerable detail (the more detail, the more accurate
the estimate)
0 For FP, decomposition occurs for the five information domain
characteristics and the 14 adjustment factors
0 External inputs, external outputs, external inquiries, internal
logical files, external interface files
39
Problem-Based Estimation
0 For both approaches, the planner uses lessons learned to
estimate an optimistic, most likely, and pessimistic size
value for each function or count (for each information
domain value)
0 Then the expected size value S is computed as follows:
S = (Sopt + 4Sm + Spess)/6
0 Historical LOC or FP data is then compared to S in order to
cross-check it
40
Example: LOC Approach
Average productivity for systems of this type = 620 LOC/pm.
Burdened labor rate =$8000 per month, the cost per line of
code is approximately $13.
Based on the LOC estimate and the historical productivity
data, the total estimated project cost is $431,000 and the
estimated effort is 54 person-months.
41
Example: FP Approach
The estimated number of FP is derived:
FPestimated = count-total * [0.65 + 0.01 * Sum(Fi)]
(see next)
FPestimated = 375
organizational average productivity = 6.5 FP/pm.
burdened labor rate = $8000 per month, the cost per FP is approximately
$1230.
Based on the FP estimate and the historical productivity data, the total
estimated project cost is $461,000 and the estimated effort is 58 personmonths.
42
Complexity Adjustment Factor
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Factor
Backup and recovery
Data communications
Distributed processing
Performance critical
Existing operating environment
On-line data entry
Input transaction over multiple screens
Master files updated on-line
Information domain values complex
Internal processing complex
Code designed for reuse
Conversion/installation in design
Multiple installations
Application designed for change
Value
4
2
0
4
3
4
5
3
5
5
4
3
5
5
•
•
Answer the factors
using a scale that
ranges from 0 (not
important or applicable)
to 5 (absolutely
essential)
Sum(Fi)=52
43
Example: FP Approach
The estimated number of FP is derived:
FPestimated = count-total * [0.65 + 0.01 * Sum(Fi)]
FPestimated = 375
organizational average productivity = 6.5 FP/pm.
burdened labor rate = $8000 per month, the cost per FP is approximately
$1230.
Based on the FP estimate and the historical productivity data, the total
estimated project cost is $461,000 and the estimated effort is 58 personmonths.
44
Process-Based Estimation
0
0
0
Identify the set of functions that the software
needs to perform as obtained from the project
scope
Identify the series of framework activities that
need to be performed for each function
Estimate the effort (in person months) that will
be required to accomplish each software process
activity for each function
45
Process-Based Estimation
Apply average labor rates (i.e., cost/unit effort) to the
effort estimated for each process activity
Compute the total cost and effort for each function and
each framework activity (See table in Pressman, p. 655)
Compare the resulting values to those obtained by way of
the LOC and FP estimates
0
0
0
0
0
If both sets of estimates agree, then your numbers are
highly reliable
Otherwise, conduct further investigation and analysis
concerning the function and activity breakdown
This is the most commonly used of the two estimation
techniques (problem and process)
46
Process-Based Estimation
Obtained from “process framework”
framework activities
application
functions
Effort required to
accomplish
each framework
activity for each
application function
47
Process-Based Estimation
Example
Activity
CC
Planning
Risk
Analysis
Task
Engineering
Construction
Release
analysis
design
code
test
0.50
0.75
0.50
0.50
0.50
0.25
0.50
2.50
4.00
4.00
3.00
3.00
2.00
2.00
0.40
0.60
1.00
1.00
0.75
0.50
0.50
5.00
2.00
3.00
1.50
1.50
1.50
2.00
4.50
CE
Totals
n/a
n/a
n/a
n/a
n/a
n/a
n/a
8.40
7.35
8.50
6.00
5.75
4.25
5.00
Function
UICF
2DGA
3DGA
CGDF
DSM
PCF
DAM
Totals
0.25
0.25
0.25
3.50
20.50
% effort
1%
1%
1%
8%
45%
10%
16.50
46.00
36%
CC = customer communication CE = customer evaluation
Based on an average burdened labor rate of $8,000 per
month, the total estimated project cost is $368,000 and the
estimated effort is 46 person-months.
48
Tool-Based Estimation
project characteristics
calibration factors
LOC/FP data
49
Estimation with UseCases
use cases scenarios pages
e subsystem
6
10
6
User interf ace
subsystem
Engineeringsubsystem
subsystem
group
group
10
20
8
Inf rastructure
subsystem
group
e subsystem
group
5
6
5
Total LOC estimate
stimate
scenarios pages
12
5
16
8
10
6
LOC LOC estimate
560
3,366
3100
31,233
1650
7,970
42,568
Using 620 LOC/pm as the average productivity for systems of
this type and a burdened labor rate of $8000 per month, the
cost per line of code is approximately $13. Based on the usecase estimate and the historical productivity data, the total
estimated project cost is $552,000 and the estimated effort is
68 person-months.
50
Empirical Estimation
Models
General form:
exponent
effort = tuning coefficient * size
usually derived
as person-months
of effort required
either a constant or
a number derived based
on complexity of project
empirically
derived
usually LOC but
may also be
function point
51
COCOMO-II
0 COCOMO II is actually a hierarchy of estimation
models that address the following areas:
0 Application composition model. Used during the early stages of
software engineering, when prototyping of user interfaces,
consideration of software and system interaction, assessment of
performance, and evaluation of technology maturity are
paramount.
0 Early design stage model. Used once requirements have been
stabilized and basic software architecture has been established.
0 Post-architecture-stage model. Used during the construction of the
software.
52
The Software Equation
A dynamic multivariable model
E = [LOC x B0.333/P]3 x (1/t4)
where
E = effort in person-months or person-years
t = project duration in months or years
B = “special skills factor”
P = “productivity parameter”
53
Estimation for OO
Projects-I
0 Develop estimates using effort decomposition, FP analysis, and any
other method that is applicable for conventional applications.
0 Using object-oriented analysis modeling (Chapter 8), develop use-cases
and determine a count.
0 From the analysis model, determine the number of key classes (called
analysis classes in Chapter 8).
0 Categorize the type of interface for the application and develop a
multiplier for support classes:
0
0
0
0
0
Interface type
Multiplier
No GUI
2.0
Text-based user interface
2.25
GUI
2.5
Complex GUI
3.0
54
Estimation for OO
Projects-II
0 Multiply the number of key classes (step 3) by the
multiplier to obtain an estimate for the number of support
classes.
0 Multiply the total number of classes (key + support) by the
average number of work-units per class. Lorenz and Kidd
suggest 15 to 20 person-days per class.
0 Cross check the class-based estimate by multiplying the
average number of work-units per use-case
55
The Make-Buy Decision
56
Computing Expected Cost
expected cost =
(path probability) x (estimated path cost)
i
i
For example, the expected cost to build is:
expected cost
= 0.30 ($380K) + 0.70 ($450K)
build
= $429 K
similarly,
expected cost
= $382K
reuse
expected cost
= $267K
buy
expected cost
= $410K
contr
57
Why Are Projects Late?
0 an unrealistic deadline established by someone outside the software
0
0
0
0
0
0
0
development group
changing customer requirements that are not reflected in schedule
changes;
an honest underestimate of the amount of effort and/or the number of
resources that will be required to do the job;
predictable and/or unpredictable risks that were not considered when
the project commenced;
technical difficulties that could not have been foreseen in advance;
human difficulties that could not have been foreseen in advance;
miscommunication among project staff that results in delays;
a failure by project management to recognize that the project is falling
behind schedule and a lack of action to correct the problem
58
Effort and Delivery Time
Ef f ort
Cost
Ea = m ( t d 4 / t a 4 )
Imposs ible
region
Ea = ef f ort in pers on-months
t d = nominal deliv ery t ime f or s chedule
t o = optim al dev elopment time (in terms of c ost )
t a = ac tual deliv ery t ime des ired
Ed
Eo
td
to
dev elopment time
Tmin = 0.75T d
59
Scheduling Principles
• “front end” activities
40-50%
15-20%
–
–
–
–
customer communication
analysis
design
review and modification
• construction activities
– coding or code generation
• testing and installation
– unit, integration
– white-box, black box
– regression
30-40%
60
40-20-40 Distribution of Effort
0 A recommended distribution of effort across the software
process is 40% (analysis and design), 20% (coding), and 40%
(testing)
0 Work expended on project planning rarely accounts for more
than 2 - 3% of the total effort
0 Requirements analysis may comprise 10 - 25%
0 Effort spent on prototyping and project complexity may increase this
0 Software design normally needs 20 – 25%
0 Coding should need only 15 - 20% based on the effort applied to
software design
0 Testing and subsequent debugging can account for 30 - 40%
0 Safety or security-related software requires more time for testing
61
Basic Principles for
Project Scheduling
0 Compartmentalization
0 The project must be compartmentalized into a number of
manageable activities, actions, and tasks; both the product and
the process are decomposed
0 Interdependency
0 The interdependency of each compartmentalized activity,
action, or task must be determined
0 Some tasks must occur in sequence while others can occur in
parallel
0 Some actions or activities cannot commence until the work
product produced by another is available
62
Basic Principles for
Project Scheduling
0 Time allocation
0 Each task to be scheduled must be allocated some number of
work units
0 In addition, each task must be assigned a start date and a
completion date that are a function of the interdependencies
0 Start and stop dates are also established based on whether
work will be conducted on a full-time or part-time basis
0 Effort validation
0 Every project has a defined number of people on the team
0 As time allocation occurs, the project manager must ensure
that no more than the allocated number of people have been
scheduled at any given time
63
Basic Principles for
Project Scheduling
0 Defined responsibilities
0 Every task that is scheduled should be assigned to a specific
team member
0 Defined outcomes
0 Every task that is scheduled should have a defined outcome for
software projects such as a work product or part of a work
product
0 Work products are often combined in deliverables
0 Defined milestones
0 Every task or group of tasks should be associated with a
project milestone
0 A milestone is accomplished when one or more work products
has been reviewed for quality and has been approved
64
Relationship Between
People and Effort
0 Common management myth: If we fall behind schedule, we
can always add more programmers and catch up later in the
project
0 This practice actually has a disruptive effect and causes the
0
0
0
0
schedule to slip even further
The added people must learn the system
The people who teach them are the same people who were
earlier doing the work
During teaching, no work is being accomplished
Lines of communication (and the inherent delays) increase for
each new person added
65
Factors that Influence a
Project’s Schedule
0 Size of the project
0 Number of potential users
0 Mission criticality
0 Application longevity
0 Stability of requirements
0 Ease of customer/developer communication
0 Maturity of applicable technology
0 Performance constraints
0 Embedded and non-embedded characteristics
0 Project staff
0 Reengineering factors
66
Purpose of a Task Network
0 Also called an activity network
0 It is a graphic representation of the task flow for a project
0 It depicts task length, sequence, concurrency, and
dependency
0 Points out inter-task dependencies to help the manager
ensure continuous progress toward project completion
0 The critical path
0 A single path leading from start to finish in a task network
0 It contains the sequence of tasks that must be completed on
schedule if the project as a whole is to be completed on
schedule
0 It also determines the minimum duration of the project
67
Example Task Network
Task F
2
Task B
3
Task A
3
Task C
7
Task D
5
Task E
8
Task G
3
Task I
4
Task J
5
Task K
3
Task L
10
Task H
5
Task N
2
Task M
0
Where is the critical path and what tasks are on it?
68
Example Task Network
Task F
2
Task B
3
Task A
3
Task C
7
Task D
5
Task E
8
Task G
3
Task I
4
Task J
5
Task K
3
Task L
10
Task H
5
Task N
2
Task M
0
Critical path: A-B-C-E-K-L-M-N
69
70
Timeline Charts
Tasks
Week 1
Week 2
Week 3
Week 4
Week n
Task 1
Task 2
Task 3
Task 4
Task 5
Task 6
Task 7
Task 8
Task 9
Task 10
Task 11
Task 12
71
Use Automated Tools to
Derive a Timeline Chart
72
Example Timeline Charts
73
Proposed Tasks for a Long-Distance
Move of 8,000 lbs of Household Goods
Make
decision
to move
Drive truck
from origin
to destination
Unload
truck
Arrange for
workers to
load truck
Pack
household
goods
Arrange for
workers to
unload truck
Determine
date to move
out or move in
Decide on
type/size of
rental truck
Return
truck and
supplies
Reserve
rental truck
and supplies
Find lodging
with space
to park truck
Pick up
rental truck
Determine
destination
location
Make
lodging
reservations
Plan travel
route and
overnight stops
Load
truck
Get money
to pay for
the move
Lease or buy
home at
destination
Arrange for
person to
drive truck/car
• Where is the critical path and what tasks are on it?
• Given a firm start date, on what date will the project be completed?
• Given a firm stop date, when is the latest date that the project must start by? 74
2. Get money
to pay for
the move
3. Determine
date to move
out or move in
Proposed Tasks for a Long-Distance
Move of 8,000 lbs of Household Goods
12. Plan travel 13. Find lodging
route and
with space
overnight stops to park truck
4. Determine
destination
location
14. Make
lodging
reservations
5. Lease or buy
home at
destination
6. Decide on
type/size of
rental truck
7. Arrange for
workers to
load truck
8. Arrange for
person to
drive truck/car
9. Arrange for
workers to
unload truck
10. Pack
household
goods
18. Drive truck
from origin
to destination
11. Milestone
15. Reserve
rental truck
and supplies
16. Pick up
rental truck
17. Load
truck
19. Unload
truck
20. Return
truck and
supplies
• Where is the critical path and what tasks are on it?
• Given a firm start date, on what date will the project be completed?
• Given a firm stop date, when is the latest date that the project must75
start by?
Timeline Chart for Long Distance Move
76