XP - Extreme Programming - Embrace Change Summary

sexta-feira, 17 de abril de 2009

As you may already know, XP is a lightweight methodology created by Kent Beck, for small-to-medium-sized teams developing software in the face of vague or rapidly changing requirements.

To help the understand of the basis, i'm providing a summary and a mind map of the book eXtreme Programming - Embrace Change, by Kent Beck, as you can see below. Enjoy it!

Figure 1: Extreme Programming Mind Map

XP - Embrace Change is a small book, quite fast and easy to read, it took me only two days to finish it.
As Kent Beck said "XP is a philosophy of software development based on the values of communication, feedback, simplicity, courage, and respect."

The Basic Problem

Software development fails to deliver, and fails to deliver value. This failure behind software development has a huge economic and human impact. So it was the reason to find ways to develop software.

First recognize risks and try to address it applying some XP practices, like short release cycles to limit scope, one to four week iterations of features requests from customer, it will give you a fine-grained feedback about progress.
Economics of Software Development

Create a strategy for maximizing the economic value of the project, spending less, earning more (depends strategy), spending later and earning sooner, increase probability that the project will stay alive.

In projects we have to control five variables: cost, time, quality and scope, like PMBoK scope is the best way to achieve control. KEEP FOCUS ON SCOPE.
Cost of Change

The cost of changing a program rises exponentially over time. Figura 2 shows that the longer it takes you to find a defect then on average the more expensive it is to address.

Figure 2 - Cost of Change [Scott W. Ambler, 2006]

To overtake problems related to cost of change, after years of production some factors became clear like a simple design, intensive use of automated tests, refactoring code and design, incremental design, continuous integration.
Learning to drive.

Everything in software changes. requirements, design, business, technology, team members change. The problem
isn't change, the problem, rather, is the inability to cope with change when it comes.

Learn to control the development of software by making many small adjustments, not by making a few large adjustments, kind of like driving a car.


The driver of a software project is the customer. If the software doesn't do what they want it to do,
you have failed. Of course, they don't know exactly what the software should do. That's why
software development is like steering, not like getting the car pointed straight down the road. Our
job as programmers is to give the customer a steering wheel and give them feedback about
exactly where we are on the road.

XP Values

  • Communication: Ensured an effective comunication of your team and your organization core values.
  • Simplicity: Search for simple solutions.
  • Feedback: Work with your customers at your side, seat the team together.
  • Courage: Throw code possible whenever itŽs possible (keeping your code simple). Courage to change, to assume your faults.

PUT ALL THESE VALUES IN PRACTICE.

The Four Basic Activities

  • Coding: Code is the one artifact that development absolutely cannot live without, it gives you a chance to communicate clearly and concisely.
  • Testing: Writing every test you can imagine.
  • Listening: Learn to listen your customer, he knows about the business not you.
  • Designing: Good design ensures that every piece of logic in the system has one and only one home.

Figure 3 - XP Overview.
The Practices

Primary Practices
------------------------
-Integration
  • Ten minute build: Automatically build the whole system and run all of the tests in ten minutes.
  • Continuous integration: Integrate and test changes after no more than a couple of hours.
-Whole Team: Create cross-functional teams. Create a team with all the skills necessary for the project to succeed.
-Programming
  • Test-First Programming: [TDD] Test -> Code -> Refactor
  • Incremental Design: Keep the design investment in proportion to the needs of the system.
  • Pair Programming: Help to:
  1. Keep each other on task.
  2. Brainstorm refinements to the system.
  3. Clarify ideas.
  4. Lower frustration.
  5. Hold each other accountable

-Energized Work: Take care and respect yourself.

-Planning
  • Weekly Cycle: Plan work a week at a time, have meeting at the beginning of every week. During meetings, review progress, ask your customer to pick some stories to implement and break stories into tasks.
  • Monthly Cycle: Plan work quarter at a time, Identify bottlenecks, Initiate repairs, Plan the theme, pick the stories.
  • Stories: Write the stories on index cards and put them on a wall.
  • Slack: Include some minor tasks that can be dropped if you get behind in your plan.

The Planning Game:
  1. List the items of work that may need to be done.
  2. Estimate the items.
  3. Set a budget for the planning cycle.
  4. Agree on the work that needs to be done within the budget. As you negotiate, don't change the estimates or the budget.

Corollary Practices
--------------------------


-Business Negociated Scope Contract: Try a sequence of short contracts instead of one long one.
  • Pay-per-use: Charge for every time the system is used.
  • Daily Deployment: Put new software into production every night.
-Incremental Deployment: Find a little piece of functionality and deploy it.
-Programming
  • Single Code Base: Keep only one code stream.
  • Code & Tests: Mantain Code and tests as permanent artifacts.
  • Shared Code: Anyone on the team can improve any part of the system at any time.
-Root Cause Analysis: Eliminate defect and its cause. To find the Root cause, apply Taiichi Ohno's exercise, called "Five Whys":
  • Why did we miss this defect?
  • Why didn't we know?
  • Why isn't she part of the team?
  • Why doesn't anyone else know how?
  • Why isn't it a management priority?

-Real Customer Involvement: Put your customer at your side.
-Team
  • Team Continuity: Keep effective teams together.
  • Shrinking Teams: Lean Thinking, reduce the size.





If you like it, buy the book here..