Chapter 01
Chapter 01
Use quality attributes and testing principles in software development life cycle.
Discuss recent trends in Software engineering by using CASE and agile tools.
Syllabus
Requirements Analysis: Analysis Model, data modeling, scenario based modeling, class
based modeling, Flow oriented modeling, behavioral modeling-Introduction to UML
Diagrams
Design Engineering : Design Process & quality, Design Concepts, design Model,
Pattern-based Software Design. Architectural Design :Design Decisions,Views,
Patterns, Application Architectures,
Project Planning: Project initiation, Planning Scope Management, Creating the Work
Breakdown Structure, scheduling: Importance of Project Schedules, Developing the
Schedule using Gantt Charts, PERT/ CPM
3. https://nptel.ac.in/courses/106/105/106105182/
4. http://www2.cs.uh.edu/~rsingh/documents/software_design/TDD.pdf
What is Software?
12
Software Products
Generic products
Stand-alone systems that are marketed and sold to any customer who
wishes to buy them.
Examples – PC software such as editing, graphics programs, project
management tools; software for specific markets such as appointments
systems for dentists.
Customized products
Software that is commissioned by a specific customer to meet their own
needs.
Examples – embedded control systems, traffic monitoring systems.
13
13
Features of Software?
Its characteristics that make it different from other things human being build.
Software doesn't "wear out.” but it deteriorates (due to change). Hardware has
bathtub curve of failure.
14
Failure (“Bathtub”)Curve for Hardware
Failure Rate
Wear out
Time
15
Wear vs. Deterioration
16
Software Applications
System software
Application software
Engineering/scientific software
Embedded software
Product-line software
Web-Apps
AI
17
Software Applications
System software: such as compilers, editors, file management utilities
18
Software—New Categories
Open world computing — distributed computing due to wireless
networking. How to allow mobile devices, personal computer, enterprise
system to communicate across vast network.
Netsourcing — the Web as a computing engine. How to architect simple and
sophisticated applications to target end-users worldwide.
Open source — ”free” source code open to the computing community
Cognitive machines
19
Software Engineering Definition
The Seminal definition:
[Software engineering is] the establishment and use of sound engineering principles
in order to obtain economically software that is reliable and works efficiently on real
machines.
20
Importance of Software Engineering
More and more, individuals and society rely on advanced software systems. We
need to be able to produce reliable and trustworthy systems economically and
quickly.
It is usually cheaper, in the long run, to use software engineering methods and
techniques for software systems rather than just write the programs as if it was
a personal programming project. For most types of system, the majority of
costs are the costs of changing the software after it has gone into use.
21
21
Software Engineering: A Layered
Technology
tools
methods
process model
a “quality” focus
22
Software Engineering: A Layered
Technology
23
A Common Process Framework
Umbrella Activities
24
Framework Activities
Communication
Planning
Modeling
Construction
Deployment
25
Umbrella Activities
Software project tracking and control: assess progress against the plan and take actions to
maintain the schedule.
Risk management: assesses risks that may affect the outcome and quality.
Technical reviews: assesses work products to uncover and remove errors before going to the
next activity.
Measurement: define and collects process, project, and product measures to ensure
stakeholder’s needs are met.
Software configuration management: manage the effects of change throughout the software
process.
Reusability management: defines criteria for work product reuse and establishes mechanism
to achieve reusable components.
Work product preparation and production: create work products such as models, documents,
logs, forms and lists.
26
Software Myths [Management Myths]
Myth 1: We already have a book that’s full of standards and procedures for
building the software.
Myth 2: If we get behind the schedule, we can add more programmers and
catch up.
Myth 3: If I decide to outsource the software project to a third party, I can just
relax and let that firm built it.
27
Software Myths [Practitioner’s Myths]
Myth 1: Once we write the program and get it to work, our job is done.
Myth 2: Until I get the program running, I have no way of assessing its quality.
28
Software Myths [Customer Myths]
29
Process Models
30
A Generic Process Model
31
The Waterfall Model
Communicat ion
project init iat ion Planning
requirement gat hering estimating Modeling
scheduling
analysis Const ruct ion
tracking
design Deployment
code
t est delivery
support
f eedback
32
The Waterfall Model
The waterfall process model is oldest paradigm for the software engineering.
Disadvantages:
Real projects rarely follow the sequential flow.
The customer must have patience. A working version of program(s) will not be
available until late in the project time span.
33
The Incremental Model
increment # n
Co m m u n i c a t i o n
Pl a n n i n g
M o d e l i n g
a n a ly s i s Co n s t ru c t i o n
d e s ig n
c od e De p l o y m e n t
t es t d e l i v e ry
fe e d b a c k
deliv ery of
nt h increment
increment # 2
Co m m u n i c a t i o n
Pl a n n i n g
M o d e l i n g
a n a ly s i s Co n s t ru c t i o n
d e s ig n c o de De p l o y m e n t
t est d e l i v e ry
fe e d b a c k
deliv ery of
increment # 1 2nd increment
Co m m u n i c a t i o n
Pl a n n i n g
M o d e l i n g
a n a l y s is Co n s t ru c t i o n
d es i gn c od e
t es t
De p l o y m e n t
d e l i v e ry deliv ery of
fe e d b a c k
1st increment
34
The Incremental Model
Advantages:
Useful when staffing is unavailable. Early increments can be implemented with
fewer people. More staff may be added later in the process.
35
The Iterative Process Flow
36
The Evolutionary Process Flow
37
Evolutionary Models: Prototyping
Qu ick p l an
Co m m unicat ion
Mo d e l in g
Qu i ck d e sig n
Deployment
De live r y
& Fe e dback Co nst r uct ion
of
pr ot o t yp e
38
Evolutionary Models: Prototyping
Advantages:
Disadvantages:
39
Evolutionary Models: The Spiral
40
Evolutionary Models: The Spiral
planning
estimation
scheduling
risk analysis
communication
modeling
analysis
design
start
deployment
construction
delivery code
feedback test
41
Evolutionary Models: The Spiral
Advantages:
Disadvantages:
42
The Parallel Process Flow
43
The RAD Model
Team # n
M o d e lin g
business m odeling
dat a m odeling
proces s m odeling
C o n s t ru c t io n
com ponent reuse
Team # 2 aut om at ic code
Com m unicat ion generat ion
t es t ing
Mo d el i ng
b u si ne ss m od e l i n g
d a t a m od e l in g
p ro cess m o de l in g
Planning
Co nst r uct i o n De ploym e nt
Team # 1 co m p on e n t re use
int egrat ion
au t om a t i c co d e
ge n e ra t io n
deliv ery
Mode ling t e st i n g f eedback
business modeling
dat a modeling
process modeling
6 0 - 9 0 days
44
The RAD Model
Advantages:
Quick development of software products.
Disadvantages:
High skilled resources required.
Difficult to manage
45
Agile Software Development
46
Agile Software Development
New methods:
47
The Manifesto for Agile Software
Development
“We are uncovering better ways of developing software by doing it and helping
others do it. Through this work we have come to value:
Individuals and interactions over processes and tools
That is, while there is value in the items on the right, we value the items on the
left more.”
http://www.agilemanifesto.org
48
What is “Agility”?
Drawing the customer into the team. Eliminate “us and them” attitude.
Planning in an uncertain world has its limits and plan must be flexible.
49
Agility Principles - I
1. Our highest priority is to satisfy the customer through early and 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.
50
Agility Principles - II
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.
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.
51
Agile Methods
Scrum
Extreme Programming
52
Human Factors
the process molds to the needs of the people and team, not the other way around
key traits must exist among the people on an agile team and the team itself:
Fuzzy problem-solving ability.(ambiguity and constant changes, today problem may not be
tomorrow’s problem)
Self-organization. ( themselves for the work done, process for its local environment, the work
schedule)
53
Extreme Programming (XP)
The most widely used agile process, originally proposed by Kent Beck in 2004. It uses an object-oriented
approach.
XP Planning
Begins with the listening, leads to creation of “user stories” that describes required output, features,
and functionality. Customer assigns a value(i.e., a priority) to each story.
Agile team assesses each story and assigns a cost (development weeks. If more than 3 weeks, customer
asked to split into smaller stories)
Working together, stories are grouped for a deliverable increment next release.
A commitment (stories to be included, delivery date and other project matters) is made. Three ways:
1. Either all stories will be implemented in a few weeks, 2. high priority stories first, or 3. the riskiest
stories will be implemented first.
After the first increment “project velocity”, namely number of stories implemented during the first
release is used to help define subsequent delivery dates for other increments. Customers can add
stories, delete existing stories, change values of an existing story, split stories as development work
proceeds.
54
Extreme Programming (XP)
spike solut ions
simple design
prot ot ypes
CRC cards
user st ories
values
accept ance t est crit eria
it erat ion plan
pair
programming
Release
sof t ware increment
unit t est
project velocit y comput ed cont inuous int egrat ion
55
Extreme Programming (XP)
XP Design
Follows the KIS principle (keep it simple) Nothing more nothing less than the story.
For difficult design problems, suggests the creation of “spike solutions”—a design prototype
for that portion is implemented and evaluated.
Encourages “refactoring”—an iterative refinement of the internal program design. Does not
alter the external behavior yet improve the internal structure. Minimize chances of bugs.
More efficient, easy to read.
56
Extreme Programming (XP)
XP Coding
Recommends the construction of a unit test for a story before coding commences. So
implementer can focus on what must be implemented to pass the test.
Encourages “pair programming”. Two people work together at one workstation. Real time
problem solving, real time review for quality assurance.Take slightly different roles.
XP Testing
All unit tests are executed daily and ideally should be automated. Regression tests are
conducted to test current and previous components.
“Acceptance tests” are defined by the customer and executed to assess customer visible
functionality
57
The XP Debate
Conflicting customer needs: different customers' needs need to be assimilated. Different vision or
beyond their authority.
Requirements are expressed informally: Use stories and acceptance tests are the only explicit
manifestation of requirements. Formal models may avoid inconsistencies and errors before the system is
built. Proponents said changing nature makes such models obsolete as soon as they are developed.
Lack of formal design: XP deemphasizes the need for architectural design. Complex systems need overall
structure to exhibit quality and maintainability. Proponents said incremental nature limits complexity as
simplicity is a core value.
58
SCRUM
Scrum is an agile process that allows us to focus on delivering the highest business value in the
shortest time.
It allows us to rapidly and repeatedly inspect actual working software (every two weeks to one
month).
The business sets the priorities. Our teams self-manage to determine the best way to deliver the
highest priority features.
Every two weeks to a month anyone can see real working software and decide to release it as is or
continue to enhance for another iteration.
59
SCRUM
A software development method Originally proposed by Schwaber and Beedle (an activity occurs
during a rugby match) in early 1990.
Scrum—distinguishing features
Work units occurs in “sprints” and is derived from a “backlog” of existing changing prioritized
requirements
Changes are not introduced in sprints (short term but stable) but in backlog.
Meetings are very short (15 minutes daily) and sometimes conducted without chairs ( what did you
do since last meeting? What obstacles are you encountering? What do you plan to accomplish by
next meeting?)
“demos” are delivered to the customer with the time-box allocated. May not contain all
functionalities. So customers can evaluate and give feedbacks.
60
Characteristics
Self-organizing teams
61
How Scrum Works?
62
Scrum
63
Sprints
Scrum projects make progress in a series of “sprints”
Analogous to XP iterations
64
No changes during the sprint
Change
Plan sprint durations around how long you can commit to keeping change out of the sprint
65
Scrum Framework
Scrum Meeting
66
Product Owner
Define the features of the product
67
The Scrum Master
68
Scrum Team
Typically 5-10 people
Cross-functional
69
Ceremonies
Sprint Planning Meeting
Sprint
Daily Scrum
70
Spring Planning Meeting
Product Backlog
Team Capabilities
Sprint Goal
Sprint Planning
Business Conditions
Meeting Sprint Backlog
Technology
Current Product
71
Parts of Sprint Planning Meeting
1st Part:
2nd Part:
72
Pre-Project/Kickoff Meeting
A special form of Sprint Planning Meeting
Sprint
A month-long iteration, during which is incremented a product functionality
NO outside influence can interfere with the Scrum team during the Sprint
73
Daily Scrum
Parameters
Daily
15-minutes
Stand-up
Three questions:
74
Daily Scrum
Is NOT a problem solving session
Is a good way for a Scrum Master to track the progress of the Team
75
Scrum FAQs
Why daily?
No
76
Sprint Review Meeting
Team presents what it accomplished during the sprint
Informal
Participants
Customers
Management
Product Owner
Other engineers
77
Sprint Retrospective Meeting
Feedback meeting
Three questions
Start
Stop
Continue
78
Product Backlog
A list of all desired work on the project
Usually a combination of
79
Product Backlog
Spreadsheet (typically)
80
Sample Product Backlog
81
Sprint Backlog
A subset of Product Backlog Items, which define the work for a Sprint
Team can add or subtract items from the list. Product Owner is not allowed to do it
82
Sample Sprint Backlog
83
Sprint Burn down Chart
84
Sprint Burn down Chart
Progress
900
800
752 762
700
664
619
600
Remaining Effort in Hours
500
400
300
200
85
Test Driven Development
We produce well-designed, well-tested, and well-factored code in small,
verifiable steps.
If you do this correctly and in incremental steps you can reduce the defects in
your system.
86
Test Driven Development
Benefits
You express your intent twice, once with a test and another with production
code.
All these tests are checked in and become part of your continuous integration.
87
Test Driven Development- Challenges
It will increase your effort. But should reduce effort at the end of delivery
cycle.
If you have legacy code extra effort and time is required to place hooks for
TDD.
The basic steps of TDD are easy to learn, but the mindset takes a while to
master.
88
Is this Pair Programming?
89
Pair Programming
We help each other succeed.This practice comes from XP.
When you pair, one person codes—the driver.The other person is the navigator, whose job is to think
The navigator sometimes works on understanding how the current work fits in the over-all design and
sometimes thinks of the next task.
Since we are trying to do simple design things are evolving the developers require a lot of discipline
and pair programming enforces this.
Above all it allows and forces individuals to collaborate and share knowledge.
90
Pair Programming- Challenges
Pair programming can be uncomfortable in the beginning, especially if you are
not used to collaborating.
Communication issues.
91
Continuous Integration
We keep our code ready to ship
Although you won’t release in the middle of a sprint, the point is to be technologically ready, even if
you are not functionally.
With Continuous integration, you are integrating in short cycle and thus have smaller changes to deal
with as you integrate.
Continuous integration does not make sense unless it’s automated, has a short turn around time (fast
builds).
You need tests to fail or pass a build. Tests are the backbone that give you a green or a red light to take
a snapshot of your build.
92
Continuous Integration- Challenges
CI also requires some setup, if you don’t have one.
Keeping build times short. This might require some serious effort and might
And you need a good version control system – VC systems like subversion that
93
Thank You
94