Software Engineering (All You Need To Know)
Software Engineering (All You Need To Know)
Management
(Introduction of
Software Engineering
and management
terms)
1
What is Software
Engineering?
Engineering approach to
develop software.
Building Construction Analogy.
Systematic collection of past
experience:
techniques,
methodologies,
guidelines.
3
Engineering Practice
Heavy use of past experience:
Past experience is systematically
arranged.
Theoretical basis and
quantitative techniques provided.
Many are just thumb rules.
Tradeoff between alternatives
Pragmatic approach to cost-
effectiveness 4
Why Study Software Engineering? (1)
5
Why Study Software Engineering? (2)
To acquire skills to be
a better programmer:
Higher Productivity
Better Quality Programs
7
Software Crisis
Software products:
fail to meet user
requirements.
frequently crash.
expensive.
difficult to alter, debug, and
enhance.
often delivered late.
use resources non-optimally.
8
Factors Contributing to the
Software Crisis
Larger problems,
Lack of adequate training in
software engineering,
Increasing skill shortage,
Low productivity
improvements.
9
Software
Software Myths
Myths
(Management
(Management Perspectives)
Perspectives)
As long as there are good standards and clear
procedures in my company, I shouldn’t be too
concerned.
But the proof of the pudding
is in the eating;
not in the Recipe !
Software
Software Myths
Myths
(Management
(Management Perspectives)
Perspectives)
As long as my software engineers(!) have
access to the fastest and the most sophisticated
computer environments and state-of-the-art
software tools, I shouldn’t be too concerned.
The environment is
only one of the several factors
that determine the quality
of the end software product!
Software
Software Myths
Myths
(Management
(Management Perspectives)
Perspectives)
When my schedule slips, what I have to do
is to start a fire-fighting operation: add more
software specialists, those with higher skills
and longer experience - they will bring the
schedule back on the rails!
Unfortunately,
software business does not
entertain schedule compaction
beyond a limit!
Software
Software Myths
Myths
(Customer
(Customer Perspectives)
Perspectives)
A general statement of objectives is
sufficient to get started with the
development of software. Missing/vague
requirements can easily be
incorporated/detailed out as they get
concretized.
Application requirements can never be
stable; software can be and has to be made
flexible enough to allow changes to be
incorporated as they happen.
Software
Software Myths
Myths
(Developer
(Developer Perspectives)
Perspectives)
Once the software is demonstrated, the job
is done.
manuals
manuals
object
object plans
plans
codes
codes
data
data
test test
testresults
results
testsuites
suites prototypes
prototypes
Boehm’s
Boehm’s Top
Top Ten
Ten
Industrial
Industrial Software
Software Metrics
Metrics
Finding and fixing a software problem
15
Effort
Effortto
toRepair
RepairSoftware
Software 10
(when
(when defects aredetected
defects are detected
at different stages)
at different stages) 5
5
2
0.5 1
0 0.15
Maintenance
Acc. Test
Unit test
Reqmts
Coding
Design
Boehm’s
Boehm’s Top
Top Ten
Ten
Industrial
Industrial Software
Software Metrics
Metrics
2
Nominal software development
schedules can be compressed up to
25% (by adding people, money, etc.)
but no more.
4
Development and maintenance costs
are primarily a function of the size.
5Variations in humans
account for the greatest
variations in productivity.
6
The ratio of software to
hardware costs has gone from
15:85 in 1985 and continues to
grow in favor of software as the
dominant cost.
Boehm’s
Boehm’s Top
Top Ten
Ten
Industrial
Industrial Software
Software Metrics
Metrics
8
Applications products cost three
times as much per instruction as
individual programs; system
software products cost nine times
as much.
10
25 5
45
Testing 15 40
20 30
Coding
15
Design 45
30
20
Analysis
Traditional Structured CASE environment
environment techniques
walkthru
unit test
evaluation
10 5 10 integration
other
10
65
Boehm’s
Boehm’s Top
Top Ten
Ten
Industrial
Industrial Software
Software Metrics
Metrics
20% 80%
tools use
Symptom of Software Crisis
about US$250 billion spent per year in the
US on application development
of this, about US$140 billion wasted due to
the projects getting abandoned or
reworked; this in turn because of not
following best practices and standards
10% of client/server apps are abandoned or restarted
from scratch
20% of apps are significantly altered to avoid disaster
40% of apps are delivered significantly late
27
Computer Systems Engineering
(CONT.)
28
Emergence of Software Engineering
Early Computer Programming (1950s):
Programs were being written in assembly language.
Programs were limited to about a few hundreds of
lines of assembly code.
Every programmer developed his own style of writing programs:
according to his intuition (exploratory programming).
(Early 60s)
High-level languages such as FORTRAN, ALGOL, and
COBOL were introduced:
This reduced software development efforts greatly.
Software development style was still exploratory.
Typical program sizes were limited to a few thousands
of lines of source code.
29
Control Flow-Based Design (late 60s)
31
Structured Programming
A program is called structured
when it uses only the following types of constructs:
sequence,
selection,
iteration
Unstructured control flows are avoided.
Consist of a neat set of modules.
Use single-entry, single-exit program constructs.
Structured programs are:
Easier to read and understand,
easier to maintain,
require less effort and time for development.
33
Data Structure-Oriented Design
(Early 70s)
Data flow-based
Data structure-
based
Control flow-
based
Ad hoc
37
Evolution of Other Software
Engineering Techniques
The improvements to the software design methodologies
are indeed very conspicuous.
In additions to the software design techniques:
several other techniques evolved.
life cycle models,
specification techniques,
project management techniques,
testing techniques,
debugging techniques,
quality assurance techniques,
software measurement techniques,
CASE tools, etc.
38
Differences Between the Exploratory Style and
Modern Software Development Practices
Use of Life Cycle Models
Software is developed through several well-defined
stages:
requirements analysis and specification,
design,
coding,
testing, etc.
Emphasis has shifted
from error correction to error prevention.
Modern practices emphasize:
detection of errors as close to their point of
introduction as possible.
In exploratory style,
errors are detected only during testing,
Now,
focus is on detecting as many errors as possible in
each phase of development.
39
Differences Between the Exploratory Style and Modern
Software Development Practices (CONT.)
During all stages of development process:
Periodic reviews are being carried out
Software testing has become systematic:
standard testing techniques are available.
A lot of effort and attention is now being paid to:
requirements specification.
Also, now there is a distinct design phase:
standard design techniques are being used.
There is better visibility of design and code:
visibility means production of good quality, consistent
and standard documents.
In the past, very little attention was being given to
producing good quality and consistent documents.
We will see later that increased visibility makes
software project management easier.
40
Differences between the exploratory style and modern
software development practices (CONT.)
41
Software Life Cycle
Software life cycle (or software process):
series of identifiable stages that a software
product undergoes during its life time:
Feasibility study
requirements analysis and specification,
design,
coding,
testing
maintenance.
Common Symptoms of Failed Software Development Projects
Inaccurate understanding of end-user-needs
Inability to deal with changing requirements
Modules that do not fit together
Software that is too hard to maintain or extend
Late discovery of serious flaws
Poor software quality
Unacceptable software performance
42
Some Root Causes for Failure
Ad hoc requirements management
Ambiguous and imprecise communication
Brittle software architectures
Overwhelming complexity
Undetected inconsistencies in requirements, design and
implementations
Insufficient testing
Subjective project status assessment
Failure to attack risk
uncontrolled change propagation
Insufficient use of automation tools
Misplaced Assumptions
All requirements can be pre specified.
Users are expert at specification of their needs.
Users and developers are both good at visualization.
The project team is capable of unambiguous
communication.
Ref: Larry Vaughn
43
43
Life Cycle Model
A software life cycle model (or process model):
a descriptive and diagrammatic model of software life cycle:
identifies all the activities required for product development,
establishes a precedence ordering among the different activities,
Divides life cycle into phases.
45
Life Cycle Model (CONT.)
These slides are designed and adapted from slides provided by Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill
2009) by Roger Pressman.
48
Social Learning Process
Software is embodied knowledge that is initially dispersed,
tacit and incomplete.
50
A Generic Process Model
As we discussed before, a generic
process framework for software
engineering defines five framework
activities-communication, planning,
modeling, construction, and
deployment.
In addition, a set of umbrella activities-
project tracking and control, risk
management, quality assurance,
configuration management, technical
reviews, and others are applied
throughout the process.
Next question is: how the framework
activities and the actions and tasks
that occur within each activity are
organized with respect to sequence
and time? See the process flow for
answer. A Generic Process Model
51
Process Flow
Linear process flow executes
each of the five activities in
sequence.
An iterative process flow
repeats one or more of the
activities before proceeding to
the next.
An evolutionary process flow
executes the activities in a
circular manner. Each circuit
leads to a more complete
version of the software.
A parallel process flow executes
one or more activities in parallel
with other activities ( modeling
for one aspect of the software
in parallel with construction of
another aspect of the software. 52
Identifying a Task Set
Before you can proceed with the process model, a key
question: what actions are appropriate for a framework
activity given the nature of the problem, the characteristics
of the people and the stakeholders?
A task set defines the actual work to be done to accomplish
the objectives of a software engineering action.
A list of the task to be accomplished
A list of the work products to be produced
A list of the quality assurance filters to be applied
For example, a small software project requested by one
person with simple requirements, the communication
activity might encompass little more than a phone all with
the stakeholder. Therefore, the only necessary action is
phone conversation, the work tasks of this action are:
1. Make contact with stakeholder via telephone.
2. Discuss requirements and take notes.
3. Organize notes into a brief written statement of
requirements.
4. E-mail to stakeholder for review and approval. 53
Example of a Task Set for Elicitation
The task sets for Requirements gathering
action for a simple project may include:
1. Make a list of stakeholders for the project.
2. Invite all stakeholders to an informal
meeting.
3. Ask each stakeholder to make a list of
features and functions required.
4. Discuss requirements and build a final list.
5. Prioritize requirements.
6. Note areas of uncertainty.
54
Prescriptive Models
Originally proposed to bring order to chaos.
Prescriptive process models advocate an orderly approach to
software engineering. However, will some extent of chaos (less
rigid) be beneficial to bring some creativity?
55
The Waterfall Model
56
The V-Model
A variation of waterfall model
depicts the relationship of
quality assurance actions to
the actions associated with
communication, modeling
and early code construction
activates.
58
Evolutionary Models
Software system evolves over time as requirements often
change as development proceeds. Thus, a straight line to a
complete end product is not possible. However, a limited
version must be delivered to meet competitive pressure.
Usually a set of core product or system requirements is well
understood, but the details and extension have yet to be
defined.
You need a process model that has been explicitly designed
to accommodate a product that evolved over time.
It is iterative that enables you to develop increasingly more
complete version of the software.
Two types are introduced, namely Prototyping and Spiral
models. Quick
plan
communication
Modeling
Quick design
Deployment Constructi
delivery & on Construction
feedback of of prototype
prototype
59
Evolutionary Models: Prototyping
When to use: Customer defines a set of general objectives but does not
identify detailed requirements for functions and features. Or Developer may
be unsure of the efficiency of an algorithm, the form that human computer
interaction should take.
What step: Begins with communication by meeting with stakeholders to
define the objective, identify whatever requirements are known, outline
areas where further definition is mandatory. A quick plan for prototyping and
modeling (quick design) occur. Quick design focuses on a representation of
those aspects the software that will be visible to end users. ( interface and
output). Design leads to the construction of a prototype which will be
deployed and evaluated. Stakeholder’s comments will be used to refine
requirements .
Both stakeholders and software engineers like the prototyping paradigm.
Users get a feel for the actual system, and developers get to build something
immediately. However, engineers may make compromises in order to get a
prototype working quickly. The less-than-ideal choice may be adopted
forever after you get used to it.
60
Evolutionary Models: The Spiral
It couples the iterative nature of prototyping with the controlled and
systematic aspects of the waterfall model and is a risk-driven
process model generator that is used to guide multi-stakeholder
concurrent engineering of software intensive systems.
Two main distinguishing features: one is cyclic approach for
incrementally growing a system’s degree of definition and
implementation while decreasing its degree of risk. The other is a
set of anchor point milestones for ensuring stakeholder
commitment to feasible and mutually satisfactory system solutions.
A series of evolutionary releases are delivered. During the early
iterations, the release might be a model or prototype. During later
iterations, increasingly more complete version of the engineered
system are produced.
The first circuit in the clockwise direction might result in the product
specification; subsequent passes around the spiral might be used to
develop a prototype and then progressively more sophisticated
versions of the software. Each pass results in adjustments to the
project plan. Cost and schedule are adjusted based on feedback.
Also, the number of iterations will be adjusted by project manager.
Good to develop large-scale system as software evolves as the
process progresses and risk should be understood and properly
reacted to. Prototyping is used to reduce risk.
However, it may be difficult to convince customers that it is
controllable as it demands considerable risk assessment expertise.
61
Concurrent Model
Allow a software team to represent iterative and concurrent
elements of any of the process models. For example, the
modeling activity defined for the spiral model is accomplished
by invoking one or more of the following actions: prototyping,
analysis and design.
The Figure shows modeling may be in any one of the states at
any given time. For example, communication activity has
completed its first iteration and in the awaiting changes state.
The modeling activity was in inactive state, now makes a
transition into the under development state. If customer
indicates changes in requirements, the modeling activity
moves from the under development state into the awaiting
changes state.
Concurrent modeling is applicable to all types of software
development and provides an accurate picture of the current
state of a project. Rather than confining software engineering
activities, actions and tasks to a sequence of events, it defines
a process network. Each activity, action or task on the
network exists simultaneously with other activities, actions or
tasks. Events generated at one point trigger transitions among
the states.
62
Still Other Process Models
Component based development—the process to apply
when reuse is a development objective ( like spiral model)
Formal methods—emphasizes the mathematical
specification of requirements ( easy to discover and
eliminate ambiguity, incompleteness and inconsistency)
Aspect Oriented software development (AOSD)—provides a
process and methodological approach for defining,
specifying, designing, and constructing aspects
Unified Process—a “use-case driven, architecture-centric,
iterative and incremental” software process closely aligned
with the Unified Modeling Language (UML) to model and
develop object-oriented system iteratively and
incrementally.
63
The Unified Process (UP)
elaboration UP Phases
inception
UP Work Products