Software Engineering Extreme Programming

Software Engineering Extreme Programming

Software Engineering Extreme Programming Software Engineering 2012-2013 Based on presentation by Mira Balaban Department of Computer Science Ben-Gurion university Based on: K. Beck: Extreme Programming Explained. E. M. Burke and B.M. Coyner: Java Extreme Programming Cookbook. L. Crispin and T. House: Testing Extreme Programming http://www.extremeprogramming.org And slides of: Kent Beck and Ward Cunningham, Laurie Williams, Vera Peeters and Pascal Van Cauwenberghe, Ian Sommerville: http://www.comp.lancs.ac.uk/computing/resources/IanS/SE7/Presentations/index.html Extreme programming Perhaps the best-known and most widely used agile method. Extreme Programming (XP) takes an ‘extreme’ approach to iterative development. New versions may be built several times per day; Increments are delivered to customers every 2 weeks; All tests must be run for every build and the build is only accepted if tests run successfully. Software Engineering, 2012 Extreme Programming 2 Extreme Programming Explained Software Engineering, 2012 Extreme Programming 3 What is Extreme about XP? An analogy made by Beck and Cunningham: A rheostat is a common electrical control. Most volume controls on audio devices are rheostats. If you want silence, turn the knob all the way to one side. For maximum volume, turn the knob all the way to the other side. XP treats good practices in programming as if they had rheostats, and turns all of them all the way up. Software Engineering, 2012 Extreme Programming 4 Some eXtreme Practices Are code inspections good? Then code in pairs—all code is inspected all the time! Is testing good? Then write the unit test before the code, automate testing, and run all tests all the time. Is customer contact good? Then locate a customer representative in the team, so that you have access to them all the time. Software Engineering, 2012 Extreme Programming 5 From Waterfall to Extreme Programming Software Engineering, 2012 Extreme Programming 6 Next Step: XP Extreme Programming takes the idea of incremental development to the next level. Plan, analyze, and design a little at a time. XP is a software development “culture”. It is based on 4 basic values (“commandments”) that are achieved by employing 12 (or 13) simple rules (practices). Software Engineering, 2012 Extreme Programming 7 Purpose of XP – Reduce the cost of change Under certain circumstances, the exponential rise in the cost of changing software over time can be flattened. If we can flatten the curve, old assumptions about the best way to develop software no longer hold. (kent Beck) ---- Traditional Cost of change Cost of ---- XP expected cost of change change Requirements Analysis Design Testing Implementation Production Software Engineering, 2012 Extreme Programming 8 Purpose of XP – Reduce the cost of change: The cost of change may not rise dramatically over time This is the technical premise of XP. If the cost of change rose slowly over time, you would act completely differently from how you do under the assumption that costs rise exponentially. You would make big decisions as late in the process as possible, to defer the cost of making the decisions and to have the greatest possible chance that they would be right. You would only implement what you had to, in hopes that the needs you anticipate for tomorrow wouldn't come true. You would introduce elements to the design only as they simplified existing code or made writing the next bit of code simpler. If change is ruinously expensive, you would be crazy to charge ahead without careful forethought. But if change stays cheap, the additional value and reduced risk of early concrete feedback outweighs the additional cost of early change. Keeping the cost of change low doesn't just happen magically. -There are technologies and practices that keep software pliable. (Kent Beck) Software Engineering, 2012 Extreme Programming 9 What is Extreme programming Extreme programming is a discipline of software development based on values of simplicity, communication, feedback, courage. It works by bringing the whole team together in the presence of simple practices, with enough feedback to tune practices to their unique situation. Whole team: the best teams have no specialists only general contributors with special skills. Planning: XP addresses two key questions in software development: predicting what will be accomplished by the due date, and determining what to do next. Software Engineering, 2012 Extreme Programming 10 The 4 basic values of XP We will be successful when we have a style that celebrates a consistent set of values that serve both human and commercial needs: communication, simplicity, feedback, courage. Kent Beck Software Engineering, 2012 Extreme Programming 11 The 4 basic values of XP Communication: Use person to person communication instead of written documents where possible. Simplicity: Eliminate unnecessary elements of building software. Feedback: Use constant software testing as a major source of quality feedback. Courage: Possible when you take the simplest possible approach and employ a process high in communication. Software Engineering, 2012 Extreme Programming 12 The Rules Communication Rules Simplicity Rules Feedback Rules Courage Rules Software Engineering, 2012 Extreme Programming 13 Communication Rules (practices) Onsite customer. Pair programming. Coding standards. Software Engineering, 2012 Extreme Programming 14 Communication Rules 1. On Site Customer At least one customer is always present. This customer is available full-time to: Answer questions about the system. Negotiate the timing and scheduling of releases. Make all decisions that affect business goals. The customer writes functional tests (with the help of Development). Software Engineering, 2012 Extreme Programming 15 Communication Rules 2. Pair Programming All programming is done with two coders at the same machine. The programmers must share one mouse, keyboard, screen, etc. At least two people are always intimately familiar with every part of the system, and every line of code is reviewed as it's written. Software Engineering, 2012 Extreme Programming 16 Communication Rules Here is how pair programming works: You pick out a user story for your next task. A user story is a requirement from the customer. Stories are typically written on index cards, and the customer decides which stories are the most important. You ask for help from another programmer. The two of you work together on a small piece of functionality. Try to work on small tasks that take a few hours. After the immediate task is complete, pick a different partner or offer to help someone else. Eric Burke and Brian Coyner Software Engineering, 2012 Extreme Programming 17 Pair Programming http://www.pairprogramming.com/ 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 • Shortcomings? Pair programming to please your boss is just frustrating. Pair programming to communicate, get feedback, simplify the system, catch errors, and bolster your courage makes a lot of sense . (Kent Beck) Software Engineering, 2012 Extreme Programming 18 Communication Rules Research Findings to Date Strong anecdotal evidence from industry “We can produce near defect-free code in less than half the time.” Empirical Study (An Empirical Study of the Tacit Knowledge Management Potential of Pair Programming Wilson, Dylan Garrett 2004) Pairs produced higher quality code 15% less defects (difference statistically significant) Pairs completed their tasks in about half the time 58% of elapsed time (difference not statistically significant) Most programmers reluctantly embark on pair programming Pairs enjoy their work more (92%) Pairs feel more confident in their work products (96%) India Technology Company 24% increase in productivity (KLOC/Person-Month) 10-fold reduction in defects. Software Engineering, 2012 Extreme Programming 19 Communication Rules 3. Coding Standards Agree upon standards for coding styles. Promotes ease of understanding and uniformity. No individual quirks that could complicate understanding and refactoring by the entire team. Do it My Way or Get Out.. ? No - The XP rules are rules that the Team chose to live by, and the Team says "Do it OUR way, or get out". Software Engineering, 2012 Extreme Programming 20 Simplicity Rules (practices) Metaphor. Simple design. Refactoring. Software Engineering, 2012 Extreme Programming 21 4. Metaphor Metaphor: A story that everyone-customers, programmers, and managers - can tell about how the system works Use metaphors to describe how the system should work. These analogies express the functionality of the system. Provides a simple way to remember naming conventions. The metaphor in XP replaces much of what other people call "architecture." The problem with calling the 10,000-meter view of the system an architecture is that architectures don't necessarily push the system into any sense of cohesion. http://www.xpexchange.net/english/intro/metaphor.html Software Engineering, 2012 Extreme Programming 22 Why metaphors work in XP You couldn't possibly start development with just a metaphor. There isn't enough detail there, and besides,

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    90 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us