1Extreme ProgrammingHow Agile Practices can make the differenceAniruddhaChakrabartiSr. Solution Architect
2AgendaAgile MethodologyAgile Manifesto & Agile PhilosophyDifferent Agile methodologiesExtreme Programming/XPBrief History of XPXP Values, Principles and PracticesCore XP ValuesXP PrinciplesDifferent XP Practices
3Agile MethodologyDefinition of Agile:Characterized by quickness, lightness, and ease of movement; nimble. Mentally quick or alert: an agile mind.Agile Methodology promotes: Project management process that encourages frequent inspection and adaptation; Leadership philosophy that encourages team work, self-organization and accountability; Set of engineering best practices that allow for rapid delivery of high-quality software; Business approach that aligns development with customer needs and company goals.
4Agile Philosophy: Agile ManifestoWe are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value:Individuals and interactionsoverprocesses and toolsWorking softwareovercomprehensive documentationCustomer collaborationover contract negotiationResponding to changeoverfollowing a planThat is, while there is value in the items on the right, we value the items on the left more.Kent Beck 	      	   Mike Beedle 	       Arie van Bennekum 	Alistair CockburnWard Cunningham         Martin Fowler 	       James Grenning 		Jim HighsmithAndrew Hunt 	   Ron Jeffries 	       Jon Kern 		Brian MarickRobert C. Martin 	   Steve Mellor 	       Ken Schwaber 		Jeff SutherlandDave Thomaswww.AgileManifesto.org, http://AgileManifesto.org/history.html
5Agile PhilosophyIndividuals and interactions over processes and toolsSoftware without documentation is a disaster. Code is not the ideal medium for communicating the rationale and structure of a systemHowever, too much documentation is worse than too little. Huge software documents take a great deal of time to produce, and even more time to keep in sync with the code.Working software over comprehensive documentationSoftware without documentation is a disaster. Code is not the ideal medium for communicating the rationale and structure of a systemHowever, too much documentation is worse than too little. Huge software documents take a great deal of time to produce, and even more time to keep in sync with the code.Customer collaboration over contract negotiationResponding to change over following a plan
6Different Agile MethodologiesExtreme Programming / XP (Kent Beck, Ward Cunningham, Martin Fowler, Ron Jeffries)Scrum (Ken Schwaber, Jeff Sutherland)Crystal (Alistair Cockburn)DSDMLean Software DevelopmentFeature Driven Development / FDD (Peter Coad)XBreedAdaptive Software Development / ASD (Jim Highsmith)
7What is Extreme Programming (XP)XP is actually a deliberate and disciplined approach to software development.Discipline of software development based on Values of simplicity, communication, feedback, and courage. Works by - Bringing the whole team together in the presence of simple practicesEnough feedback to enable the team to see where they are and to tune the practices to their unique situation. Proven at companies like Bayerische Landesbank, Credit Swiss Life, DaimlerChrysler, First Union National Bank, Ford Motor Company and UBS.Empowers developers to confidently respond to changing customer requirements, even late in life cycle.
8Agile & XP: A bit of HistoryAgile software development evolved in mid-90s as part of a reaction against "heavyweight" methods.Initially they were called "lightweight methods”.In 2001, prominent members of the community met at Snowbird, Utah, and adopted the name "agile methods".Root of XP lies in Smalltalk communityEarly 90s: Kent Beck and Ward Cunningham came up with an approach to software development that made every thing simple and more efficient.Mar 96: Kent started Chrysler Comprehensive Compensation/C3) at DaimlerChrysler using new concepts in software development.The result was Extreme Programming (XP) methodology.
9XP Values, Principles & PracticesPrinciples are bridge between Values, which is synthetic and abstract, and Practices, which tell how to actually develop software. ValuesPracticesPrinciplesPlanning Game
Short Release
Continuous Integration
Simple Design
Pair Programming
…
Communication
Simplicity
Feedback
…
Humanity
Improvement
Quality
Accepted Responsibility
…10Core Values of XPCommunicationProblems with projects can invariably be traced back to somebody not talking to somebody else about somethingSimplicityDo the simplest thing that could possibly workFeedbackShould always be able to measure the system and to know how far it is from the needed featuresConcrete feedback early and often from the customer, from the team, and from real end users gives you more opportunity to steer your effortsClose customer contact & availability of automated testsCourageRespect
11Basic Fundamental PrinciplesRapid FeedbackAssume SimplicityMake Incremental ChangeEmbracing ChangeQuality Workwww.AgileManifesto.org/principles.htmlhttp://en.csharp-online.net/Introducing_XP%E2%80%94Fifteen_XP_Principles
12Further PrinciplesTeach Learning Make a Small Initial Investment Play to Win – do what is required to succeed  Concrete Experiments – use proper reports Open, honest Communication Work with people's instincts - not against them Accepted Responsibility Local Adaptation / Accept as NecessaryTravel LightHonest Measurement
13XP Practices (Rules)Planning related practices

Agile Practices - eXtreme Programming

  • 1.
    1Extreme ProgrammingHow AgilePractices can make the differenceAniruddhaChakrabartiSr. Solution Architect
  • 2.
    2AgendaAgile MethodologyAgile Manifesto& Agile PhilosophyDifferent Agile methodologiesExtreme Programming/XPBrief History of XPXP Values, Principles and PracticesCore XP ValuesXP PrinciplesDifferent XP Practices
  • 3.
    3Agile MethodologyDefinition ofAgile:Characterized by quickness, lightness, and ease of movement; nimble. Mentally quick or alert: an agile mind.Agile Methodology promotes: Project management process that encourages frequent inspection and adaptation; Leadership philosophy that encourages team work, self-organization and accountability; Set of engineering best practices that allow for rapid delivery of high-quality software; Business approach that aligns development with customer needs and company goals.
  • 4.
    4Agile Philosophy: AgileManifestoWe are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value:Individuals and interactionsoverprocesses and toolsWorking softwareovercomprehensive documentationCustomer collaborationover contract negotiationResponding to changeoverfollowing a planThat is, while there is value in the items on the right, we value the items on the left more.Kent Beck Mike Beedle Arie van Bennekum Alistair CockburnWard Cunningham Martin Fowler James Grenning Jim HighsmithAndrew Hunt Ron Jeffries Jon Kern Brian MarickRobert C. Martin Steve Mellor Ken Schwaber Jeff SutherlandDave Thomaswww.AgileManifesto.org, http://AgileManifesto.org/history.html
  • 5.
    5Agile PhilosophyIndividuals andinteractions over processes and toolsSoftware without documentation is a disaster. Code is not the ideal medium for communicating the rationale and structure of a systemHowever, too much documentation is worse than too little. Huge software documents take a great deal of time to produce, and even more time to keep in sync with the code.Working software over comprehensive documentationSoftware without documentation is a disaster. Code is not the ideal medium for communicating the rationale and structure of a systemHowever, too much documentation is worse than too little. Huge software documents take a great deal of time to produce, and even more time to keep in sync with the code.Customer collaboration over contract negotiationResponding to change over following a plan
  • 6.
    6Different Agile MethodologiesExtremeProgramming / XP (Kent Beck, Ward Cunningham, Martin Fowler, Ron Jeffries)Scrum (Ken Schwaber, Jeff Sutherland)Crystal (Alistair Cockburn)DSDMLean Software DevelopmentFeature Driven Development / FDD (Peter Coad)XBreedAdaptive Software Development / ASD (Jim Highsmith)
  • 7.
    7What is ExtremeProgramming (XP)XP is actually a deliberate and disciplined approach to software development.Discipline of software development based on Values of simplicity, communication, feedback, and courage. Works by - Bringing the whole team together in the presence of simple practicesEnough feedback to enable the team to see where they are and to tune the practices to their unique situation. Proven at companies like Bayerische Landesbank, Credit Swiss Life, DaimlerChrysler, First Union National Bank, Ford Motor Company and UBS.Empowers developers to confidently respond to changing customer requirements, even late in life cycle.
  • 8.
    8Agile & XP:A bit of HistoryAgile software development evolved in mid-90s as part of a reaction against "heavyweight" methods.Initially they were called "lightweight methods”.In 2001, prominent members of the community met at Snowbird, Utah, and adopted the name "agile methods".Root of XP lies in Smalltalk communityEarly 90s: Kent Beck and Ward Cunningham came up with an approach to software development that made every thing simple and more efficient.Mar 96: Kent started Chrysler Comprehensive Compensation/C3) at DaimlerChrysler using new concepts in software development.The result was Extreme Programming (XP) methodology.
  • 9.
    9XP Values, Principles& PracticesPrinciples are bridge between Values, which is synthetic and abstract, and Practices, which tell how to actually develop software. ValuesPracticesPrinciplesPlanning Game
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
    …10Core Values ofXPCommunicationProblems with projects can invariably be traced back to somebody not talking to somebody else about somethingSimplicityDo the simplest thing that could possibly workFeedbackShould always be able to measure the system and to know how far it is from the needed featuresConcrete feedback early and often from the customer, from the team, and from real end users gives you more opportunity to steer your effortsClose customer contact & availability of automated testsCourageRespect
  • 24.
    11Basic Fundamental PrinciplesRapidFeedbackAssume SimplicityMake Incremental ChangeEmbracing ChangeQuality Workwww.AgileManifesto.org/principles.htmlhttp://en.csharp-online.net/Introducing_XP%E2%80%94Fifteen_XP_Principles
  • 25.
    12Further PrinciplesTeach LearningMake a Small Initial Investment Play to Win – do what is required to succeed Concrete Experiments – use proper reports Open, honest Communication Work with people's instincts - not against them Accepted Responsibility Local Adaptation / Accept as NecessaryTravel LightHonest Measurement
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
    14XP Practices: PlanningUserStoriesFunctionalities of the system are described using stories, short descriptions of customer-visible functionalitiesPlanning Game/Release PlanningSmall & Short ReleasesEvery release should be as small as possible, containing the most valuable business requirements.It is far better to plan a month or two at a time than six months or a year at a timeIterative DevelopmentDaily Standup meeting
  • 32.
    15Planning GameNeither businessconsiderations nor technical considerations should be paramount.
  • 33.
    Software development isalways an evolving dialog between the possible and the desirable.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
    Detailed Scheduling16Daily StandupMeetingProblem: Typical project meeting - most attendees do not contribute, but attend just to hear the outcome. Large amount of developer time is wasted to gain a trivial amount of communication. Having many people attend every meeting drains resources from the project and also creates a scheduling nightmare.Solution: Short and brief standup (no one seats to keep it short)Should be less than 15 minsA stand up meeting every morning is used to communicate problems, solutions, and promote team focus. Not a Status Reporting MeetingIt's Not Just Standing Up: Patterns of Daily Stand-up Meetings – Jason Yip
  • 44.
    17Daily Standup Meeting(Cont’d)Everyone answers three questions – What did I accomplish yesterday? What will I do today? What obstacles are impeding my progress?Focus on the Backlog Same Place, Same Time Who attends the daily stand-up? – All HandsTime-box the meetingLast Arrival Speaks First
  • 45.
    18XP Practices: DesigningSimpleDesign (avoid YAGNI)System MetaphorCRC Cards: Class, Responsibility, CollaboratorSpike SolutionsNo functionality is added earlyDesign Improvement / RefactoringRelated Article: Is Design Dead? – Martin Fowler
  • 46.
    19Simple DesignMisconception aboutXP: XP advices to avoid designTruth: XP advices Avoid too much Up Front Design / extra design at early phase, as requirement is not clear – Evolutionary Approach Simple and elegant designRuns all the tests.Has no duplicated logic. Be wary of hidden duplication like parallel class hierarchies.States every intention important to the programmers.Has the fewest possible classes and methods.Avoid over designAvoid design that would not be required: YAGNI
  • 47.
    20CRC CardsUsed toidentify Classes, Responsibilities and Collaborations between objects.Created from index cards with these info - Class name Its Super and Sub classes (if applicable) Responsibilities of the class. Names of other classes with which the class will collaborate to fulfill its responsibilities. AuthorRelated Article: http://c2.com/doc/oopsla89/paper.htmlUsing CRC cards – Alistair Cockburnhttp://www.extremeprogramming.org/rules/crccards.html
  • 48.
    21XP Practices: Coding/ReleaseOnsiteCustomer: Customer is always availableCoding StandardsTest Driven Development (TDD): code unit tests firstPair ProgrammingContinuous Integration (CI)Ten-minute buildDaily DeploymentCollective Code OwnershipSustainable Pace: 40-hour week
  • 49.
    22Continuous Integration (CI)Maintaina single source repository Automate the build Make your build self-testingEveryone commits every dayEvery commit should build the mainline on an Integration machineKeep the build fastTest in a clone of the production environmentMake it easy for anyone to get the latest executableEveryone can see what's happeningAutomate deploymentRelated Article: Continuous Integration – Martin Fowler
  • 50.
    Steps to dofor CI with a Source Control23Dev begins by taking a copy of current integrated source onto local dev machine: Check out from Source ControlDev makes the necessary changes - It consist of both altering the code, and also adding or changing automated tests. Dev carries out an automated build on dev machine - takes source code in working copy, compiles and runs the automated tests. Update working copy with changes in Source Control and rebuild. If other’s changes clash with dev’s changes dev will fix this and repeat until he can build a working copy that is properly synchronized with the mainline. Once dev have made his own build of a properly synchronized working copy he can finally commit changes into the mainline Build again, but this time on an integration machine based on the mainline code. Only when this build succeeds can we say that my changes are done
  • 51.
    24XP Practices: TestingAllcode should have Unit TestsAll code must pass all unit tests before it can be released.When a bug is found tests are created.Unit Tests and Acceptance tests are run often and the score is published.
  • 52.
    25XP Practices: Team& HumanSeat togetherWhole team approachInformative workspaceEnergized WorkPair ProgrammingTeam Continuity
  • 53.
    26ResourcesExtreme Programming Explained:Embrace Change – Kent Beck (Ver 1 and 2)Apress Pro .NET 2.0 Extreme Programming ebookRefactoring: Improving the Design of Existing Code - Matrin Fowler, Kent Beck …Agile Project Management with Scrum - Ken Schwaber  www.ExtremeProgramming.orgwww.AgileManifesto.orghttp://www.xprogramming.com