Rajib Mall Lecture Notes
Rajib Mall Lecture Notes
Prof. R. Mall
Dept. of CSE, IIT, Kharagpur
Construction Analogy.
Engineering Practice
Theoretical basis and quantitative techniques provided. Many are just thumb rules. Tradeoff between alternatives. Pragmatic approach to costeffectiveness.
4
Craft
Unorganized Use of Past Experience
Art
Time
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
Program Size
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
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?
Human memory can be thought to be made up of two distinct parts [Miller 56]:
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
Processing Center
11
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?
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.
The information that should normally occupy several places can be stored using only one place in the memory.
13
Chunking
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
Suppose, you look up a number from the telephone directory and start dialling 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. You may not remember the number at all, and would need to consult the directory again.
15
These would be easily be accommodated in the short term memory. So, he can easily understand it.
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
19
Abstraction
Focus attention on only one aspect of the problem and ignore irrelevant details.
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.
Decomposition
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
Try to break a bunch of sticks tied together versus breaking them individually.
You understand a book better when the contents are organized into independent chapters Compared to when everything is mixed up.
22
growth in complexity and difficulty level with size. ad hoc approach breaks down when size of software increases.
23
24
Higher Productivity
Better Quality Programs
25
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.
26
Software Crisis
Hw cost Sw cost
(cont.)
1960
Year
2008
Larger problems, Lack of adequate training in software engineering, Increasing skill shortage, Low productivity improvements.
28
Large Large number of users Team of developers Well-designed interface Well documented & user-manual prepared Systematic development
29
Software products
Outsourced projects
30
software engineering.
Many products require development of software as well as specific hardware to run it: a coffee vending machine, a mobile communication product, etc.
31
32
Feasibility Study
Requirements Analysis and Specification Hardware Software Partitioning
Project
Management
34
were being written in assembly language. were limited to about a few hundreds of lines of assembly code.
35
36
37
38
Programmers found:
Very
Programmers found:
programs
40
(late 60s)
41
(late 60s)
can represent and design a program's control structure. Usually one understands a program:
42
debug.
to understand and
43
(Late 60s)
It was found:
GO
GO
TO statements alter the flow of control arbitrarily. need to restrict use of GO TO statements was recognized.
44
The
(Late 60s)
Programmers
(Late 60s)
46
(Late 60s)
47
(Late 60s)
Only three programming constructs are sufficient to express any programming logic:
iteration
48
(Late 60s)
Everyone accepted:
It
This
Structured Programming
Structured Programs
51
Structured Programs
52
Structured programs
to maintain,
Require
53
Structured Programming
of errors:
While using structured if-then-else and do-while statements. Compared to test-and-branch constructs.
54
JSP technique:
58
In JSP methodology:
A
Then
60
data items input to a system must first be identified, required on the data items to produce the required outputs should be determined.
61
Processing
processing stations (functions) in a system. items (data) that flow between processing stations.
62
(Late 70s)
Fit Engine
Fit Doors
Car
Chassis Store
Wheel Store
64
Object-Oriented Design
(80s)
Object-oriented technique:
An
intuitively appealing design approach: objects (such as employees, pay-roll-register, etc.) occurring in a problem are first identified.
Natural
65
Object-Oriented Design
(80s)
66
maintenance
67
Data structurebased
Control flowbased Ad hoc
68
69
cycle models, specification techniques, project management techniques, testing techniques, debugging techniques, quality assurance techniques, software measurement techniques, CASE tools, etc.
70
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
71
Differences between the exploratory style and modern software development practices
from error correction to error prevention. of errors as close to their point of introduction as possible.
72
Differences between the exploratory style and modern software development practices (CONT.)
In exploratory style,
errors
are detected only during testing, focus is on detecting as many errors as possible in each phase of development.
73
Now,
Differences between the exploratory style and modern software development practices (CONT.)
In exploratory style,
coding
is synonymous with program development. is considered only a small part of program development effort.
74
Now,
coding
Differences between the exploratory style and modern software development practices (CONT.)
specification.
used.
75
Differences between the exploratory style and modern software development practices (CONT.)
available.
76
Differences between the exploratory style and modern software development practices (CONT.)
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.
77
Differences between the exploratory style and modern software development practices (CONT.)
fault diagnosis and maintenance are smoother now. help in software project management, quality assurance, etc.
78
Differences between the exploratory style and modern software development practices (CONT.)
estimation, scheduling,
monitoring mechanisms.
79
Series of identifiable stages that a software product undergoes during its life time:
Feasibility study
Requirements analysis and specification, Design, Coding, Testing
maintenance.
80
(CONT.)
Several different activities may be carried out in each life cycle phase.
82
A written description:
Helps in identifying inconsistencies, redundancies, and omissions in the development process. Helps in tailoring a process model for specific projects.
83
84
(CONT.)
85
(CONT.)
86
(CONT.)
there must be a precise understanding among team members as to when to do what, otherwise it would lead to chaos and project failure.
87
(CONT.)
one engineer starts writing code, another concentrates on writing the test document first, yet another engineer first defines the file structure another defines the I/O for his portion first.
88
(CONT.)
entry and exit criteria for every phase. A phase is considered to be complete:
89
(CONT.)
The phase exit criteria for the software requirements specification phase:
Software Requirements Specification (SRS) document is complete, reviewed, and approved by the customer.
90
(CONT.)
91
(CONT.)
at which stage (e.g., design, code, test, etc. ) of the project is.
the project manager would have to depend on the guesses of the team members.
92
(CONT.)
93
(CONT.)
Many life cycle models have been proposed. We will confine our attention to a few important and commonly used models.
Iterative waterfall,
Evolutionary, Prototyping, and Spiral model
94
Summary
95
Summary
96
Summary
97