Se 3
Se 3
W5HH
It is applicable regardless of size or complexity of software project
Terminologies
• Measure ➢Indirect Metrics
• It provides a quantitative indication of the ➢ Aspects that are not immediately quantifiable
extent (range), amount, dimension, capacity ➢ Ex., Functionality, Quantity, Reliability
or size of some attributes of a product or
process ➢Indicators
• Ex., the number of uncovered errors ➢ It is a metric or combination of metrics that
provides insight into the software process, project
• Metrics or the product itself
• It is a quantitative measure of the degree ➢ It enables the project manager or software
(limit) to which a system, component or engineers to adjust the process, the project or the
process possesses (obtain) a given attribute product to make things better
• It relates individual measures in some way ➢ Ex., Product Size (analysis and specification
• Ex., number of errors found per review metrics) is an indicator of increased coding,
• Direct Metrics integration and testing effort
• Immediately measurable attributes ➢Faults
• Ex., Line of Code (LOC), Execution Speed, ➢ Errors - Faults found by the practitioners during
Defects Reported software development
➢ Defects - Faults found by the customers after
release
Why Measure Software?
1 To determine (to define) quality of a product or process.
2 To predict qualities of a product or process.
3 To improve quality of a product or process.
Metric Classification Base
• Process
• Specifies activities related to production of software.
• Specifies the abstract set of activities that should be performed to go from user needs to final
product.
• Project
• Software development work in which a software process is used
• The actual act of executing the activities for some specific user needs
• Product
• The outcomes of a software project
• All the outputs that are produced while the activities are being executed
Process Metrics We measure the effectiveness of a process
• Process Metrics are an invaluable tool for by deriving a set of metrics based on
companies to monitor, evaluate and improve outcomes of the process such as,
their operational performance across the
enterprise
Errors uncovered before release of the software
• They are used for making strategic decisions
• Process Metrics are collected across all Defects delivered to and reported by the end users
projects and over long periods of time Work products delivered
• Their intent is to provide a set of process
indicators that lead to long-term software Human effort expended
process improvement Calendar time expended
accomplish • Compute the total cost and effort for each function and each
each framework framework activity.
activity for each • Compare the resulting values to those obtained by way of the LOC
application and FP estimates
function • If both sets of estimates agree, then your numbers are highly reliable
• Otherwise, conduct further investigation and analysis concerning the
function and activity breakdown
Estimation with Use Cases
Developing an estimation approach with use Before use cases can be used for estimation,
cases is problematic for the following reasons: the level within the structural hierarchy is
• Use cases are described using many different established,
formats and styles—there is no standard form. the average length (in pages) of each use
case is determined,
• Use cases represent an external view (the
user’s view) of the software and can therefore the type of software (e.g., real-time,
be written at many different levels of business, engineering/scientific, WebApp,
abstraction embedded) is defined, and
a rough architecture for the system is
• Use cases do not address the complexity of the considered
functions and features that are described
Once these characteristics are established,
• Use cases can describe complex behavior (Ex.,
interactions) that involve many functions and empirical data may be used to establish the
features estimated number of LOC or FP per use
case (for each level of the hierarchy).
• Although a number of investigators have
considered use cases as an estimation input. Historical data are then used to compute the
effort required to develop the system.
Empirical Estimation Models
Source Lines of Code (SLOC)
Medium
Medium
Detached 50-300 Average Previous Experience, e.g. Utility Medium
KLOC Systems like Compilers, Database Systems,
editors etc.
Complex hardware &
Embedded Typically Large Project, Real Time Systems, Complex
Significant
Tight
Required
Over 300 interfaces, very little previous Experience. E.g. customer Interfaces
KLOC ATMs, Air Traffic Controls
COCOMO Model Basic COCOMO Model
The basic COCOMO model gives an approximate estimate of the project parameters
COCOMO (Constructive
Cost Estimation Model) The basic COCOMO estimation model is given by the following expressions
was proposed by 𝑬𝒇𝒇𝒐𝒓𝒕 = 𝑎1 + 𝐾𝐿𝑂𝐶 𝑎2
𝑃𝑀 𝑻𝒅𝒆𝒗 = 𝑏1 × 𝐸𝑓𝑓𝑜𝑟𝑡 𝑏2
𝑀𝑜𝑛𝑡ℎ𝑠
Boehm
• KLOC is the estimated size of the software product expressed in Kilo Lines of Code
• a1, a2, b1, b2 are constants for each category of software products,
According to Boehm, • Tdev is the estimated time to develop the software, expressed in months,
software cost estimation • Effort is the total effort required to develop the software product, expressed in
person months (PMs).
should be done through
three stages: Project a1 a2 b1 b2
Basic COCOMO Organic 2.4 1.05 2.5 0.38
Semidetached 3.0 1.12 2.5 0.35
Intermediate COCOMO
Embedded 3.6 1.20 2.5 0.32
Complete COCOMO
Basic COCOMO Model Cont.
• The effort estimation is expressed in units of person-months (PM)
• It is the area under the person-month plot (as shown in fig.)
• An effort of 100 PM
• does not imply that 100 persons should work for 1 month
• does not imply that 1 person should be employed for 100 months
• it denotes the area under the person-month curve (fig.)
• Every line of source text should be calculated as one LOC irrespective of the actual
number of instructions on that line
• If a single instruction spans several lines (say n lines), it is considered to be nLOC
• The values of a1, a2, b1, b2 for different categories of products (i.e. organic,
semidetached, and embedded) as given by Boehm
• He derived the expressions by examining historical data collected from a large number
of actual projects
Basic COCOMO Model Cont.
• Insight into the basic COCOMO model can be obtained by plotting the
estimated characteristics for different software sizes
• Fig.1 shows a plot of estimated effort versus product size
• From fig. we can observe that the effort is somewhat superlinear in the
size of the software product
• The effort required to develop a product increases very rapidly with
project size Fig. 1
• The development time versus the product size in KLOC is plotted in fig. 2
• From fig., it can be observed that the development time is a sublinear
function of the size of the product
• i.e. when the size of the product increases by two times, the time to
develop the product does not double but rises moderately
Fig. 2
• From fig., it can be observed that the development time is roughly the
same for all the three categories of products
Basic COCOMO Model Cont.
• Effort and the duration estimations obtained using the COCOMO model are called
as nominal effort estimate and nominal duration estimate
• The term nominal implies that
• if anyone tries to complete the project in a time shorter than the estimated duration, then
the cost will increase drastically
• But, if anyone completes the project over a longer period of time than the estimated, then
there is almost no decrease in the estimated cost value
Example: Assume that the size of an organic type software product has been estimated to be 32,000 lines of
source code. Assume that the average salary of software engineers be Rs. 15,000/- per month. Determine the
effort required to develop the software product and the nominal development time
𝑬𝒇𝒇𝒐𝒓𝒕 = 𝑎1 + 𝐾𝐿𝑂𝐶 𝑎2 𝑃𝑀 𝑻𝒅𝒆𝒗 = 𝑏1 × 𝐸𝑓𝑓𝑜𝑟𝑡 𝑏2 𝑀𝑜𝑛𝑡ℎ𝑠
= 2.4 + 32 1.05 𝑃𝑀 = 2.5 × 91 0.38 𝑀𝑜𝑛𝑡ℎ𝑠
= 91 𝑃𝑀 = 14 𝑀𝑜𝑛𝑡ℎ𝑠
Cost required to develop the product = 14 x 15000 = Rs. 2,10,000/-
Intermediate COCOMO model
• The basic COCOMO model assumes that effort and development time are functions of
the product size alone
• However, a host of other project parameters besides the product size affect the effort
required to develop the product as well as the development time
• Therefore, in order to obtain an accurate estimation of the effort and project duration,
the effect of all relevant parameters must be taken into account
• The intermediate COCOMO model recognizes this fact and refines the initial estimate
obtained using the basic COCOMO expressions by using a set of 15 cost drivers
(multipliers) based on various attributes of software development
• For example, if modern programming practices are used, the initial estimates are scaled downward
by multiplication with a cost driver having a value less than 1
• It is requires the project manager to rate these 15 different parameters for a particular
project on a scale of one to three.
• Then, depending on these ratings, appropriate cost driver values which should be
multiplied with the initial estimate obtained using the basic COCOMO.
Intermediate COCOMO model Cont.
The cost drivers can be classified as being attributes of the following items
• Product: The characteristics of the product that are considered include the
inherent complexity of the product, reliability requirements of the product, etc.
• Computer: Characteristics of the computer that are considered include the
execution speed required, storage space required etc.
• Personnel: The attributes of development personnel that are considered include
the experience level of personnel, programming capability, analysis capability, etc.
• Development Environment: Development environment attributes capture the
development facilities available to the developers. An important parameter that is
considered is the sophistication of the automation (CASE) tools used for software
development
Complete COCOMO model
• A major shortcoming of both the basic and intermediate COCOMO models is that
they consider a software product as a single homogeneous entity
• Most large systems are made up several smaller sub-systems
• These sub-systems may have widely different characteristics
• E.g., some sub-systems may be considered as organic type, some semidetached, and some
embedded
• Also for some subsystems the reliability requirements may be high, for some the
development team might have no previous experience of similar development etc.
• The complete COCOMO model considers these differences in characteristics of
the subsystems and estimates the effort and development time as the sum of the
estimates for the individual subsystems
• The cost of each subsystem is estimated separately
• This approach reduces the margin of error in the final estimate
Project Scheduling & Tracking
It is an action that distributes estimated effort across the planned project duration, by
allocating the effort to specific software engineering tasks
Scheduling Principles
Where activities
overlap with other
activities, and by how
much
The risk may or may not happen, If the risk becomes a reality
so there are no 100% risks (some and unwanted consequences or
of those may called constraints) losses occur
Risk Categorization: Approach-1
• Project risks Sub-categories of Business risks
• They threaten the project plan Market risk
• If they become real, it is likely that Building an excellent product or system that no one
the project schedule will slip and really wants
that costs will increase Strategic risk
• Technical risks Building a product that no longer fits into the overall
• They threaten the quality and business strategy for the company
timeliness of the software to be Sales risk
produced Building a product that the sales force doesn't
• If they become real, implementation understand how to sell
may become difficult or impossible
Management risk
• Business risks Losing the support of senior management due to a
• They threaten the feasibility of the change in focus or a change in people
software to be built
Budget risk
• If they become real, they threaten the
Losing budgetary or personnel commitment
project or the product
Risk Categorization: Approach-2
• Known risks
• Those risks that can be uncovered after careful evaluation of
o the project plan, the business and technical environment in which the project is being developed, and other
reliable information sources (Ex. unrealistic delivery date)
• Predictable risks
• Those risks that are deduced (draw conclusion) from past project experience (Ex. past turnover)
• Unpredictable risks
• Those risks that can and do occur, but are extremely difficult to identify in advance
• pradyuman.jadeja@darshan.ac.in
• 91-9879461848