Professional Documents
Culture Documents
SE Notes
SE Notes
1 Introduction
(Software Engineering Process Paradigms, Process Models – Incremental and Evolutionary Models)
Break down
after size of
program
increases
beyond
certain
value.
Structural Programming:
• No GOTO or JUMP statements – control structure becomes messy
• Only 3 programming constructs: sequence, selection, iteration
• A program is called structure when it uses only these 3 types of constructs and is modular
• Modular program - decomposed into a set of modules with low interdependency among each other
• Advantage: less error-prone, more readable, easier to maintain, less effort to develop
Data Structure Oriented Design:
• ICs can be used to solve more complex problems
• First a program’s data structures are designed using notations for sequence, selection, iteration
• The code structure is designed based on the data structure
6. Maintenance:
• Effort required more than the total effort of the development phases (Refer figure on pg. 4)
• Maintenance is required in the following three types of situations:
o Corrective maintenance: carried out to correct errors that were not discovered during the
product development phase
o Perfective maintenance: carried out to improve the performance of the system, or to
enhance the functionalities of the system based on customer’s requests
o Adaptive maintenance: required for porting the software to work in a new environment
(new computer platform or OS)
Shortcomings of the Classical Waterfall Model:
• No feedback paths – it is a sequential model
• Difficult to accommodate change requests
• Inefficient error corrections
• No overlapping of phases
Phase Overlap:
• Errors detected in later stages need to be corrected by reworking a previous phase
• Team members who complete their part of the work earlier than others may start working for the
next phase instead of sitting idle (blocking state) while others are working on the previous phase
Prototyping Model:
• Before development of the actual software, a working prototype of the system is built
• Prototype has limited functional capabilities, low reliability or inefficient performance
• Built using several shortcuts, it has inefficient, inaccurate or dummy functions
Advantages:
• Error reduction
• Incremental resource deployment
Evolutionary Model:
• Developed over a number of increments (riskier issues first)
• In incremental model, requirements gathered and SRS prepared initially only
• In evolutionary model, the requirements, plan, estimates and solution evolve over iterations
• Design a little - build a little - test a little - deploy a little model
Advantages:
• Effective elicitation of actual customer requirements
• Easy handling change requests
Disadvantages:
• Feature division into incremental parts can be non-trivial
• Ad-hoc design
Applicability of the Evolutionary Model:
• Easy to find modules for incremental implementation
• Customer prefers to receive product in increments to start using the features than waiting
• Projects using object-oriented development – easy to partition into standalone units (classes)
Working of RAD:
• Plans are made for one increment at a time, time planned is called time box
• During each time box, a quick & dirty prototype style software for some functionality is developed
• Customer evaluates and based on feedback, the prototype is refined but prototype is not released
to the customer for regular use
• Development team (5-6 members) has a customer representative to bridge the gap
Spiral Model:
• Number of loops can vary, each loop called a phase of the software process
• Project manager decides no. of phases depending on the project risks
• Spiral model can handle unforeseen risks that can show up much after project has started
• As opposed to prototyping model, here a prototype is made at the start of every phase, hence the
risk handling capabilities
• Radius of spiral represents cost incurred and angular dimension represents progress so far
• Each loop represents the waterfall model
Note: Read “A COMPARISON OF DIFFERENT LIFE CYCLE MODELS” from Rajib Mall
1.2 Introduction
(Typical Application of each model, Agile methodology, Process and Project Metrics)
Agility Principles:
1. Our highest priority is to satisfy the customer through early & continuous delivery of valuable
software.
2. Welcome changing requirements, even late in development. Agile processes harness change for the
customer’s competitive advantage.
3. Deliver working software frequently, from a couple of weeks to a couple of months, with a
preference to the shorter timescale.
4. Business people and developers must work together daily throughout the project.
5. Build projects around motivated individuals. Give them the environment and support they need,
and trust them to get the job done.
6. The most efficient and effective method of conveying information to and within a development
team is face-to-face conversation.
7. Working software is the primary measure of progress.
8. Agile processes promote sustainable development. The sponsors, developers, and users should be
able to maintain a constant pace indefinitely
9. Continuous attention to technical excellence and good design enhances agility.
10. Simplicity—the art of maximizing the amount of work not done—is essential.
11. The best architectures, requirements, and designs emerge from self– organizing teams.
12. At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its
behavior accordingly.
Scrum Model:
• Scrum principles are consistent with the agile manifesto and are used to guide development
activities within a process that incorporates the following framework activities:
o Requirements
o Analysis
o Design
o Evolution
o Delivery
• Within each framework activity, work tasks occur within a process pattern called sprint
• Work conducted within a sprint is
adapted to the problem at hand and
modified by the Scrum team
• No. of sprints for each activity varies as
per the product complexity & time
• Process patterns:
o Backlog
o Sprints
o Scrum meetings
o Demos
• Refer these process patterns from the
figure
Software Project Management:
Responsibilities of a Software Project Manager:
• Steering a project to success
• Ranges from invisible activities like building up team morale to highly visible customer
presentations
• Project proposal, writing, project cost estimation, scheduling, project staffing, software process
tailoring, project monitoring and control, software configuration management, risk management,
managerial report writing and presentation, and interfacing with clients
• 2 major types: Project planning & Project
monitoring and control
Project Planning:
• Undertaken and completed between feasibility
study & requirement analysis & specification
phases
• Planning project activities based on these estimates
• Initial plans are revised as the project progresses and gets more data
• All estimations and project plans are made on the basis of size (most fundamental parameter)
• If care not taken may result in schedule slippage causing customer dissatisfaction or project failure
o Estimation: estimate cost, duration and effort required to develop the product
o Scheduling: schedules for manpower and other resources are developed
o Staffing: staff organization and staffing plans are made
o Risk Management: risk identification, analysis and abatement planning
o Misc. Plans: quality assurance plan, configuration management plan
Approach:
• Using historical data or intuition, the planner estimates an optimistic (Sopt), most likely (Sm) and
pessimistic (Spess) value or count for each information domain value
• LOC S = (Sopt + 4Sm + Spess)/6
• From historical data, we have average productivity for the system of the project type, cost for a
person-month (a) and cost per line of the code (b)
• Effort = LOC/Productivity & Cost = LOC * b
Shortcomings of LOC:
• LOC is a measure of coding activity alone
• LOC count depends on the choice of specific instructions
• LOC measure correlates poorly with the quality and efficiency of the code
• LOC metric penalties use of higher-level programming languages and code reuse
• LOC metric measures the lexical complexity of a program and does not address the more important
issues of logical and structural complexities
• It is very difficult to accurately estimate LOC of the final program from problem specification
FP Metric Computation:
• Step 1: Compute the unadjusted function point
(UFP) using heuristic expression
• Step 2: Refine UFP to reflect the actual complexities
of different parameters used in Step 1
• Step 3: Compute FP by further refining UFP to
account for the specific characteristics of the project
that can influence the entire development effort
Shortcomings of FP:
• Does not take algorithmic complexity of a function into account
2.1 System Analysis
(System Requirement, Stakeholders, Techniques for information gathering, Validating the requirements)
Requirements Gathering:
• To collect requirements from the stakeholders
• A stakeholder is a source of requirements and is usually a person or group of persons who directly
or indirectly are concerned with the software
• Usually even before visiting the customer, requirement gathering starts by studying the existing
documents to collect all possible information about the system to be developed
Requirements Analysis:
• What is the problem?
• Why is it important to solve the problem?
• What exactly are the data input and output to and by the system?
• What are the likely complexities that might arise while solving the problem?
• If there are external software or hardware with which the developed software has to interact, then
what should be the data interchange formats with the external systems?
• Problems to solve:
o Anomaly: several interpretations of a requirement are possible, ambiguity
o Inconsistency: one requirement contradicts the other
o Incompleteness: some requirements have been overlooked
Software Requirements Specification (SRS):
Stakeholders:
• Senior managers
• Project (technical) managers
• Practitioners
• Customers
• End users
Users of SRS:
• Users, customers and marketing personnel
• Software developers
• Test engineers
• User documentation writers
• Project managers
• Maintenance engineers
Why SRS?
• Forms an agreement between customers and developers
• Reduces future reworks
• Provides a basis for estimating costs and schedules
• Provides a baseline for validation and verification
• Facilitates future extensions
Functional Requirements:
• Captures functionalities required by the users from the system
• Software offers a set of functions {fi} such that each f : I -> O
• Meaning it transforms an element ii in input domain I to value oi in output O
• Must clearly describe each functionality that the system would support
Non-Functional Requirements:
• Out of the various non-functional requirements, the external interfaces and the design and
implementation constraints should be documented in two different section
• The remaining non-functional requirements should be documented later in a section and these
should include the performance and security requirements
o Design & Implementation Constraints: describe any items or issues that will limit the
options available to the developers
o External Interfaces Required: hardware, software and communication interfaces, user
interfaces, report formats, etc
o Other Non-Functional Requirements: non-functional requirements that are neither design
constraints nor external interface requirements. Like reliability issues, accuracy of results,
security issues, performance requirements
Goals of Implementation:
• Not checked by the customer for conformance at the time of acceptance testing
• Issues such as easier revisions to the system functionalities, easier support for new devices, etc
Decision Tree:
• Edges of the decision tree represent conditions
• Leaf nodes represent actions to be performed
• Gives graphic view of logic involved in decision making and
corresponding actions taken
Decision Table:
• Shows the decision-making logic and the corresponding actions
taken in a tabular or a matrix form
• Upper rows specify the variables or conditions to be evaluated
• Lower rows specify the actions to be taken when an evaluation test
is satisfied
• A column in the table is called a rule
• A rule implies that if a certain condition combination is true, then the corresponding action is
executed
Understandability of a Design:
• It should assign consistent and meaningful names to various design components
• It should make use of principles of decomposition and abstraction to simplify the design
• A design solution should be modular and layered to be understandable
Modularity:
• Modular design: problem decomposed into a set of modules having limited interaction with each
other (dive and conquer principle)
• Basic characteristic of any good design – each module can be understood separately
• A design solution is highly modular if different modules have high cohesion and inter-module
coupling is low
Layered Design:
• Layered Design: when the call relations among different modules are represented graphically, it
would result in a tree-like diagram with clear layering
• Modules are arranged in a hierarchy of layers
• A module can only invoke functions of the module in the layer immediately below it
• Higher layer modules invoke the lower layer modules to get certain tasks done
• Implements complete abstraction: lower layer cant invoke higher or same level layer
• Simple debugging: lower layers may be possible sources of errors detected
Functional Independence:
• A module that is highly cohesive and also has low coupling with other modules is said to be
functionally independent of the other modules
• Advantages:
o Error isolation:
§ Functional independence reduces the chances of the error propagating to other
modules
§ Makes it very easy to locate the error
o Scope of use:
§ Reuse of a module for the development of other applications becomes easier
o Understandability:
§ When modules are functionally independent, complexity of the design is greatly
reduced
Classification of Cohesiveness:
• Cohesiveness is the degree to which the different functions of the module co-operate to work
towards a single objective
• Different modules can possess different degrees of freedom
• A module is said to possess that particular cohesion if
Coincidental Logical Temporal Procedural Communicational Sequential Functional
it performs all a module the set of all functions of the different
a set of elements contains functions of the the module refer different functions
tasks that of the functions module are to or update the functions of of the
relate to module that are executed one same data the module module
each other perform related by after the other, structure execute in a co-
very loosely, similar the fact though these sequence, operate
if at all operations, that these functions may and the to
such as functions work towards output from complete
error are entirely 1 function is a single
handling, executed different input to the task
data input, in the purposes and next in the
output, etc same operate on very sequence
time span different data
• If you need a compound sequence to describe the functionality of the module, then it has
sequential or communicational cohesion
• If you need words such as “first”, “next”, “after”, “then”, etc then it possesses sequential or
temporal cohesion
• If it needs words such as “initialize”, “setup”, “shut down”, etc to define its functionality, then it has
temporal cohesion
Classification of Coupling:
• The coupling between two modules indicated the degree of interdependence between them
• If two modules interchange a large amount of data, they are highly interdependent or coupled
• The degree of coupling between two modules depends on their interface complexity
• Two modules are said to be couples if
Data Stamp Control Common Content
They communicate They communicate Data from one They share some They share code,
using an using a composite module is used to global data items i.e., a jump from
elementary data data item such as a direct the order of one module into
item that is passed record in PASCAL instruction the code of
as a parameter or a structure in C execution in another module
between the two another can occur
Function-Oriented Design:
• Salient features:
o Top-down decomposition:
§ System viewed as a black box providing certain services to the users of the system
§ Starting at a high-level view of the system, each high-level function is successively
refined into more detailed functions
o Centralized system state:
§ The values of certain data items that determine the response of the system to a user
action or external event
§ The system state is centralized and shared among different functions
Object-Oriented Design:
• Each object is associated with a set of functions called methods
• Each object contains its own data and is responsible for managing it
• Use of decomposition and abstraction principles
o Data abstraction:
§ Data abstraction principle implies that how data is exactly stored is abstracted away
§ The entities external to the object can access the data internal to an object only by
calling certain well-defined methods supported by the object
o Data structure:
§ It is constructed from a collection of primitive data items
o Data type:
§ A type is a programming language terminology that refers to anything that can be
instantiated
§ ADT are user defined types
• Advantages of using abstract data type (ADT):
o The data of objects are encapsulated within the methods (data hiding)
o The encapsulation principle requires that data can be accessed and manipulated only
through the methods supported by the object and not directly
o An ADT-based design displays high cohesion and low coupling
o Abstraction makes the design solution easily understandable and helps to manage
complexity
1. Expert Judgement:
• An expert makes an educated guess about the project size after analyzing the problem thoroughly
• Expert estimated the cost of different components that make up the system and then combines
them to get the overall estimate
• Shortcomings:
o Human errors
o Individual bias
o Some factors overlooked
o Expert may not have relevant experience and knowledge of all aspects of project
o Overly optimistic estimates
• When done by a group of factors, errors due to above factors is minimized
• But, the decision made by a group may be dominated by overly assertive/senior members
Heuristic Techniques:
• Heuristic estimation models are derived using regression analysis on data collected from past
software projects
• The overall structure of such models take the form E = A + B * (er)C
Where A, B, C are empirically derived constants. E is the effort in person-month and er is the
estimation variable (either LOC or FP)
• In addition to the general form, they have some project adjustment components that enable E to
be adjusted by other project characteristics like problem complexity, staff experience, development
environment, etc
• Based on the study different types of project, a rule of thumbs in the form of mathematical
expression
• The heuristic estimation models are also alternatively termed as algorithmic cost models
COCOMO:
• Stage 1: An initial estimate is arrived at (basic COCOMO)
• Stage 2 & 3: The initial estimate is refined to arrive at a more accurate estimate (intermediate and
complete COCOMO)
Person-Month (PM):
• One person-month is the effort an individual can typically put in a month
Estimation with Use Cases:
• Estimation with use cases is problematic for the following reasons:
o Use cases are described using many different formats and styles—there is no standard form.
o Use cases represent an external view (the user’s view) of the software and can therefore be
written at many different levels of abstraction.
o Use cases do not address the complexity of the functions and features that are described.
o Use cases can describe complex behavior (e.g., interactions) that involve many functions
and features.
• Use cases can be used for estimation only if they are considered within the context of the structural
hierarchy that they are used to describe
• Any level of structural hierarchy can be described by 10 use cases each having max 30 distinct
scenarios
4.2 SQA
(Risk Management Risk Identification, Risk Assessment, Risk Projection, RMMM)
Risk Management:
• A risk is an anticipated unfavorable event or circumstance that can occur while a project is
underway
• If a risk becomes real the anticipated problem becomes a reality and is no more a risk
• It can affect project and hamper the successful timely completion of the project
• Risk management aims at reducing the chances of a risk becoming real as well as reducing the
impact of risks that become real
• It consists of 3 essential activities: risk identification, risk assessment and risk mitigation
Risk Identification:
• Project Risks:
o Concern various forms of budgetary, schedule, personnel, resource and customer-related
problems
o Difficult to monitor and control is project is tangible
o The invisibility of the product being developed is an important reason why many software
projects suffer from the risk of schedule slippage
• Technical Risks:
o Concern potential design, implementation, interfacing, testing and maintenance problems
o Also include ambiguous specification, incomplete specification, changing specification,
technical uncertainty and technical obsolescence
o Mostly occur due to development team’s insufficient knowledge about the product
• Business Risks:
o Includes risk of building an excellent product that no one wants, losing budgetary
commitments, etc
• To successfully foresee and identify risks, make a complete disaster list containing all the bad
events that have happened to software projects of the company over the years including events
that can be laid at the customer’s door
Risk Assessment:
• Objective: to rank risks in terms of their damage causing potential
• Each risk must be rated in 2 ways:
o Likelihood of the risk becoming real (r = probability of risk becoming real)
o Consequence of the problems associated with that risk (s = severity of damage cause if real)
• Priority of risk p = r * s
Risk Mitigation:
• Find ways to either decrease the probability of the risk event happening or the impact of the event
happening
• Different types of risks require different containment procedures
• 3 strategies:
o Avoid the risk:
§ Risks often arise due to project constraints and can be avoided by suitably modifying
the constraints
§ Categories of constraints:
• Process-related risk: arise due to aggressive work schedule, budget, resource
utilization
• Product-related risk: arise due to commitment to challenging product
features, quality, reliability
• Technology-related risk: arise due to commitment to use certain technology
o Transfer the risk:
§ This strategy involves the risky components developed by a third party, buying
insurance cover, etc
o Risk reduction:
§ Involves planning ways to contain the damage due to a risk
§ For technical risks: build a prototype
• Project manager must consider the cost of handling and reduction of the risk
• Risk leverage = (risk exposure before reduction – risk exposure after reduction)/(cost of reduction)
SCM Scenario:
• Project manager in charge of a software group
• Configuration manager in charge of the CM process and policies
• Software engineers responsible for developing and maintaining the software product
• Customer who uses the product
• Assume that product is small, 15000 lines of code developed by a team of 6 people
• Project manager goal: to ensure that the product is developed within certain time frame
o Monitors the progress of development and recognizes and reacts to problems by generating
and analyzing reports about status of software system and performing reviews on them
• Configuration manager goal: to ensure the procedures & policies for creating, changing and testing
code are followed and to make project information accessible
o Introduces mechanisms for making official requests for approving changes, evaluating them
and authorizing changes for maintaining control over code
• Software engineers’ goal: to work effectively without interfering with each other in creation/testing
of code
o Communicate and coordinate by notifying each other about tasks required and completed
• Customer follows formal procedures for requesting changes for indicating bugs in the product
Baseline:
A baseline is a software configuration management concept
that helps you to control change without seriously impeding
justifiable change
SCIs:
• Organized to form configuration objects that may be
cataloged in the project database with a single name
• A configuration object has a name, attributes, and is “connected” to other objects by relationships
SCM Process:
• The software configuration management process defines a
series of tasks that have four primary objectives:
o to identify all items that collectively define the software
configuration
o to manage changes to one or more of these items
o to facilitate the construction of different versions of an
application
o to ensure that software quality is maintained as the
configuration evolves over time
Version Control:
• Combines procedures and tools to manage different versions of configuration objects that are
created during the software process
• 4 major capabilities:
o A project database that stores all relevant configuration objects
o A version management capability that stores all versions of a configuration object
o A make facility that enables you to collect all relevant configuration objects and construct a
specific version of the software
o Implement an issues tracking capability that enables the team to record and track the status
of all outstanding issues associated with configuration object
• Change set: a collection of all changes (to some baseline configuration) that are required to create a
specific version of the software
Change Control:
• A change request is submitted and evaluated to assess technical merit, potential side effects,
overall impact on other configuration objects and system functions, and the projected cost of the
change
• The results of the evaluation are presented as a change report, which is used by a change control
authority (CCA)—a person or group that makes a final decision on the status and priority of the
change
• An engineering change order (ECO) is generated for each approved change
• The ECO describes the change to be made, the constraints that must be respected, and the criteria
for review and audit
• For every change, version control mechanisms are applied
• These version control mechanisms, integrated within the change control process, implement two
important elements of change management
o Access control: governs which software engineers have the authority to access and modify a
particular configuration object
o Synchronization control: helps to ensure that parallel changes, performed by two different
people, don’t overwrite one another
Configuration Audit:
• How can a software team ensure that the change has been properly implemented?
o Technical review:
§ focuses on the technical correctness of the configuration object that has been
modified
§ The reviewers assess the SCI to determine consistency with other SCIs, omissions, or
potential side effects
o Software configuration audit:
§ Complements the technical review by assessing a configuration object for
characteristics that are generally not considered during review
• Audit answers the following questions:
1. Has the change specified in the ECO been made? Have any additional modifications been
incorporated?
2. Has a technical review been conducted to assess technical correctness?
3. Has the software process been followed and have software engineering
standards been properly applied?
4. Has the change been “highlighted” in the SCI? Have the change date and change author been
specified? Do the attributes of the configuration object reflect the change?
5. Have SCM procedures for noting the change, recording it, and reporting it been followed?
6. Have all related SCIs been properly updated?
Status Reporting:
• Configuration status reporting (CSR) or status accounting: an SCM task that answers the following
questions
o What happened?
o Who did it?
o When did it happen?
o What else will be affected?
4.4 SQA
(Quality Metrics)
Refer PPT