LECTURE -1
SOFTWARE ENGINEERING
Prof. D. S. Yadav
Department of Computer Science 1
IET Lucknow
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.
Trade-off 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
time, cost
Machine
Effort,
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 this approach completely breaks down when the
product size becomes large?
9
AN INTERPRETATION BASED ON HUMAN
COGNITION MECHANISM
Human memory can be thought to be made up of two distinct
parts [Miller 56]:
Short term memory and
Long term memory.
If you are asked the question: “If it is 10AM now, how many
hours are remaining today? ”
First, 10AM would be stored in the short-term memory.
Next, a day is 24 hours long would be fetched from the long term
memory into short term memory.
Finally, the mental manipulation unit would compute the difference
(24-10).
10
HUMAN COGNITION MECHANISM
Short Term Memory
Processing Center
Long Term Memory
Brain
11
SHORT TERM MEMORY
An item stored in the short term memory can get lost:
Either due to decay with time or
Displacement by newer information.
This restricts the time for which an item is stored in
short term memory to few tens of seconds.
However, an item can be retained longer in the short
term memory by recycling.
12
WHAT IS AN ITEM?
An item is any set of related information.
A character such as `a' or a digit such as `5' can be items.
A word, a sentence, a story, or even a picture can each be a single
item.
Each item normally occupies one place in memory.
When you are able to relate several different items
together (chunking):
The information that should normally occupy several places can be
stored using only one place in the memory.
13
CHUNKING
If you are given the binary number 110010101001
It may prove very hard for you to understand and
remember.
But, the octal form of 6251 (i.e. (110)(010)(101)(001))
would be easier.
You have managed to create chunks of three items
each.
14
EVIDENCE OF SHORT TERM MEMORY
Short term memory is evident:
In many of our day-to-day experiences.
Suppose, you look up a number from the telephone directory
and start dialing it.
If you find the number to be busy, you can dial the number again
after a few seconds almost effortlessly without having to look up the
directory.
But, after several days:
You may not remember the number at all, and would need to
consult the directory again. 15
THE MAGICAL NUMBER 7
If a person deals with seven or less number items:
These would be easily be accommodated in the short
term memory.
So, he can easily understand it.
As the number of new information increases beyond
seven,
It becomes exceedingly difficult to understand it.
16
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.
17
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.
18
PRINCIPLES DEPLOYED BY SOFTWARE
ENGINEERING TO OVERCOME HUMAN
COGNITIVE LIMITATIONS
Mainly two important principles are deployed:
Abstraction
Decomposition
19
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.
20
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.
21
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.
22
WHY STUDY SOFTWARE ENGINEERING? (1)
To acquire skills to develop large programs.
Exponential growth in complexity and difficulty
level with size.
The ad hoc approach breaks down when size
of software increases.
23
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?
Also learn techniques of:
Specification, design, user interface development,
testing, project management, etc.
24
WHY STUDY SOFTWARE ENGINEERING? (3)
To acquire skills to be a better programmer:
Higher Productivity
Better Quality Programs
25
26