Extreme Programming Kiran Pamnany. Software Engineering Computer programming as an engineering profession rather than an art or a craft Meet expectations:

Slides:



Advertisements
Similar presentations
Unified process(UP) UP is an OO system development methodology offered by Rational(Rational Rose) s/w, now a part of IBM Developed by Booach,Rambaugh,Jacobson--
Advertisements

Extreme Programming ( an introduction ).
Extreme Programming Kiran Pamnany. Software Engineering Computer programming as an engineering profession rather than an art or a craft Meet expectations:
Chapter 2 Modeling the Process and Life Cycle Shari L. Pfleeger
 Dr. Syed Noman Hasany.  Review of known methodologies  Analysis of software requirements  Real-time software  Software cost, quality, testing and.
29 September Interactions  There is no “right answer”  Typically people and product are fixed  … can adapt process  (which is where we will.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Rapid software development.
Alternate Software Development Methodologies
Software Life Cycles ECE 417/617: Elements of Software Engineering
Agile
Software Engineering. How many lines of code? Average CS1004 assignment: 200 lines Average CS4115 project: 5000 lines Corporate e-commerce project: 80,000.
Software Engineering.
Extreme Programming Mark Steverson. What Is Extreme Programming? ● Extreme Programming (XP) is a lightweight, agile methodology developed by Kent Beck.
Computer Engineering 203 R Smith Agile Development 1/ Agile Methods What are Agile Methods? – Extreme Programming is the best known example – SCRUM.
Objectives Explain the purpose and various phases of the traditional systems development life cycle (SDLC) Explain when to use an adaptive approach to.
Xtreme Programming. Software Life Cycle The activities that take place between the time software program is first conceived and the time it is finally.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Extreme Programming.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Introduction to RUP Spring Sharif Univ. of Tech.2 Outlines What is RUP? RUP Phases –Inception –Elaboration –Construction –Transition.
Chapter 3 – Agile Software Development 1Chapter 3 Agile software development.
Software Engineering Modern Approaches
Sofia Bulgaria Summer School IST eXPERT: Best Practice on e-Project Development 30 June - 2 July 2003 eXtreme programming.
Agile and XP Development Dan Fleck 2008 Dan Fleck 2008.
Software Processes Sumber dari : cc.ee.ntu.edu.tw/~farn/courses/SE/ch4.ppt.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software Processes.
Unified Process versus Extreme Programming. Outline Compare and contrast UP and XP  Processes / Disciplines  Management  Artefacts Risk management.
©Ian Sommerville 2000, Mejia-Alvarez 2009 Slide 1 Software Processes l Coherent sets of activities for specifying, designing, implementing and testing.
Software Processes lecture 8. Topics covered Software process models Process iteration Process activities The Rational Unified Process Computer-aided.
CPSC 2150 August 21, Chapter 1 Object Oriented Software Development This is an introductory course In this chapter we will look at 3 topics Challenges.
Coming up: What is Agile? XP Development Dan Fleck 2010 Dan Fleck 2010.
Extreme/Agile Programming Prabhaker Mateti. ACK These slides are collected from many authors along with a few of mine. Many thanks to all these authors.
Systems Design Approaches The Waterfall vs. Iterative Methodologies.
Object-oriented Analysis and Design Stages in a Software Project Requirements Writing Analysis Design Implementation System Integration and Testing Maintenance.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
Agile
Review of Software Process Models Review Class 1 Software Process Models CEN 4021 Class 2 – 01/12.
Chapter 3 Agile Software Development (1/2) Yonsei University 2 nd Semester, 2015 Sanghyun Park.
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 other methodologies 1 Method/Process = step-by-step description of the steps involved.
Chapter 2 Software processes. Topics covered Software process models Process activities Coping with change.
Software Development Overview CPSC 315 – Programming Studio Spring 2013.
AP-1 4. Agile Processes. AP-2 Agile Processes Focus on creating a working system Different attitude on measuring progress XP Scrum.
Lecture 4 – XP and Agile 17/9/15. Plan-driven and agile development Plan-driven development A plan-driven approach to software engineering is based around.
Test Driven Development Daniel Brown dxb17u. Introduction Originates from Extreme Programming (XP) Proposed by Kent Beck in Test Driven Development.
Requirements Engineering Requirements Engineering in Agile Methods Lecture-28.
Extreme Programming. Extreme Programming (XP) Formulated in 1999 by Kent Beck, Ward Cunningham and Ron Jeffries Agile software development methodology.
Agile. Processes Waterfall Traditional With prototyping Sprial Agile Dynamic Systems Development Method (DSDM) Scrum Crystal eXtreme Programming (XP)
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
Agenda: Overview of Agile testing Difference between Agile and traditional Methodology Agile Development Methodologies Extreme Programming Test Driven.
Software Engineering, 8th edition. Chapter 4 1 Courtesy: ©Ian Sommerville 2006 FEB 13 th, 2009 Lecture # 5 Software Processes.
CS223: Software Engineering Lecture 18: The XP. Recap Introduction to Agile Methodology Customer centric approach Issues of Agile methodology Where to.
Extreme programming (XP) Advanced Software Engineering Dr Nuha El-Khalili.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software Processes.
Industrial Software Development Process Bashar Ahmad RISC Software GmbH.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
Coming up: What is Agile? XP Development Dan Fleck 2010 Dan Fleck 2010.
Project Management Software development models & methodologies
AGILE METHODS Curtis Cook CS 569 Spring 2003.
Embedded Systems Software Engineering
Software Development.
Approaches to Systems Development
Software Processes.
Introduction to Software Engineering
What do you need to know about XP?
System DEVELOPMENT LIFE CYCLE MODELS
Chapter 3 – Agile Software Development
Coming up: What is Agile?
Extreme Programming.
Presentation transcript:

Extreme Programming Kiran Pamnany

Software Engineering Computer programming as an engineering profession rather than an art or a craft Meet expectations: Functionality Reliability Cost Delivery schedule

Methodologies Methodology: codified set of recommended practices No consensus: Waterfall model Spiral model Rational Unified Process (RUP) Extreme Programming (XP)

Classic process steps Requirements Analysis Specification Design and Architecture Coding Testing Documentation Maintenance

Waterfall model Proposed in 1970 by W. W. Royce Development flows through steps: Requirements analysis Architectural design Detailed design Coding, debugging and unit testing Integration and system testing Deployment, operation and maintenance

Waterfall model (cont.) Pros: Track progress easily due to clear stages Easily identifiable milestones and deliverables Cons: Inflexible: difficult to respond to changing requirements Design and coding discover requirements inconsistencies Some problems not discovered until system testing

Spiral model Defined in 1986 by Barry Boehm Modified waterfall Software is developed in a series of incremental releases Early releases are prototypes Later releases become increasingly complete Receive feedback after each release

Spiral model (cont.) Pros: Systematic and stepwise, but in an iterative framework Estimates get more realistic as work progresses Some ability to cope with changing requirements Cons: Time-intensive process Not extensively used

Rational Unified Process (RUP) Defined in 1997 by Grady Booch, Ivar Jacobson and James Rumbaugh General framework to describe specific development processes Designed to be tailored for a given software project with consideration for its size and type Recognized to be particularly applicable to large projects with large teams

RUP Phases Inception Shared understanding of the system with the customer Elaboration Architecture to build the system Construction Developing the system Transition Customer takes ownership of system

RUP Guidelines Develop iteratively Deal with changing requirements Address high risk items as the highest priority tasks at each iteration Ideally, each iteration has an executable release Manage requirements Document functionality, constraints, design decisions, business requirements Define use cases and scenarios

RUP Guidelines (cont.) Use component architecture For extensibility and reusability (CORBA/COM) Model software visually Abstraction using UML Verify software quality Plan quality control and assessment Involve all team members Control changes to software Use secure workspaces

RUP Workflows - Typical Project (Source: George Stepanek, 2004)

RUP Criticism ‘High ceremony methodology’ Bureaucratic: process for everything Slow: must follow process to comply Excessive overhead: rationale, justification, documentation, reporting, meetings, permission

Extreme Programming (XP) Formulated in 1999 by Kent Beck, Ward Cunningham and Ron Jeffries Agile software development methodology (others: Scrum, DSDM) Developed in reaction to high ceremony methodologies

XP: Why? Previously: Get all the requirements before starting design Freeze the requirements before starting development Resist changes: they will lengthen schedule Build a change control process to ensure that proposed changes are looked at carefully and no change is made without intense scrutiny Deliver a product that is obsolete on release

XP: Embrace Change Recognize that: All requirements will not be known at the beginning Requirements will change Use tools to accommodate change as a natural process Do the simplest thing that could possibly work and refactor mercilessly Emphasize values and principles rather than process

XP Practices (Source:

XP Practices: Whole Team All contributors to an XP project are one team Must include a business representative--the ‘Customer’ Provides requirements Sets priorities Steers project Team members are programmers, testers, analysts, coach, manager Best XP teams have no specialists

XP Practices: Planning Game Two key questions in software development: Predict what will be accomplished by the due date Determine what to do next Need is to steer the project Exact prediction (which is difficult) is not necessary

XP Practices: Planning Game XP Release Planning Customer presents required features Programmers estimate difficulty Imprecise but revised regularly XP Iteration Planning Two week iterations Customer presents features required Programmers break features down into tasks Team members sign up for tasks Running software at end of each iteration

XP Practices: Customer Tests The Customer defines one or more automated acceptance tests for a feature Team builds these tests to verify that a feature is implemented correctly Once the test runs, the team ensures that it keeps running correctly thereafter System always improves, never backslides

XP Practices: Small Releases Team releases running, tested software every iteration Releases are small and functional The Customer can evaluate or in turn, release to end users, and provide feedback Important thing is that the software is visible and given to the Customer at the end of every iteration

XP Practices: Simple Design Build software to a simple design Through programmer testing and design improvement, keep the software simple and the design suited to current functionality Not a one-time thing nor an up-front thing Design steps in release planning and iteration planning Teams design and revise design through refactoring, through the course of the project

XP Practices: Pair Programming All production software is built by two programmers, sitting side by side, at the same machine All production code is therefore reviewed by at least one other programmer Research into pair programming shows that pairing produces better code in the same time as programmers working singly Pairing also communicates knowledge throughout the team

XP Practices: Test-Driven Development Teams practice TDD by working in short cycles of adding a test, and then making it work Easy to produce code with 100 percent test coverage These programmer tests or unit tests are all collected together Each time a pair releases code to the repository, every test must run correctly

XP Practices: Design Improvement Continuous design improvement process called ‘refactoring’: Removal of duplication Increase cohesion Reduce coupling Refactoring is supported by comprehensive testing--customer tests and programmer tests

XP Practices: Continuous Integration Teams keep the system fully integrated at all times Daily, or multiple times a day builds Avoid ‘integration hell’ Avoid code freezes

XP Practices: Collective Code Ownership Any pair of programmers can improve any code at any time No ‘secure workspaces’ All code gets the benefit of many people’s attention Avoid duplication Programmer tests catch mistakes Pair with expert when working on unfamiliar code

XP Practices: Coding Standard Use common coding standard All code in the system must look as though written by an individual Code must look familiar, to support collective code ownership

XP Practices: Metaphor XP Teams develop a common vision of the system With or without imagery, define common system of names Ensure everyone understands how the system works, where to look for functionality, or where to add functionality

XP Practices: Sustainable Pace Team will produce high quality product when not overly exerted Avoid overtime, maintain 40 hour weeks ‘Death march’ projects are unproductive and do not produce quality software Work at a pace that can be sustained indefinitely

XP Values Communication Simplicity Feedback Courage

XP Values: Communication Poor communication in software teams is one of the root causes of failure of a project Stress on good communication between all stakeholders--customers, team members, project managers Customer representative always on site Paired programming

XP Values: Simplicity ‘Do the Simplest Thing That Could Possibly Work’ Implement a new capability in the simplest possible way Refactor the system to be the simplest possible code with the current feature set ‘You Aren’t Going to Need It’ Never implement a feature you don’t need now

XP Values: Feedback Always a running system that delivers information about itself in a reliable way The system and the code provides feedback on the state of development Catalyst for change and an indicator of progress

XP Values: Courage Projects are people-centric Ingenuity of people and not any process that causes a project to succeed

XP Criticism Unrealistic--programmer centric, not business focused Detailed specifications are not written Design after testing Constant refactoring Customer availability 12 practices are too interdependent

XP Thoughts The best design is the code. Testing is good. Write tests before code. Code is complete when it passes tests. Simple code is better. Write only code that is needed. Reduce complexity and duplication. Keep code simple. Refactor. Keep iterations short. Constant feedback.

Software Quality: Another View A programmer presenting an elegant but ‘inefficient’ solution, talks of the inelegant but ‘efficient’ solution […] but your solution doesn’t work: if the solution doesn’t have to work, then Begin..End is a valid solution. Gerald Weinberg, ‘The Psychology of Computer Programming’, 1972

Software Quality: Another View […] software engineering has accepted as its charter “How to program if you cannot.” E.W. Dijkstra, ‘The Cruelty of Really Teaching Computer Science’, 1988 Computer programming as a branch of mathematics--formal provability of a program is a major criterion for correctness Program correctness is ‘constitutional’; an incorrect program is worthless or of negative worth

Formal Verification The act of proving or disproving a system’s correctness with respect to a formal specification or property, using formal methods System types include FSM, Petri nets, timed and hybrid automata, cryptographic protocols, combinatorial circuits, etc. Properties to be verified are described in temporal logics; approaches include state space enumeration, abstract interpretation, etc.

Formal Methods Mathematical techniques for the specification, development and verification of software and hardware systems Classified as: Denotational semantics Operational semantics Axiomatic semantics

The Way Forward? ‘High ceremony’ software engineering methodologies in disfavor Agile software development methodologies in increasing use, but with significant criticism Formal methods will never have a significant impact until they can be used by people that don’t understand them. T. Melham

Useful tools--Testing Junit Framework to write repeatable tests (Kent Beck and Erich Gamma) Assertions for testing expected results Test fixtures to share common data Test runners Key to TDD

Useful tools--Analysis Insure++ (Parasoft) Memory debugger (accesses to freed memory, array bounds, freeing twice, etc.) Inserts code Purify (Rational) Another memory debugger Link only Valgrind…

Useful tools--Analysis Prevent (Coverity) Static analysis (interprocedural data flow) Buffer overflow, dangling stack references, flawed branch logic, memory leaks, null pointer dereferences, use of freed/uninitialized resources, etc. 20% false positives