LECT1 Introduction
LECT1 Introduction
Engineering
1
Organization of this Lecture
● What is Software Engineering?
● Programs vs. Software Products
● Evolution of Software Engineering
● Notable Changes In Software
Development Practices
● Introduction to Life Cycle Models
● Summary
2
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
Technology Development
Pattern
Engineering
Esoteric Past
Experience
Technology
Craft
Systematic Use of Past
Experience and Scientific Basis
Unorganized Use of
Art Past Experience
Time
5
Evolution of an Art into an
Engineering Discipline
● The early programmers used an
exploratory (also called build and fix)
style.
– In the build and fix (exploratory) style,
normally a `dirty' program is quickly
developed.
– The different imperfections that are
subsequently noticed are fixed.
6
What is Wrong with the
Exploratory Style?
● Can successfully be used for very small
programs only.
Software
Exploratory Engineering
Effort, time,
Machine
cost
Program Size
7
What is Wrong with the
Exploratory Style? Cont…
● Besides the exponential growth of
effort, cost, and time with problem
size:
– Exploratory style usually results in
unmaintainable code.
– It becomes very difficult to use the
exploratory style in a team development
environment.
8
What is Wrong with the
Exploratory Style? Cont…
● Why does the effort required
to develop a product grow
exponentially with product size?
– Why does the approach
completely breaks down when the
product size becomes large?
9
Implication in Program
Development
● A small program having just a few
variables:
– Is within the easy grasp of an individual.
● As the number of independent variables
in the program increases:
– It quickly exceeds the grasping power of
an individual:
● Requires an unduly large effort to master the
problem.
10
Implication in Program
Development
● Instead of a human, if a machine could be
writing (generating) a program,
– The slope of the curve would be linear.
● But, why does the effort-size curve
become almost linear when software
engineering principles are deployed?
– Software engineering principles extensively use
techniques specifically to overcome the human
cognitive limitations.
11
Principles Deployed by Software
Engineering to Overcome Human
Cognitive Limitations
– Decomposition
12
Abstraction
● Simplify a problem by omitting unnecessary
details.
– Focus attention on only one aspect of the problem and
ignore irrelevant details.
● Suppose you are asked to develop an overall
understanding of some country.
– No one in his right mind would meet all the citizens of
the country, visit every house, and examine every tree
of the country, etc.
– You would possibly refer to various types of maps for
that country.
● A map, in fact, is an abstract representation of a
country.
13
Decomposition
● Decompose a problem into many small
independent parts.
– The small parts are then taken up one by
one and solved separately.
– The idea is that each small part would
be easy to grasp and can be easily
solved.
– The full problem is solved when all the
parts are solved.
14
Decomposition
● A popular way to demonstrate the
decomposition principle:
– Try to break a bunch of sticks tied
together versus breaking them individually.
● Example use of decomposition principle:
– You understand a book better when the
contents are organized into independent
chapters
– Compared to when everything is mixed up.
15
Why Study Software
Engineering? (1)
● To acquire skills to develop
large programs.
– Exponential growth in complexity
and difficulty level with size.
– Thead hoc approach breaks down
when size of software increases.
16
Why Study Software
Engineering? (2)
● Ability to solve complex
programming problems:
– How to break large projects into smaller
and manageable parts?
– How to use abstraction?
● To acquire skills to be a
better programmer:
● Higher Productivity
● Better Quality Programs
18
Software Crisis
● Software products:
– Failto meet user requirements.
– Frequently crash.
– Expensive.
– Difficult to alter, debug, and
enhance.
– Often delivered late.
– Use resources non-optimally.
19
Software Crisis (cont.)
Hw cost
Sw cost
1960 Year
2000
21
Programs versus Software
Products
● Usually small in size ● Large
● Author himself is sole ● Large number of
user users
● Single developer ● Team of developers
● Lacks proper user ● Well-designed
interface interface
Lacks proper ● Well documented &
user-manual prepared
●
documentation
Systematic
Ad hoc development.
●
●
development
22
Types of Software Projects
● Software products
● Outsourced projects
● Indian companies have focused
on outsourced projects.
23
Emergence of Software
Engineering
● Early Computer Programming
(1950s):
– Programswere being written in
assembly language.
– Programswere limited to about a
few hundreds of lines of assembly
code.
24
Early Computer Programming
(50s)
● Every programmer developed
his own style of writing
programs:
– According to his intuition
(exploratory programming).
25
High-Level Language
Programming (Early 60s)
● High-level languages such as
FORTRAN, ALGOL, and COBOL
were introduced:
– Thisreduced software
development efforts greatly.
26
High-Level Language
Programming (Early 60s)
● Software development style
was still exploratory.
– Typical program sizes were
limited to a few thousands of
lines of source code.
27
Control Flow-Based Design
(late 60s)
28
Control Flow-Based Design
(late 60s)
● Programmers found:
– programs written by others very
difficult to understand and maintain.
● To cope up with this problem,
experienced programmers advised:
-“Pay particular attention to the design
of the program's control structure.'’
29
Control Flow-Based Design (late 60s)
30
Control Flow-Based Design (late 60s)
31
Control Flow-Based Design
(Late 60s)
32
Control Flow-Based Design (Late 60s)
● It was found:
– GO TO statements makes control
structure of a program messy.
– GO TO statements alter the flow of
control arbitrarily.
– Theneed to restrict use of GO TO
statements was recognized.
33
Control Flow-Based Design (Late 60s)
34
Control-flow Based Design (Late 60s)
35
Control Flow-Based Design (Late 60s)
36
Control Flow-Based Design (Late 60s)
37
Control-flow Based Design (Late 60s)
● Everyone accepted:
– Itis possible to solve any
programming problem without
using GO TO statements.
– Thisformed the basis of
Structured Programming
methodology.
38
Structured Programming
● A program is called structured
– When it uses only the following
types of constructs:
● sequence,
● selection,
● iteration
39
Structured Programs
● Unstructured control flows are
avoided.
● Consist of a neat set of modules.
● Use single-entry, single-exit
program constructs.
40
Structured Programs
● However, violations to this
feature are permitted:
– Dueto practical considerations
such as:
● Premature loop exit to support
exception handling.
41
Structured programs
● Structured programs are:
– Easier to read and understand,
– Easier to maintain,
– Requireless effort and time for
development.
42
Structured Programming
● Research experience shows:
– Programmers commit less number
of errors:
● While using structured if-then-else
and do-while statements.
● Compared to test-and-branch
constructs.
43
Data Structure-Oriented
Design (Early 70s)
● Soon it was discovered:
– Itis important to pay more
attention to the design of data
structures of a program
● Than to the design of its control
structure.
44
Data Structure-Oriented
Design (Early 70s)
● Techniques which emphasize
designing the data structure:
– Derive program structure from it:
● Are called data structure-
oriented design
techniques.
45
Data Structure Oriented
Design (Early 70s)
● Example of data structure-
oriented design technique:
– Jackson's
Structured
Programming(JSP) methodology
● Developed by Michael Jackson in
1970s.
46
Data Structure Oriented
Design (Early 70s)
● JSP technique:
– Program code structure
should correspond to the
data structure.
47
Data Structure Oriented
Design (Early 70s)
● In JSP methodology:
–A program's data structures are
first designed using notations for
● sequence, selection, and iteration.
– Thendata structure design is
used :
● To derive the program structure.
48
Data Structure Oriented
Design (Early 70s)
● Several other data
structure-oriented
Methodologies also exist:
– e.g., Warnier-Orr
Methodology.
49
Data Flow-Oriented Design
(Late 70s)
50
Data Flow-Oriented Design (Late 70s)
● Data flow technique identifies:
– Different processing stations
(functions) in a system.
– Theitems (data) that flow
between processing stations.
51
Data Flow-Oriented Design (Late 70s)
53
Object-Oriented Design (80s)
● Object-oriented technique:
– Anintuitively appealing design
approach:
– Naturalobjects (such as employees,
pay-roll-register, etc.) occurring in
a problem are first identified.
54
Object-Oriented Design (80s)
55
Object-Oriented Design (80s)
● Object-Oriented Techniques
have gained wide acceptance:
– Simplicity
– Reuse possibilities
– Lower development time and cost
– More robust code
– Easy maintenance
56
Evolution of Design
Techniques
Object-Oriented
Data flow-based
Data structure-
based
Control flow-
based
Ad hoc
57
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.
58
Evolution of Other Software
Engineering Techniques
– life cycle models,
– specification techniques,
– project management techniques,
– testing techniques,
– debugging techniques,
– quality assurance techniques,
– software measurement techniques,
– CASE tools, etc.
59
Differences between the exploratory
style and modern software
development practices
61
Differences between the exploratory
style and modern software
development practices (CONT.)
● In exploratory style,
– errors are detected only
during testing,
● Now,
– focus is on detecting as many
errors as possible in each
phase of development.
62
Differences between the exploratory
style and modern software
development practices (CONT.)
● In exploratory style,
– coding
is synonymous with
program development.
● Now,
– codingis considered only a
small part of program
development effort.
63
Differences between the exploratory
style and modern software
development practices (CONT.)
● 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.
64
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.
65
Differences between the exploratory
style and modern software
development practices (CONT.)
● 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.
66
Differences between the exploratory
style and modern software
development practices (CONT.)
● Because of good documentation:
– fault diagnosis and maintenance are
smoother now.
● Several metrics are being used:
– help in software project management,
quality assurance, etc.
67
Differences between the exploratory
style and modern software
development practices (CONT.)
● Projects are being thoroughly
planned:
– estimation,
– scheduling,
– monitoring mechanisms.
● Use of CASE tools.
68
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. 69
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.
70
Life Cycle Model (CONT.)
71
Why Model Life Cycle ?
● A written description:
– Forms a common understanding of
activities among the software
developers.
– Helps in identifying inconsistencies,
redundancies, and omissions in the
development process.
– Helps in tailoring a process model for
specific projects.
72
Why Model Life Cycle ?
73
Life Cycle Model (CONT.)
74
Life Cycle Model (CONT.)
75
Life Cycle Model (CONT.)
76
Life Cycle Model (CONT.)
78
Life Cycle Model (CONT.)
79
Life Cycle Model (CONT.)
80
Life Cycle Model (CONT.)
82
Life Cycle Model (CONT.)
83
Summary
84
Summary
85
Summary
● Adherence to a software life cycle
model:
– Helps to do various development
activities in a systematic and
disciplined manner.
– Also makes it easier to manage a
software development effort.
86
Reference
● R. Mall, “Fundamentals of Software
Engineering,” Prentice-Hall of India,
2004, CHAPTER 1.
87