SEC Spring2022 Lecture#3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 56

Department Of Computer Science

1
 Software Engineering – I (CSC291)

Lecture 03

Agile Process Models

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Objectives

• To introduce Agile software process models

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Topics Covered

• Agile Process Model


• XP
• SCRUM

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Agile SDLC’s Model

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Agile SDLC’s

• Speed up or bypass one or more life cycle phases


• Usually less formal and reduced scope
• Used for time-critical applications
• Used in organizations that employ disciplined methods

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 What is Agility?

• Effective response to change


• Software being built, changes to the team members, changes
because of new technology,
• Changes of all kinds that may have an impact on the product or on
project
• Agility
• Encourages team structures and attitudes that make
communication
• Rapid delivery of operational software
• Deemphasizes the importance of intermediate work products
• Adopts the customer as a part of the development team

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 What is Agility?

• Agility can be applied to any software process by meeting


following criteria
• The process be designed in a way that allows the project team
to adapt tasks and to streamline them
• Conduct planning in a way that understands the fluidity of an
agile development approach
• Eliminate all but the most essential work products and keep
them lean
• Emphasize an incremental delivery strategy that gets
working software to the customer as rapidly as feasible

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 The Principles of Agile Methods

Principle Description
Customer involvement Customers should be closely involved throughout the development process. Their role is
provide and prioritize new system requirements and to evaluate the iterations of the
system.

Incremental delivery The software is developed in increments with the customer specifying the requirements
to be included in each increment.

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.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 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
• 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.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 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
• Prioritizing changes can be difficult where there are multiple
stakeholders.
• Contracts may be a problem as with other approaches to iterative
development.
• As requirement document is part of contract between customer and
supplier
• Organizations have spent year in formalizing their process so it is
difficult for them to adopt informal process model defined by
development teams
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 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?
• Key to implementing maintainable software is to produce high quality and well-structured code instead
of documentation
• Can agile methods be used effectively for evolving a system in response to customer
change requests?
• Incremental delivery, design for change and maintaining simplicity all make sense when software is
being changed which shows agile methods are used effectively
• Problems may arise if original development team is broken up.
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 Plan-driven and agile development

• Plan-driven development
• A plan-driven approach to software engineering is based around
separate development stages with the outputs to be produced at
each of these stages planned in advance.
• Not necessarily waterfall model – plan-driven, incremental
development is possible
• Iteration occurs within activities.
• Agile development
• Specification, design, implementation and testing are inter-leaved
• Outputs from the development process are decided through a
process of negotiation during the software development process.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Plan-driven and agile specification

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Agile vs. Plan-driven Methods

Agile methods Plan-driven methods


Low criticality High criticality
Senior developers Junior developers

Requirements change often Requirements do not change often

Small number of developers Large number of developers

Culture that responds to change Culture that demands order

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Agile Methods

• Well-known agile software development methods and/or process


frameworks include:
• Rapid Application Development (RAD)
• Rational Unify Process (RUP)
• Extreme programming (XP)
• Scrum
• Test Driven Development (TDD)
• Feature Driven Development (FDD)
• Dynamic systems development method (DSDM)
• Agile Unified Process (AUP)
• Adaptive Software Development (ASD)
• Agile Modeling
• Crystal Clear
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 Extreme Programming (XP)

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Extreme Programming - XP

 For small-to-medium-sized teams developing software with


vague or rapidly changing requirements
 Coding is the key activity throughout a software project
 Communication among teammates is done with code
 Life cycle and behavior of complex objects defined in test
cases – again in code

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Extreme Programming

• Perhaps the best-known and most widely used agile method.


• Extreme Programming (XP) takes an ‘extreme’ approach to
iterative development.
• New versions may be built several times per day;
• Increments are delivered to customers every 2 weeks;
• All tests must be run for every build and the build is only
accepted if tests run successfully.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 XP and agile principles

• Incremental development is supported through small, frequent


system releases.
• Requirements are based on simple customer stories or scenarios
• Customer involvement means full-time customer engagement with
the team.
• Responsible for defining acceptance tests for the system
• 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.
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 XP Practices (1-6)

1. Planning game – determine scope of the next release by


combining business priorities and technical estimates
2. Small releases – put a simple system into production, then release
new versions in very short cycle
3. Metaphor – all development is guided by a simple shared story of
how the whole system works
4. Simple design – system is designed as simply as possible (extra
complexity removed as soon as found)
5. Testing – programmers continuously write unit tests; customers
write tests for features
6. Refactoring – programmers continuously restructure the system
without changing its behavior to remove duplication and simplify
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 XP Practices (7 – 12)

7. Pair-programming -- all production code is written with two


programmers at one machine
8. Collective ownership – anyone can change any code anywhere in
the system at any time.
9. Continuous integration – integrate and build the system many
times a day – every time a task is completed.
10. 40-hour week – work no more than 40 hours a week as a rule
11. On-site customer – a user is on the team and available full-time to
answer questions
12. Coding standards – programmers write all code in accordance
with rules emphasizing communication through the code

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Extreme programming practices [1/2]

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’.

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.
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 Extreme programming practices [2/2]

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.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 The Extreme Programming Release Cycle

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Extreme Programming

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Planning

• In XP, a customer or user is part of the XP team and is


responsible for making decisions on requirements.
• User requirements are expressed as scenarios or user stories.
• These are written on cards
• The development team break them down into implementation
tasks.
• These tasks are the basis of schedule and cost estimates.
• The customer chooses the stories for inclusion in the next
release based on their priorities and the schedule estimates.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Design

• Provides implementation guidance for a story as it is written


• XP encourages the use of CRC (class-responsibility-
collaborator) cards
• Identify and organize the object oriented classes that are
relevant to the current software increment
• If a difficult design problem is encountered
• Immediately creation of an operational prototype of that
portion of the design called Spike
• Intent is to lower risk when true implementation starts
• Encourage refactoring

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Refactoring

• Programming team look for possible software improvements


and make these improvements even where there is no immediate
need for them.
• This improves the understandability of the software and so
reduces the need for documentation.
• Changes are easier to make because the code is well-structured
and clear.
• However, some changes requires architecture refactoring and
this is much more expensive.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Examples of refactoring

• Re-organization of a class hierarchy to remove duplicate code.


• Tidying up and renaming attributes and methods to make them
easier to understand.
• The replacement of inline code with calls to methods that have
been included in a program library.
• Eclipse include tools for refactoring which simplify the
process of finding dependencies between code sections and
making global code modifications
• In principle, software is easy to understand and change as new
stories are implemented
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 Coding

• After creating simple design team move to developing tests


instead of coding
• Develops unit test; the developer is better able to focus on
what must be implemented to pass the test
• A key concept during the coding activity is pair programming

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 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 between pairs reduces the overall risks to a
project when team members leave.
• A pair working together is more efficient than 2 programmers
working separately.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Advantages of pair programming

• It supports the idea of collective ownership and responsibility for


the system.
• 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.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Testing in XP

• XP testing features:
• Test-first development.
• Incremental test development from scenarios.
• User involvement in test development and validation.
• Automated test are used to run all component tests each time
that a new release is built.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Test-first development

• Writing tests before code clarifies the requirements to be


implemented.
• Ambiguities have to clarify before actual implementation
• Tests are written as programs so that they can be executed
automatically. The test includes a check that it has executed
correctly.
• Usually relies on a testing framework such as Junit.
• All previous and new tests are run automatically when new
functionality is added, thus checking that the new functionality
has not introduced errors.
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 Test case description for dose checking

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Scrum

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 SCRUM

• What is Scrum?
• ‘SCRUM’ originally derives from a strategy in the game of rugby where it denotes
“getting an out of play ball back into the game” with teamwork.
• SCRUM enables OO through advanced iterative, incremental development within a
controlled environment. It allows organizations to build the best possible OO systems
possible.
• SCRUM is one of many different types of Agile Software Development Frameworks
that you can use in the real world to deliver working software. It is all about people and
not technological solutions

• SCRUM is an Agile process framework that allows organizations to continuously


direct the project toward early delivery of real business value through the frequent and
regular delivery of high quality software.
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 Scrum

• The Scrum approach is a general agile method but its focus is on


managing iterative development
• There are three phases in Scrum.
• 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 user manuals and assesses the lessons learned from the
project.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 The Scrum Process

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 The Scrum Process

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 The Scrum Process

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 The Sprint cycle

• Sprints are fixed length, normally 2–4 weeks. They correspond


to the development of a release of the system in XP.
• The Assess Phase
• Product backlog is reviewed, and priorities and risks are
assigned
• Customer is involved to introduce new requirements or tasks at
beginning of each sprint
• The Selection Phase
• Involves all of the project team who work with the customer
to select the features and functionality to be developed during
the sprint.
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 The Sprint cycle

• The Develop Phase


• The team organize themselves to develop the software.
• The team is isolated from the customer and the organization
• All communication is channelled through the so-called ‘Scrum
master’.
• The role of the Scrum master is to protect the development team
from external distractions.
• The Review Phase
• At the end of the sprint, the work done is reviewed and
presented to stakeholders.
• The next sprint cycle then begins.
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 INTRODUCTION TO TERMS

• Scrum Roles
• Product Owner
• Scrum Master
• Scrum Team
• Sprint
• Daily Scrum
• Product Backlog
• Sprint Backlog
• Scrum Meeting Rules
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz
Abbasi
 Teamwork in Daily Scrum

• The whole team attends short daily meetings


• What did you do since the last team meeting?
• What obstacles are you encountering?
• What do you plan to accomplish by the next team meeting?
• This means that everyone on the team knows what is going on and,
if problems arise, can re-plan short term work to cope with them.

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Roles and Responsibilities

• Scrum Master (a facilitator who arranges)


• Daily meetings, tracks the backlog of work to be done, records decisions,
measures progress against the backlog and communicates with customers
and management outside of the team.
• Product Owner
• Responsible for project, managing, controlling and making visible
Product Backlog list
• Makes final decisions of the tasks related to product Backlog
• Scrum Team
• It is project team
• Organize itself in order to achieve the goals of each Sprint
• Involved in effort estimation, creating Sprint Backlog, reviewing Product
Backlog list

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Roles and Responsibilities

• Customer
• Participate in tasks related to product Backlog items
• Management
• In charge of final decision making
• Participate in setting of goals and requirements
• E.g. management is involved in selecting Product Owner

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Scrum benefits

• Rising and Janoff (2000) discuss its advantages as follows


• The product is broken down into a set of manageable and
understandable chunks.
• The whole team have visibility of everything and consequently
team communication is improved.
• Customers see on-time delivery of increments and gain
feedback on how the product works.
• Trust between customers and developers is established and a
positive culture is created in which everyone expects the project
to succeed.
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 SCRUM

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 SCRUM’S BENEFITS/ CHARACTERISTICS

• Rising and Janoff (2000) discuss its advantages as follows


• The product is broken down into a set of manageable and understandable chunks.
• The whole team have visibility of everything and consequently team communication is improved.
• Customers see on-time delivery of increments and gain feedback on how the product works.
• Trust between customers and developers is established and a positive culture is created in which
everyone expects the project to succeed.
• It enables project to proceed systematically
• Constant testing and documentation
• A deliverable product is always ready
• Frequent demonstrations for early feedback from stakeholders
• Team spirit
• Sense off accomplishment
• Quality off product

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 WHY USE SCRUM?

• Advantages
• Productivity increases
• Continuous improvement
• Leverages the chaos

• Disadvantages
• Scrum requires constant monitoring both quantitatively and
qualitatively
• People are resistant to change
• Costly
Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi
 CONCLUSION

• Scrum is many things. Scrum is a management process


Scrum accepts the empirical nature of software development
as a given, working within those constraints to enable the
team to deliver as much business value as possible as quickly
as possible..

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


 Conclusions

• Different life-cycle models


• Each with its own strengths
• Each with its own weaknesses
• Criteria for deciding on a model include:
• The organization
• Its management
• Skills of the employees
• The nature of the product
• Best suggestion
• “Mix-and-match” life-cycle model

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


THANK YOU

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi


THANK YOU

Software Engineering Concepts-CSC291-Spring-2022 Mr. Tehseen Riaz Abbasi

You might also like