extreme programming. past methodologies systems analysissystems analysis –60s and 70s –waterfall...

64
eXtreme Programming eXtreme Programming

Upload: lynne-campbell

Post on 02-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

eXtreme ProgrammingeXtreme Programming

Page 2: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Past MethodologiesPast Methodologies

• Systems AnalysisSystems Analysis– 60s and 70s60s and 70s

– Waterfall MethodologyWaterfall Methodology

• Structured DesignStructured Design– 70s and 80s70s and 80s

• Object-orientedObject-oriented– Rational Unified Process, UMLRational Unified Process, UML

Page 3: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Lightweight Lightweight MethodologiesMethodologies

• Reaction to the Big MethodologiesReaction to the Big Methodologies– To avoid Analysis ParalysisTo avoid Analysis Paralysis

• Extreme ProgrammingExtreme Programming

• The Agile AllianceThe Agile Alliance

Page 4: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

AgendaAgenda

• IntroductionIntroduction

• MotivationMotivation

• FoundationsFoundations

• XP PracticesXP Practices

• (Managing & Adopting XP)(Managing & Adopting XP)

Page 5: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

IntroductionIntroduction

XP evolved from an unusually successful project at Daimler-Chrysler (C3 Project). It is a lightweight, effective, code-centric, efficient and enjoyable discipline for teams of 2 - 10 developers.

But beware -- it really is extreme...

Page 6: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Going to ExtremesGoing to Extremes

• Code reviews ==> Pair ProgrammingCode reviews ==> Pair Programming

• Testing ==> Automated tests, run many Testing ==> Automated tests, run many times per daytimes per day

• Design ==> Refactor MercilesslyDesign ==> Refactor Mercilessly

• Integration ==> Continuous IntegrationIntegration ==> Continuous Integration

• Simplicity ==> Simplicity ==> TheSimplestThingThatCouldPossiblyWork TheSimplestThingThatCouldPossiblyWork (YoureNotGonnaNeedIt)(YoureNotGonnaNeedIt)

Page 7: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Evil PracticesEvil Practices

• ““Premature Optimization is the Root Premature Optimization is the Root of All Evil” (-- Don Knuth)of All Evil” (-- Don Knuth)

• Premature Generalization is cause Premature Generalization is cause of Doomed Projects (-- Me)of Doomed Projects (-- Me)– Wait until you really need itWait until you really need it

• Only wimps fail to refactorOnly wimps fail to refactor

Page 8: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The Promises of XPThe Promises of XP

• For Developers:For Developers:– work on things that really matterwork on things that really matter

– have a say in schedulinghave a say in scheduling

– don’t have to work alonedon’t have to work alone

• For Managers:For Managers:– get maximum value out of each dev. Weekget maximum value out of each dev. Week

– see regular, concrete, observable progresssee regular, concrete, observable progress

– can change requirements affordablycan change requirements affordably

Page 9: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The Claims of XPThe Claims of XP

• Reduces RiskReduces Risk

• Increases Project ResponsivenessIncreases Project Responsiveness

• Improves ProductivityImproves Productivity

• Adds Fun to a ProjectAdds Fun to a Project

(Quit Laughing!)(Quit Laughing!)

Page 10: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The Features of XPThe Features of XP

• Early, concrete, frequent feedbackEarly, concrete, frequent feedback

• Evolutionary Project PlanningEvolutionary Project Planning

• Flexible Scheduling of TasksFlexible Scheduling of Tasks

• Automated TestingAutomated Testing

• CommunicationCommunication– orally or in codeorally or in code

• Collaborative ProgrammingCollaborative Programming– supermen not required!supermen not required!

Page 11: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

MotivationMotivation

Page 12: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Project RiskProject Risk

• Schedule SlipsSchedule Slips

• Project CanceledProject Canceled

• High Defect RateHigh Defect Rate

• System Misses the MarkSystem Misses the Mark

• Business Requirements ChangeBusiness Requirements Change

• Staff TurnoverStaff Turnover

Page 13: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

How XP Mitigates RiskHow XP Mitigates RiskSchedule SlipsSchedule Slips

• Short Release CyclesShort Release Cycles

• Reduces scope of slipReduces scope of slip

• Higher priority tasks done firstHigher priority tasks done first– ““worst things first”worst things first”

Page 14: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

How XP Mitigates RiskHow XP Mitigates RiskProject CanceledProject Canceled

• Plan smallest release that makes Plan smallest release that makes business sensebusiness sense

• Principle:Principle: “A complex system that “A complex system that works evolves from a simple system works evolves from a simple system that works” (Grady Booch)that works” (Grady Booch)

Page 15: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

How XP Mitigates RiskHow XP Mitigates RiskHigh Defect RateHigh Defect Rate

• Daily Automated TestsDaily Automated Tests

• Catch defects earlyCatch defects early

Page 16: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

How XP Mitigates RiskHow XP Mitigates RiskSystem Misses the MarkSystem Misses the Mark

• Customer is part of the Customer is part of the development teamdevelopment team

• Requirements are continually Requirements are continually refined and brought into focusrefined and brought into focus

Page 17: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

How XP Mitigates RiskHow XP Mitigates RiskBusiness Requirements ChangeBusiness Requirements Change

• Iterative DevelopmentIterative Development

• Do a little bit at a timeDo a little bit at a time

• Tasks easily shuffled in priorityTasks easily shuffled in priority

Page 18: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

How XP Mitigates RiskHow XP Mitigates RiskStaff TurnoverStaff Turnover

• Programmers less frustrated Programmers less frustrated because they do meaningful work, because they do meaningful work, togethertogether

Page 19: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The XP WayThe XP Way

do

{

perform an engineering task

unit test

integrate

functional test

} while (!done);

Page 20: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The XP WayThe XP Waycontinuedcontinued

• Developers work in pairsDevelopers work in pairs– Siamese keyboard twinsSiamese keyboard twins

• Write unit tests first, then codeWrite unit tests first, then code

• Refactor as neededRefactor as needed

• Integrate immediatelyIntegrate immediately

Page 21: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

A Development EpisodeA Development Episode

(pp. 7-9)(pp. 7-9)

Page 22: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Did You Notice?Did You Notice?

• Pairs of programmers program Pairs of programmers program togethertogether

• Development is driven by tests.Development is driven by tests.– Test first, then codeTest first, then code

• Pairs evolve the design of the systemPairs evolve the design of the system

• Integrate/test immediatelyIntegrate/test immediately

Page 23: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

FoundationsFoundations

Page 24: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The Four VariablesThe Four VariablesCan’t all vary independently!Can’t all vary independently!

• ScopeScope– the most fluid variable - can be the difference between the most fluid variable - can be the difference between

success and failuresuccess and failure

• ResourcesResources– but too much is as bad as not enoughbut too much is as bad as not enough

• TimeTime– too much time can be a liability tootoo much time can be a liability too

• QualityQuality– not much of a variablenot much of a variable

– excellent vs. insanely excellentexcellent vs. insanely excellent

Page 25: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The Four ValuesThe Four Values

• CommunicationCommunication

• SimplicitySimplicity

• FeedbackFeedback

• CourageCourage

Page 26: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

CommunicationCommunication

• Verbal or in CodeVerbal or in Code– very few written documentsvery few written documents

– teams work within spitting distanceteams work within spitting distance

• Pair ProgrammingPair Programming– continuous communication!continuous communication!

• User StoriesUser Stories– on index cards!on index cards!

Page 27: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Story CardStory Card

101 Union Dues

Bargaining Unit EEs have union dues withheld from thefirst pay period of the month. The amount varies byunion, local, and in some cases varies by the individual.

If dues cannot be taken in the first pay period, theyshould not be taken until a UD30 transaction isreceived.

Priority High Risk Low Jan

Page 28: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

SimplicitySimplicity

• Do just today’s work todayDo just today’s work today– TheSimplestThingThatCouldPossiblyWorkTheSimplestThingThatCouldPossiblyWork

– YoureNotGonnaNeedItYoureNotGonnaNeedIt

– say “no” to Analysis Paralysissay “no” to Analysis Paralysis

• Don’t fear tomorrowDon’t fear tomorrow– you’ll be just as successful as you are todayyou’ll be just as successful as you are today

– the process gives you resiliencethe process gives you resilience

– tests give you confidencetests give you confidence

Page 29: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

FeedbackFeedback

• Tasks take hours and minutesTasks take hours and minutes– not days and weeksnot days and weeks

• Ask the SystemAsk the System– i.e., run testsi.e., run tests

• Do hard stuff firstDo hard stuff first

Page 30: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

CourageCourage

• Don’t be afraid to redesign, refactor, Don’t be afraid to redesign, refactor, throw away codethrow away code

• Tests will keep you on trackTests will keep you on track

Remember:Remember: “All (big) methodologies “All (big) methodologies are based on fear.”are based on fear.”

Page 31: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Basic XP PrinciplesBasic XP Principles

• Rapid FeedbackRapid Feedback

• Assume SimplicityAssume Simplicity

• Incremental ChangeIncremental Change

• Embrace ChangeEmbrace Change

• Quality WorkQuality Work

Page 32: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Rapid FeedbackRapid Feedback

• Get going!Get going!– So we don’t forget the questionSo we don’t forget the question

– Momentum is crucialMomentum is crucial

• For Developers:For Developers:– minutesminutes, not months, not months

• For Managers:For Managers:– weeksweeks, not years, not years

Page 33: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Assume SimplicityAssume Simplicity

• 98/2 Rule98/2 Rule– the time you save on 98% of the tasks the time you save on 98% of the tasks

more than compensates for the 2% more than compensates for the 2% where raw simplicity doesn’t workwhere raw simplicity doesn’t work

• ““Sufficient to the day are the tasks Sufficient to the day are the tasks thereof”thereof”

Page 34: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Incremental ChangeIncremental Change

• Translate big changes into a series of Translate big changes into a series of small changessmall changes

• Design & plan as you goDesign & plan as you go

• This applies to adopting XP tooThis applies to adopting XP too– start with what you feel comfortable withstart with what you feel comfortable with

– but have a little courage!but have a little courage!

Page 35: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Embrace ChangeEmbrace Change

• Possible because we Assume Possible because we Assume SimplicitySimplicity

• Solve the most pressing problem Solve the most pressing problem firstfirst

• Trust your testsTrust your tests

Page 36: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Quality WorkQuality Work

• Quality really isn’t a variableQuality really isn’t a variable

• Otherwise software development is Otherwise software development is no funno fun– Assume developers are quality-mindedAssume developers are quality-minded

– Choices: Excellent vs. Insanely Choices: Excellent vs. Insanely ExcellentExcellent

Page 37: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The Basic ActivitiesThe Basic Activities

• CodingCoding

• TestingTesting

• ListeningListening

• DesigningDesigning

Page 38: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

CodingCoding

• Use code for as many Software Use code for as many Software engineering purposes as possibleengineering purposes as possible

• Code isn’t impressed by degrees, Code isn’t impressed by degrees, salaries, or fancy talksalaries, or fancy talk

• Eschew Documentation BulkEschew Documentation Bulk

Page 39: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

TestingTesting

• Unit tests flesh-out/refine requirementsUnit tests flesh-out/refine requirements– ““I think this is what you said.”I think this is what you said.”

• The Untested does not existThe Untested does not exist

• ““Programming + Testing” is faster than just Programming + Testing” is faster than just “Programming”“Programming”

• Unit tests make programmers happyUnit tests make programmers happy

• Functional tests make users happyFunctional tests make users happy

• Both must be happy!Both must be happy!

Page 40: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

ListeningListening

• Programmers don’t know anythingProgrammers don’t know anything– about the business, that isabout the business, that is

• Ask questionsAsk questions– then listen to the answersthen listen to the answers

– give feedback (what is hard, easy,…)give feedback (what is hard, easy,…)

• Corollary: Programmers shouldn’t design Corollary: Programmers shouldn’t design GUIs!GUIs!

Page 41: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

DesigningDesigning

• Creating a clean internal structureCreating a clean internal structure– modular (cohesion/coupling)modular (cohesion/coupling)

• maintainable, extensiblemaintainable, extensible

– one-definition ruleone-definition rule

• A daily activityA daily activity

• Refactoring fights EntropyRefactoring fights Entropy

Page 42: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

XP PracticesXP Practices

4 ValuesBasic

PrinciplesBasic

ActivitiesXP

Practices+ +

Page 43: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

PracticesPractices

• The Planning GameThe Planning Game

• Small releasesSmall releases

• MetaphorMetaphor

• Simple designSimple design

• TestingTesting

• RefactoringRefactoring

• Pair ProgrammingPair Programming

• Collective OwnershipCollective Ownership

• Continuous IntegrationContinuous Integration

• 40-hour week40-hour week

• On-site customerOn-site customer

• Coding standardsCoding standards

Page 44: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Before we Continue...Before we Continue...

• Keep in mind that the Practices Keep in mind that the Practices work togetherwork together

• The weakness of one is covered by The weakness of one is covered by the strengths of othersthe strengths of others

Page 45: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The Planning GameThe Planning Game

• ““Quickly determine the scope of the next Quickly determine the scope of the next release by combining business priorities and release by combining business priorities and technical estimates. As reality overtakes the technical estimates. As reality overtakes the plan, plan, update the planupdate the plan.”.”

• ““Neither business considerations nor technical Neither business considerations nor technical considerations should be paramount. Software considerations should be paramount. Software development is always an development is always an evolving dialogevolving dialog between the possible and the desirable.”between the possible and the desirable.”

• Customer owns the planCustomer owns the plan

Page 46: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The Planning GameThe Planning Game~ continued ~~ continued ~

• Business people decide about:Business people decide about:– scopescope

– prioritypriority

– releasesreleases

• Technical people decide about:Technical people decide about:– estimatesestimates

– processprocess

– detailed schedulingdetailed scheduling

Page 47: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Short ReleasesShort Releases

• ““Put a simple system into production Put a simple system into production quickly, then release new versions on a quickly, then release new versions on a very short cycle.”very short cycle.”

• Plan a month or two at a timePlan a month or two at a time

• Focus only on the current releaseFocus only on the current release

• Implement the highest priority features Implement the highest priority features firstfirst

Page 48: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

MetaphorMetaphor

• A simple, shared story that guides A simple, shared story that guides developmentdevelopment– architecture from 30,000 feetarchitecture from 30,000 feet

• ““The system is…The system is…– a spreadsheet”a spreadsheet”

– like a desktop”like a desktop”

– like a pension calculation system”like a pension calculation system”

Page 49: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Simple DesignSimple Design

• The system should be as simple as The system should be as simple as possible at any given moment.possible at any given moment.

• Extraneous complexity is removed as Extraneous complexity is removed as soon as it is discoveredsoon as it is discovered– fewest possible classes, methodsfewest possible classes, methods

– no duplication of logicno duplication of logic

– attitude:attitude: when you can’t delete any more, the when you can’t delete any more, the design is rightdesign is right

Page 50: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

TestingTesting

• The key to confidenceThe key to confidence

• Programmers continually write and run Programmers continually write and run automated unit testsautomated unit tests– for things that could possibly breakfor things that could possibly break

• They must pass 100% for work to They must pass 100% for work to continuecontinue

• Customers write functional tests to Customers write functional tests to validate each user storyvalidate each user story

Page 51: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

RefactoringRefactoring

• Restructuring a system without changing its Restructuring a system without changing its behaviorbehavior– to remove duplication (e.g., combine methods, objects)to remove duplication (e.g., combine methods, objects)

– simplify design, etc.simplify design, etc.

– promotes reliability, reusepromotes reliability, reuse

– the “long term” takes care of itselfthe “long term” takes care of itself

• Difficult without automated testsDifficult without automated tests

• Do it when you’re rested and freshDo it when you’re rested and fresh– which should be often!which should be often!

Page 52: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Pair ProgrammingPair Programming

• All production code is written with two All production code is written with two programmers at one machineprogrammers at one machine– discourages interruptionsdiscourages interruptions

• Take turns drivingTake turns driving– the driver implements (thinks tactically)the driver implements (thinks tactically)

– the observer thinks strategically (i.e., does the the observer thinks strategically (i.e., does the worrying:-)worrying:-)

• Teams can change oftenTeams can change often

Page 53: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Collective OwnershipCollective Ownership

• ““Whoever finds a snake, kills it”Whoever finds a snake, kills it”– (apologies to the Sierra Club)(apologies to the Sierra Club)

• Anyone can change code anywhere, Anyone can change code anywhere, anytimeanytime– to add value (not to change curly braces)to add value (not to change curly braces)

• Pair programming makes this feasiblePair programming makes this feasible– always 2 brains making a joint decisionalways 2 brains making a joint decision

Page 54: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Continuous IntegrationContinuous Integration

• Integrate/build many times dailyIntegrate/build many times daily– every time a task is completedevery time a task is completed

• Consider having a separate Consider having a separate integration machineintegration machine

• Test/debug until the system is 100% Test/debug until the system is 100% correctcorrect

Page 55: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

40-hour Week40-hour Week

• Work no more than 40 hours a week as a Work no more than 40 hours a week as a rulerule– never work overtime a second week in a rownever work overtime a second week in a row

• Overtime is a symptom of a project in Overtime is a symptom of a project in serious troubleserious trouble– and the overtime won’t fix itand the overtime won’t fix it

• Tired programmers make bad codeTired programmers make bad code

• Take a 2-week vacation every yearTake a 2-week vacation every year

Page 56: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

On-site CustomerOn-site Customer

• Have a real, live user on the team, available to Have a real, live user on the team, available to answer questionsanswer questions– someone who will really use the system in practicesomeone who will really use the system in practice

– they can write functional tests, and make small-they can write functional tests, and make small-scale decisionsscale decisions

• Isn’t the system important enough to dedicate Isn’t the system important enough to dedicate a real user to it?a real user to it?– if not, don’t build itif not, don’t build it

– they can still get some real work donethey can still get some real work done

Page 57: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Coding StandardsCoding Standards

• A tool of communicating through A tool of communicating through codecode

• Avoids “curly brace” warsAvoids “curly brace” wars

• Developers will give up their Developers will give up their religious tenets for an enjoyable, religious tenets for an enjoyable, successful projectsuccessful project

Page 58: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

XP RolesXP Roles

• Programmer Programmer (knows “how”)(knows “how”)

• Customer Customer (knows “what”)(knows “what”)

• Tester Tester (verifies quality)(verifies quality)

• Tracker Tracker (the “conscience”, “historian”)(the “conscience”, “historian”)

• Coach Coach (the calm, responsible, manager)(the calm, responsible, manager)

• Consultant Consultant (rarely needed)(rarely needed)

• Big Boss Big Boss (leader, instills courage, insists on (leader, instills courage, insists on completion)completion)

Page 59: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Adopting XPAdopting XP

• Incrementally of courseIncrementally of course– 1. Pick your worst problem1. Pick your worst problem

– 2. Solve it the XP way2. Solve it the XP way

– 3. When it’s no longer the worst, go to 1.3. When it’s no longer the worst, go to 1.

• Starting PlacesStarting Places– TestingTesting

– Planning GamePlanning Game

Page 60: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Agile DevelopmentAgile Development

• Evolved from XPEvolved from XP

• A little broader, easier to graspA little broader, easier to grasp

• The Jury is “still out”The Jury is “still out”

Page 61: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The Agile ManifestoThe Agile Manifesto

We are uncovering better ways of developing We are uncovering better ways of developing software by doing it and helping others do it. software by doing it and helping others do it. Through this work we have come to value: Through this work we have come to value:

Individuals and interactions over processes and tools Individuals and interactions over processes and tools Working software over comprehensive documentation Working software over comprehensive documentation Customer collaboration over contract negotiation Customer collaboration over contract negotiation Responding to change over following a plan Responding to change over following a plan

That is, while there is value in the items on That is, while there is value in the items on the right, we value the items on the left more. the right, we value the items on the left more.

Page 62: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Read the BookRead the Book

• We’ve covered about 50%We’ve covered about 50%

• Kent Beck, Kent Beck, eXtreme Programming eXtreme Programming ExplainedExplained, A-W, 1999., A-W, 1999.

• http://www.XProgramming.comhttp://www.XProgramming.com

• http://c2.comhttp://c2.com– Extreme Programming RoadmapExtreme Programming Roadmap

Page 63: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

Developer’s SummaryDeveloper’s Summary

• Pairs of programmers work togetherPairs of programmers work together

• Development is driven by testsDevelopment is driven by tests– test first, then codetest first, then code

• Pairs make tests run, and evolve the Pairs make tests run, and evolve the system (refactor)system (refactor)– don’t let sun set on bad codedon’t let sun set on bad code

• Integration immediately follows Integration immediately follows developmentdevelopment

Page 64: EXtreme Programming. Past Methodologies Systems AnalysisSystems Analysis –60s and 70s –Waterfall Methodology Structured DesignStructured Design –70s and

The Real SummaryThe Real Summary

• Best Practices are Good ThingsBest Practices are Good Things

• XP takes them to the MAXXP takes them to the MAX

• XP is extremeXP is extreme– but extreme measures are often called forbut extreme measures are often called for

• Evidence in favor of XP is mountingEvidence in favor of XP is mounting

• Adopt what you likeAdopt what you like

• Good luck!Good luck!