1 of 28

Agile Development - XP

by Ronni Kahalani, Copenhagen School of Design & Technology.

With inspiration from the book Software Engineering - A Practitioner's Approach.

eXtreme Programming (XP) is properly, the simplest and most widely used approach to agile software development.

2 of 28

Who am I?

Thank you for stopping by.

I’m Ronni. I hope you’re well and wish you a safe and worthy journey.

This presentation is part of the Software Engineering Series, from my lectures at Copenhagen School of Design & Technology.

You can view the Introducing Myself, if you want to know a little more about who I am.

All my presentations and materials are free and available at my blog post: Software Engineering.

Don’t let me uphold you,

continue your journey, go to next slide.

2

3 of 28

Agenda

    • Extreme Programming
      • The XP Process
      • Industrial XP

4 of 28

eXtreme Programming

“The most widely used approach to agile software development”

5 of 28

EXtreme Programming

Ideas and methods associated with XP occurred during the late 1980s, the seminal work on the subject has been written by Kent Beck

A variant of XP, called “Industrial XP” (IXP), refines XP and targets the agile process specifically for use within large organizations

6 of 28

The XP Process

“The most widely used approach to agile software development”

7 of 28

The XP Process

8 of 28

The XP Process

Uses an object-oriented approach as its preferred development paradigm.

A set of rules and practices in the context of 4 framework activities.

  • Planning
  • Design
  • Coding
  • Testing

9 of 28

XP Planning

Also called “Planning game” begins with listening…

10 of 28

Planning - Requirement gathering

Understand the business context leads to “User Stories” - Describes required output, features and functionality.

  • Each index card with value (priority) is written by the customer
  • XP team assess each story and assign a cost.
    • Measured in development weeks.
    • Customer split the story into smaller if more than 3 weeks.
  • Customer can write new stories at any time.

11 of 28

Planning

Customers and developers work together to decide how to group stories into the next “increment” to be developed.

Once a basic commitment (agreement on stories to be included, delivery date and other project matters) is made for a release.

The XP team orders the stories that will be developed in 1 of 3 ways:

  • All stories will be implemented immediately (within a few weeks).
  • Stories with highest value is moved up in the schedule and implemented first.
  • The riskiest stories is moved up in the schedule and implemented first.

12 of 28

Planning

After the first project release (increment) has been delivered, the XP team computes its project velocity, the number of customer stories implemented during the first release and it can be used to:

  • Help estimate delivery dates and schedule for subsequent releases.
  • Determine whether an overcommitment has been made for all stories across the entire development project.
  • If an overcommitment occurs, the content of releases is modified or end delivery dates are changed.

13 of 28

Planning

Customers can always:

  • Add stories.
  • Change the value of an existing story.
  • Split stories.
  • Eliminate stories.

The XP team then reconsiders all remaining releases and modifies its plans accordingly.

14 of 28

XP Design

Follows the KIS (keep it simple) principle.

15 of 28

Design

A simple design is always preferred over a more complex representation

Design provides implementation guidance for a story as it is written…�– nothing less, nothing more.

XP encourages the use of CRC cards is an effective mechanism for thinking in object-oriented context.

16 of 28

Design

CRC (class-responsibility-collaborator) cards:

  • Identify and organize the object-oriented classes that are relevant to the current software increment.
  • CRC cards are the only design work product produced as part of the XP process.

Use operational prototype if a difficult design problem is encountered as part of the design of a story:

  • Recommends the immediate creation of that portion of the design implemented and evaluated – Called “Spike Solution”

17 of 28

Design

XP encourages refactoring:

  • Construction technique that is also a design technique
  • “Refactoring” described by Fowler:
    • The process of changing a software system in such a way that it does not alter the external behavior of the code yet improves the internal structure.
    • A disciplined way to clean up code land modify/simplify the internal design! that minimizes the chances of introducing bugs.

A central notion in XP is that design occurs both before and after coding commences - Construction activity itself will provide guidance on how to improve the design.

18 of 28

XP Coding

After stories are developed and preliminary design work is done� …the team does not move to code…

19 of 28

Coding -Test First Approach

Starts by creating accept criteria tests, using the TDD / Test-Driven-Development paradigm.

  • Develops a series of unit tests that will exercise each of the stories that is to be included in the current release.
  • Can better focus on what must be implemented to pass the test.

Once the code is complete, it can…

  • be unit-tested immediately.
  • provide instantaneous feedback to the developers.

20 of 28

Coding – Pair Programming

A key concept during the coding activity is Pair Programming.

  • 2 people together at 1 computer workstation to create code for a story.

Provides a mechanism for real-time…

  • problem solving – 2 heads are often better than 1.
  • quality assurance - the code is reviewed as it is created.

Each person takes on a slightly different role – Example:

  • One person might think about the coding details.
  • The other ensures that coding standards are being followed�…or that the code for the story will satisfy the unit test.

21 of 28

Coding – Frequent Integration / Delivery

The code they develop is integrated with the work of others.

  • On a daily basis by an integration team.
  • …or the pair programmers have integration responsibility.

Continuous Integration (CI) strategy helps to…

  • avoid compatibility and interfacing problems.
  • provide a "smoke testing " environment to uncover errors early.

22 of 28

XP Testing

Unit tests should be implemented, automated and executed easily and repeatedly.

23 of 28

Testing - Types

This encourages a regression testing strategy - Integration and validation testing of the system can occur on a daily basis

Wells states:

"Fixing small problems every few hours takes less time

than fixing huge problems just before the deadline.“

Acceptance tests / customer tests by the customer focus on overall system features and functionality that are visible and reviewable.

Acceptance tests are derived from user stories.

24 of 28

Industrial XP

Industrial Extreme Programming (IXP)

  • is an organic evolution of XP.
  • imbued with XP's minimalist, customer-centric, test-driven spirit.

Differs most from the original XP by:

  • greater inclusion of management.
  • expanded role for customers.
  • upgraded technical practices.

25 of 28

Industrial XP

Unit tests should be implemented, automated and executed easily and repeatedly.

26 of 28

Industrial XP

IXP incorporates 6 new practices to ensure that an XP project works successfully within a large organization:

  • Readiness assessment – Understanding and commitment.
  • Project community – Right people and skills.
  • Project chartering – Objectives and goals.
  • Test-driven management – Measurable process and goals.
  • Retrospectives – Review after each delivered increment.
  • Continuous learning – Willing to learn.

In addition, IXP modifies a number of existing XP practices and redefines certain roles and responsibilities.

27 of 28

Questions?

Anything? What’s on your mind? Come on ask me anything…

28 of 28

Feedback?

Thank you for your precious time.

I hope it was worth it and would love to get your feedback.

Please share your feedback here