Académique Documents
Professionnel Documents
Culture Documents
5/17/2019 1
Unit 1-Fundamentals of Agile: (6 hours)
• The Genesis of Agile
• Introduction and background
• Agile Manifesto and Principles
• Overview of Scrum, Extreme Programming
• Feature Driven development, Lean Software
Development, Agile project management
• Design and development practices in Agile
projects, Test Driven Development, Continuous
Integration, Refactoring, Pair Programming
• Simple Design, User Stories, Agile Testing, Agile
Tools
5/17/2019 2
Introduction
• Agile : Latin word
• Adjective
1. Able to move quickly and easily
2. Able to think and understand quickly
5/17/2019 3
Software development processes
Software Engineering
• Software Engineering is the application of
systematic, disciplined, quantifiable approach
to the development, operation and
maintenance of software ; i.e. the application
of engineering to software
5/17/2019 5
What is Quality?
Software Quality is conformance to:
• explicitly stated functional and performance
requirements,
• explicitly documented development
standards,
• implicit characteristics that are expected of all
professionally developed software.
Maintainability
Portability
• External: Derived from the relationship between the environment and the
system (or the process). (To derive, the system or process must run)
– e.g. Reliability, Robustness
Reliability
• The user may rely on the system behaving properly
• Reliability is the probability that the system will operate as expected over a
specified interval
– A relative property (a system has a mean time between failure of 3 weeks)
Robustness
• A system is robust if it behaves reasonably even in circumstances that were not
specified
• A vague property (once you specify the abnormal circumstances they become part
of the requirements)
5/17/2019 13
Waterfall Development
REQUIREMENTS
DESIGN
DEVELOPMENT
Waterfall Development is
another name for the more
TESTING
traditional approach
to software development MAINTENANCE
phase
User Requirements output User Requirements Document
”Swimming
Detailed design & Coding Detailed
upstream”
Design
& Code
Testing
The Waterfall
Lifecycle Workflow
Delivery
Time
Waterfall Strengths
• Easy to understand, easy to use
• Provides structure to inexperienced staff
• Milestones are well understood
• Sets requirements stability
• Good for management control (plan, staff, track)
• Works well when quality is more important than cost
or schedule
Waterfall Development (contd..)
You complete one phase (e.g. design) before moving
on to the next phase (e.g. development)
DESIGN
DEVELOPMENT
You don’t realize any value until
Skipped
the end of the project Takes too long
You leave the testing until the end TESTING
You don’t seek approval from the
stakeholders until late in the day
MAINTENANCE
AGILE
Cooperative Iterative
Quality-driven
People not process The skills of the development team should be recognized and
exploited. Team members should be left to develop their own ways
of working without prescriptive processes.
Embrace change Expect the system requirements to change and so design the
system to accommodate these changes.
Maintain simplicity Focus on simplicity in both the software being developed and in the
development process. Wherever possible, actively work to
eliminate complexity from the system.
66
Characteristics :Agile method
• Modularity
• Iterative
• Time-bound
• Incremental
• Convergent
• People-oriented
• Collaborative
Agile : Timeline Comparison
8-9 months
Waterfall
Development Models
3-4 months
Analysis
Design
Agile Construction
Testing
Working Software
to the sponsor in 4-
6 weeks
Time
Market Scenario
Agile 2012 Surveys
Major Findings
• Agile Momentum
(i) Future plans to implement Agile grew from
59% in 2011 -> 83% in 2012.
• Why Agile?
The top 3 benefits obtained include:
1. Ability to manage changing priorities (90%)
2. Productivity (85%)
3. Project visibility (84%)
Major Findings
(ii) Most are using Scrum or Scrum variants (72%), as in past years.
Agile method applicability
• Product development where a software company is
developing a small or medium-sized product for sale.
• Custom system development within an organization,
where there is a clear commitment from the customer
to become involved in the development process and
where there are not a lot of external rules and
regulations that affect the software.
• Because of their focus on small, tightly-integrated
teams, there are problems in scaling agile methods to
large systems.
75
Problems with agile methods
• It can be difficult to keep the interest of customers who are
involved in the process.
• Team members may be unsuited to the intense involvement
that characterises agile methods.
• Prioritising changes can be difficult where there are multiple
stakeholders.
• Maintaining simplicity requires extra work.
• Contracts may be a problem as with other approaches to
iterative development.
76
Agile methods and software
maintenance
• Most organizations spend more on maintaining existing
software than they do on new software development.
So, if agile methods are to be successful, they have to
support maintenance as well as original development.
• Two key issues:
– Are systems that are developed using an agile approach
maintainable, given the emphasis in the development
process of minimizing formal documentation?
– Can agile methods be used effectively for evolving a
system in response to customer change requests?
• Problems may arise if original development team
cannot be maintained.
77
Existing Agile Methods
• Extreme Programming (“XP”)
• Scrum
SCRUM
• Idea first appeared in a business journal in 1986
(applied to product development management).
• Used in software development and presented in
1995 paper.
• Term is based on rugby term
• Small cross-functional teams
Scrum
• There are three phases in Scrum.
– The initial phase is an outline planning phase where
you establish the general objectives for the project
and design the software architecture.
– This is followed by a series of sprint cycles, where
each cycle develops an increment of the system.
– The project closure phase wraps up the project,
completes required documentation such as system
help frames and user manuals and assesses the
lessons learned from the project.
•
80
SCRUM Practices
• Product and release backlog
– A list of the features to be implemented in the
project (subdivided to next release), ordered by
priority
– Can adjust over time as needed, based on
feedback
– A product manager is responsible for maintaining
SCRUM Practices
• Burn-down chart
– Make best estimate of time to complete what is
currently in the backlog
– Plot the time on a chart
– By studying chart, understand how team functions
– Ensure burn-down to 0 at completion date
• By adjusting what’s in the backlog
• By adjusting the completion date
SCRUM Practices
• The sprint
– The sprint is a ~1 month period after which some product is
delivered
– Features are assigned from the product backlog to a sprint
backlog
• Features divided into smaller tasks for sprint backlog
• Feature list is fixed for sprint
– Planning meeting
• Tasks can be assigned to team members
• Team members have individual estimates of time taken per item
– During sprint, work through features, and keep a burn-down
chart for the sprint
– New functionality is produced by the end of the sprint
– After sprint, a review meeting is held to evaluate the sprint
SCRUM Practices
• Scrum meeting
– 15 minute daily meeting
– All team members show up
– Quickly mention what they did since last Scrum, any obstacles
encountered, and what they will do next
– Some team member volunteers or is appointed to be the
Scrum Master - in charge of Scrum meeting, and responsible
for seeing that issues raised get addressed
– Customers, management encouraged to observe
SCRUM Practices
24 hours
Scrum
Sprint Sprint Meeting
Backlog Plan
Release
Backlog Begin
30 days End
Sprint
Sprint
88
XP and agile principles
• Incremental development is supported through small,
frequent system releases.
• Customer involvement means full-time customer engagement
with the team.
• People not process through pair programming, collective
ownership and a process that avoids long working hours.
• Change supported through regular system releases.
• Maintaining simplicity through constant refactoring of code.
89
Extreme Programming Practices
1. On-Site Customer
– Customer is actively involved with development process
– Customer gives “User Stories”
• Short, informal “stories” describing features
• Keep on “story cards”
2. Planning Game
– Developers and customers together plan project
– Developers give cost estimates to “stories” and a budget of how much they
can accomplish
• Can use abstract accounting mechanism
• Later compare to actual cost, to improve estimates over time
– Customer prioritizes stories to fit within budget
Extreme Programming Practices
3. Metaphor
– Come up with metaphor that describes how the whole project will fit
together
– The picture in a jigsaw puzzle
– Provides framework for discussing project in team
– Tools and materials often provide good metaphors
4. Small Releases
– Time between releases drastically reduced
• A few weeks/months
– Multiple iterations
– Can have intermediate iterations between bigger “releases”
Extreme Programming Practices
5. Testing
– Test-first programming
– Unit testing frequently by developers
– Acceptance tests defined by customers
6. Simple Design
– Design should be quick, not elaborate
– Pick the simplest thing that could possibly work
– Resist adding stuff not ready yet
Extreme Programming Practices
7. Refactoring
– Code gets worse with feature adds, bug fixes
– Rewrite small sections of code regularly
– Rerun all unit tests to know nothing broken
• Means you should have designed comprehensive tests
8. Pair Programming
9. Collective Ownership
– Anyone can edit anything
– Errors are the fault of the whole team
Extreme Programming Practices
10. Continuous Integration
– Commit changes frequently (several times a day)
– Verify against entire test suite!
11. Coding Standards
– Enables effective teamwork
12. Sustainable Pace
– No overtime
– Only exceptions in final week
– Good estimation skills for budgeting will help ensure reasonable times
– Time less likely to be wasted in pairs, bullpen rooms
– Plan time each day for administrative work (<1 hour), breaks
The extreme programming release cycle
95
Extreme programming practices
Principle or practice Description
Incremental planning Requirements are recorded on story cards and the stories to be
included in a release are determined by the time available and
their relative priority. The developers break these stories into
development ‘Tasks’. See Figures 3.5 and 3.6.
Small releases The minimal useful set of functionality that provides business
value is developed first. Releases of the system are frequent
and incrementally add functionality to the first release.
Simple design Enough design is carried out to meet the current requirements
and no more.
Test-first development An automated unit test framework is used to write tests for a
new piece of functionality before that functionality itself is
implemented.
Refactoring All developers are expected to refactor the code continuously as
soon as possible code improvements are found. This keeps the
code simple and maintainable.
96
Extreme programming practices
Pair programming Developers work in pairs, checking each other’s work and
providing the support to always do a good job.
Collective ownership The pairs of developers work on all areas of the system, so that
no islands of expertise develop and all the developers take
responsibility for all of the code. Anyone can change anything.
Continuous integration As soon as the work on a task is complete, it is integrated into
the whole system. After any such integration, all the unit tests in
the system must pass.
Sustainable pace Large amounts of overtime are not considered acceptable as
the net effect is often to reduce code quality and medium term
productivity
On-site customer A representative of the end-user of the system (the customer)
should be available full time for the use of the XP team. In an
extreme programming process, the customer is a member of
the development team and is responsible for bringing system
requirements to the team for implementation.
97
Pair programming
• In XP, programmers work in pairs, sitting together to
develop code.
• This helps develop common ownership of code and
spreads knowledge across the team.
• It serves as an informal review process as each line of
code is looked at by more than 1 person.
• It encourages refactoring as the whole team can
benefit from this.
• Measurements suggest that development productivity
with pair programming is similar to that of two people
working independently.
98
Pair programming
• In pair programming, programmers sit together at the
same workstation to develop the software.
• Pairs are created dynamically so that all team
members work with each other during the
development process.
• The sharing of knowledge that happens during pair
programming is very important as it reduces the
overall risks to a project when team members leave.
• Pair programming is not necessarily inefficient and
there is evidence that a pair working together is more
efficient than 2 programmers working separately.
99
Advantages of pair programming
• It supports the idea of collective ownership and
responsibility for the system.
– Individuals are not held responsible for problems with the
code. Instead, the team has collective responsibility for
resolving these problems.
• It acts as an informal review process because each
line of code is looked at by at least two people.
• It helps support refactoring, which is a process of
software improvement.
– Where pair programming and collective ownership are
used, others benefit immediately from the refactoring so
they are likely to support the process.
100
Pair Programming- Challenges
Pair programming can be uncomfortable in the
beginning, especially if you are not used to
collaborating.
Communication issues.
5/17/2019 102
Feature Driven Development
• Feature-Driven Development (FDD) is a client-
centric, architecture-centric, and pragmatic
software process(1999)
• Jeff De Luca, Nebulon Pty. Ltd. (Australia)
• Peter Coad, TogetherSoft Corporation (now
Borland)
• FDD was first applied on a 15 month, 50-
person project for a large Singapore bank in
1997
5/17/2019 103
Feature Driven Development
• As the name implies, features are an
important aspect of FDD.
• A feature is a small, client-valued function
expressed in the form
<action><result><object>.
• For example, "Calculate the total of a sale",
"Validate the password of a user", and
"Authorize the sales transaction of a
customer”
5/17/2019 104
Preliminary Processes
• Develop an Overall Model
• Build a Features List
• Plan By Feature
Preliminary Processes
• A system for building systems is necessary
• Simple is better
• Process steps should be obviously valuable to
each team member
• Good processes move to the background
Six Roles
• Project Manager
• Chief Architect
• Development Manager
• Chief Programmers
• Class Owners (aka Developers)
• Domain Experts
Feature Driven Development
• What is FDD?
• Processes
– Preliminary Design
• Develop an Overall Model
• Build a Features List
• Plan By Feature
– Iterative Design
• Design By Feature
• Build By Feature
1. Develop an overall model
• Establishes the shape of the system
• Defines classes, how classes related to each
other
• Creates the base object model
• Includes internal and external reviews, model
notes
1. Develop an overall model
Study documents
Develop small
group models
2. Build a features list
Who?
Feature List Team: domain experts, chief
programmers, chief architect
2. Build a features list
• Functional decomposition of model developed in step 1
• Subject area to business activity to business activity step
• Feature is a business activity step, customer centric not
technology centric
• Nomenclature: <action> <result> <object>
• “Generate an account number for the new customer”
2. Build a features list
http://www.nebulon.com/articles/fdd/DevView.html
3. Plan By Feature
Who?
The Planning Team: the project manager, the
development manager, and chief programmers.
3. Plan By Feature
Determine the
development
sequence
Assign classes to
developers
3. Plan By Feature
• Group features into feature sets (one or more
business activities)
• Prioritize based on customer need
• Establish completion dates (MM/YYYY)
4. Design by feature
Who?
The Feature Team: chief programmer, class owners
4. Design by feature
• Work package level—now based on the
technical architecture
• Two weeks or less of work
• Fleshes out class and object design, create
sequence diagrams as necessary
• Feature teams are very fluid
• Updates object model created in process #1.
4. Design by feature
Conduct a domain
walk through
Develop the
Form a feature Refine the object Write class and
sequence Design inspection
team model method prologue
diagrams
Study the
referenced docs
5. Develop by feature
Who?
Class owners, chief programmers
5. Develop by feature
Who?
Class owners, chief programmers
5. Develop by feature
• Implement
• Code inspection
• Unit test
• Promote to build
5. Develop by feature
Unit Testing
Code inspections
Market Position: FDD v XP
FDD XP
• More hierarchical • Peer to peer
• Class owners • Collective ownership
• Success with above • Success with average
average developers developers
• Client works on 1,2,4 • Client on the team
• Process 1 • Constant refactoring
• “Live the life”! • 40 hour weeks
Lean Software Development
5/17/2019 126
Origins of Lean Software Development
• Eliminate waste
Waste is something that does not add value. For example unnecessary work.
• Build quality in
QA should not be a separate phase at the end of the project. Instead, it should
be continuous and something that is constantly improved. Automatization and
refactoring as tools.
• Create knowledge
Share information, teach others.
• Defer commitment
Make decisions at the ”last responsible moment”.
• Deliver fast
Deliver smaller increments of the product in short intervals
• Respect people
Respect colleagues, let people decide what and how to do it in order to meet
goals
• Optimize the whole
Optimize the whole value chain from customer request to complete product.
See the whole.
Comparison Of Lean and Agile Principles
• Eliminate waste
– Simplicity is essential
– Satisfy customer through early and continuous delivery
– Working software is the primary measure of progress
• Build quality in
– Working software is the primary measure of progress
• Create knowledge
– Regular reflection
– Close collaboration
• Defer commitment
– Welcome changes
• Deliver fast
– Deliver fast and frequently
– Satisfy customer through early and continuous delivery
• Respect people
– Self-Organizing Teams
• Optimize the whole
– All agile principles
The Lean Manifesto?
5/17/2019 136
Traditional View of Testing
XP’s “Test First”
• Create test cases before writing code
– Business rep writes acceptance tests to demonstrate that
user stories are correctly implemented
6 2
Refactor Write a test case
5 3
Run test to pass Run test to fail
4
Write enough code
140
TDD vs. Traditional Development Methodology
Test
Test Code
Code Refactor
Design
The term refactor is used to better communicate that the last step is about
transforming the current design toward a better design
141
TDD
• Is not about writing tests
• Java – JUnit
• Python – PyUnit
• PHP – PHPUnit
• Ruby - Test:Unit
• C++ - CPPUnit
• .Net – NUnit
• ….
Junit
JUnit is an open source Java testing framework used to write and
run repeatable tests. It is an instance of the xUnit architecture for
unit testing frameworks.
• JUnit test generators now part of many Java IDEs (Eclipse, BlueJ,
Jbuilder, DrJava)
JUnit test framework is a package of classes that lets us write tests for each
method, then easily run those tests
Conclusions
• The professional goal of every software engineer, and every
development team, is to deliver the highest possible value to our
employers and customers.
– And yet, our projects fail, or fail to deliver value, at a dismaying rate.
• Though well intentioned, the upward spiral of process inflation is
culpable for at least some of this failure.
• The principles and values of agile software development were
formed as a way
– to help teams break the cycle of process inflation, and
– to focus on simple techniques for reaching their goals.