SE Extreme Programming
SE Extreme Programming
With pair-programming:
•Two software engineers work on one task at one computer
•One engineer, the driver, has control of the keyboard and mouse and
creates the implementation
•The other engineer, the navigator, watches the driver’s implementation
to identify defects and participates in on-demand brainstorming
•The roles of driver and observer are periodically rotated between the two
software engineers
– No duplicate code.
– Simplification.
– Flexibility.
– Reduced redundancy.
After renaming:
public void setXPixelPosition(int xPixelPosition) { this.xPixelPosition =
xPixelPosition;
}
→ No need for comments.
But: Requires changing all references to the method throughout the
application.
Rename variable:
public class Person {
private String firstName;
public void setFirst(String firstName) {
this.firstName = firstName;
}
}
⚫ Each time you fix a bug or add a new feature, look for
overly complex code. Look for:
• Chunks of logic that are duplicated and refactor them into a
shared method.
• Try to rename methods and arguments so they make sense.
• Try to migrate poorly designed code towards better usage of
design patterns.
3. Run the test again to ensure you did not break anything.
⚫ The programmers write the unit tests before they write the code,
then add unit tests whenever one is found to be missing.
⚫ When all the acceptance tests pass for a given user story, that story
is considered complete.
⚫ It works…
⚫ … in disciplined XP teams.
⚫ Everybody
• Agrees what they will work on
• Raises problems & difficulties
• Knows what’s going on
⚫ Initial pairing.
First, you select the article that you want f rom a displayed list. You
then have to tell the system how you will pay for it - this can either
be through a subscription, through a company account or by credit
card.
After this, you get a copyright form fr om the system to fill in and,
when you have submitted this, the article you want is downloaded
onto your computer.
You then choose a printer and a copy of the article is printed. You
tell the system if printing has been successful.
• Exploration phase
• Commitment Phase
• Steering Phase
Commitment phase:
• Goal: Customer sorts stories by value;
Programmers sort stories by risk.
• Moves: sort by value, sort by risk, set velocity, choose scope.
Steering phase:
• Goal: Update the plan.
• Moves: iteration, recovery, new story, re-estimate.
⚫ Beck says: “Every project I've worked on that had fixed price and
scope ended with both parties saying, "The requirements weren't
clear." “
⚫ Instead of fixed price/date/scope, the XP team offers something
more like a subscription.
⚫ A 12-month contract might put the system into production after three
or four months, with monthly or bimonthly releases thereafter.
⚫ XP relies on trust.