Скачать презентацию Agile XP and Scrum Overview Development Скачать презентацию Agile XP and Scrum Overview Development

b0f5edda74e5c0145bafed4876cfed01.ppt

  • Количество слайдов: 66

Agile, XP and Scrum Agile, XP and Scrum

Overview • Development Methodologies (until this point) • Agile Development • Extreme Programming (XP) Overview • Development Methodologies (until this point) • Agile Development • Extreme Programming (XP) • Scrum • Develop Your Own Methodology

Methodologies Methodologies

What is a Software Development Methodology? • formalized process or set of practices for What is a Software Development Methodology? • formalized process or set of practices for creating and maintaining software • It’s a Life Cycle • A set of rules you have to follow • Standardization • System building and engineering approach for organizing software projects

The Waterfall Process • The traditional development process: System Requirements Software Requirements Analysis Program The Waterfall Process • The traditional development process: System Requirements Software Requirements Analysis Program Design • Or at worst … Coding Testing Operations • But this always ends up happening!

Formal Processes • Formal efforts to “fix” the problem System Requirements Software Requirements Specification Formal Processes • Formal efforts to “fix” the problem System Requirements Software Requirements Specification Preliminary Design Document Preliminary Design Analysis Program Design Coding Preliminary Design Testing Usage Analysis Prelim. Revie w Program Design Coding Final Design UI Design Document Operating Instructions Design Revie w Testing Test Plan Operations

Agile Development Agile Development

Manifesto Manifesto

Agile Manifesto “Our highest priority is to satisfy the customer through early and continuous Agile Manifesto “Our highest priority is to satisfy the customer through early and continuous delivery of valuable software“ Source: http: //agilemanifesto. org/

Agile Methodologies • e. Xtreme Programming (XP) • Scrum • Feature-Driven Development (FDD) • Agile Methodologies • e. Xtreme Programming (XP) • Scrum • Feature-Driven Development (FDD) • Adaptive Software Development (ASD) • Dynamic System Development Model (DSDM) • Agile Unified Process (AUP) • Crystal family of methodologies • Software Oriented Architecture (SOA) • Microservices

e. Xtreme Programming e. Xtreme Programming

The XP Guru: Kent Beck • e. Xtreme Programming • The most prominent agile The XP Guru: Kent Beck • e. Xtreme Programming • The most prominent agile development methodology 1 st ed. Oct 1999 2 nd ed. Nov 2004 Kent Beck

XP XP

The 12 Key Practices • • • The Planning Game Small Releases Metaphor Simple The 12 Key Practices • • • The Planning Game Small Releases Metaphor Simple Design Test-Driven Development Refactoring Pair Programming Collective Ownership Continuous Integration 40 -Hour Workweek On-site Customer Coding Standards

Game Theory • In economics, a game is something in which Game Theory • In economics, a game is something in which "players select actions and the payoffs depend on the actions of all players. ” • The study of these games "deals with strategies for maximizing gains and minimizing losses. . . [and are] widely applied in the solution of various decision making problems. "

1. Planning Game 1. Planning Game

Plannig Game Plannig Game

Before the game • Accordingly, the planning game requires the participation of both customers Before the game • Accordingly, the planning game requires the participation of both customers and programmers. • (Testers may assist, but they do not have an explicit role in the planning game. ) • It's a cooperative game; the team as a whole wins or loses, not individual players.

Assumptions • programmers have the most information about costs—they're most qualified to say how Assumptions • programmers have the most information about costs—they're most qualified to say how long it will take to implement a story—they estimate. • customers have the most information about value—they're most qualified to say what is important—they prioritize.

Planning Steps • Anyone creates a story or selects an unplanned story. • Programmers Planning Steps • Anyone creates a story or selects an unplanned story. • Programmers estimate the story. • Customers place the story into the plan in order of its relative priority. • Repeat until all stories have been estimated and placed into the plan.

What is Story? • Although stories are short, they still have two important characteristics. What is Story? • Although stories are short, they still have two important characteristics. • Stories represent customer value and are written in the customers' terminology. (The best stories are actually written by customers. ) They describe an end-result that the customer values, not implementation details. • Stories have clear completion criteria. Customers can describe an objective test that would allow programmers to tell when they've successfully implemented the story.

What is not Story? • The following examples are not stories: • What is not Story? • The following examples are not stories: • "Automate integration build" does not represent customer value. • "Deploy to staging server outside of the firewall" describes implementation details rather than an endresult, and it doesn't use customer terminology. "Provide demo that customer review board can use" would be better. • "Improve performance" has no clear completion criteria. Similarly, "Make it fast enough for my boss to be happy" lacks objective completion criteria. "Searches complete within one second" is better.

Stories • Story Cards • Customer Centric • Splitting and Combining Stories • Some Stories • Story Cards • Customer Centric • Splitting and Combining Stories • Some Special Types • Documentation Stories • Bug Stories • Non-Functional Stories • Spike Stories

User Stories User Stories

Game Process • The team goes through all the items and chooses the one Game Process • The team goes through all the items and chooses the one which has the lowest effort. Write the number “ 2” on this card (usually in the bottom right corner). • The team looks at the item with the highest value. • Each team member thinks about how much effort the team will expend to fully complete all the work for the item. Comparing this work to the work effort for the smallest item, each team member selects a card that represents this relative effort. For example, if you think that it requires ten times the effort, you would select the “ 20” card. It is not permissible to select two cards. • Each team member places their selected card, face down, on the table. Once all team members have done this, turn the cards over. • If all team members show the same value, then write the value on the item and go back to step three for the next item. (Or if there are no more items, then the process is complete. ) • The person with the highest and the lowest value cards both briefly explain why they voted the way they did. If there is a Product Owner present, this person can add any clarifications about the item. • For any given item, if a person is highest or lowest more than once, then each explanation must include new information or reasoning. • Once explanations are complete, the team members collect their cards and go back to step three.

2. Metaphor • Guide all development and conversations with a simple shared story of 2. Metaphor • Guide all development and conversations with a simple shared story of how the whole system works • Gives the team a whole picture of describing the system, where new parts fit, etc. • Words used to identify technical entities should be chosen from the metaphor • The default metaphor is the business domain, and it’s usually just fine

Experience • Metaphors are good idea • People should know the business needs and Experience • Metaphors are good idea • People should know the business needs and how their work fits in the project

Domain-Driven Design Domain-Driven Design

3. Release Planning • Requirements via User Stories • Short cards with natural language 3. Release Planning • Requirements via User Stories • Short cards with natural language description of what a customer wants • Prioritized by customer • Resource and risk estimated by developers • Via “The Planning Game” • Play the Planning Game after each increment

Experience • Requirements specification (SRS) is better than user stories • Written documentation works Experience • Requirements specification (SRS) is better than user stories • Written documentation works well for large projects • I prefer prototyping the user interface as source of documentation • Sometimes its is hard to estimate the required resources • Small releases have less risk

4. Testing • Test-Driven Development (TDD) • Write tests before code • Tests are 4. Testing • Test-Driven Development (TDD) • Write tests before code • Tests are automated • Often use x. Unit framework • Must run at 100% before proceeding • Acceptance Tests • Written with the customer • Acts as “contract” • Measure of progress

Test-Driven Development • Developers write unit tests before coding • Motivates coding • Improves Test-Driven Development • Developers write unit tests before coding • Motivates coding • Improves design: cohesion and coupling • Provides regression tests • Provides specification by example public void Test. Multiplication() { Dollar five = Money. dollar(5); Assert. Equal(new Dollar(10), five. times(2)); Assert. Equal(new Dollar(15), five. times(3)); }

TDD, BDD, ATDD(Acceptance Test Driven Design), STDD(Story Test Driven Design) TDD(Test Driven Design): Get TDD, BDD, ATDD(Acceptance Test Driven Design), STDD(Story Test Driven Design) TDD(Test Driven Design): Get Something working now And perfect it later BDD(Behaviour-Driven Development) A part of DDD(domain driven design) Functional Documentation

TDD, BDD, ATDD TDD, BDD, ATDD

Experience • TDD is good for most projects, not for all • The real Experience • TDD is good for most projects, not for all • The real world is different: you always need the functionality "for tomorrow"! • I use unit testing for complex logic only • Testing simple logic is overhead

5. Pair Programming • Two software engineers work on one task at one computer 5. Pair Programming • Two software engineers work on one task at one computer • The driver has control of the keyboard and mouse and creates the implementation • The navigator watches the driver’s implementation • Identifies defects and participates in ondemand brainstorming • The roles of driver and observer are periodically rotated

Pair Programming • • Pairs produce higher quality code Pairs complete their tasks faster Pair Programming • • Pairs produce higher quality code Pairs complete their tasks faster Pairs enjoy their work more Pairs feel more confident in their work

Pair Programming Pair Programming

Experience • Pair programming is great for complex and critical logic • When developers Experience • Pair programming is great for complex and critical logic • When developers need good concentration • Where quality is really important • Especially during design • Reduces time wasting, e. g. ICQ chatting • Trivial tasks can be done alone • Peer reviews instead pair programming is often alternative

6. Refactoring • Improve the design of existing code without changing its functionality • 6. Refactoring • Improve the design of existing code without changing its functionality • Relies on unit testing to ensure the code is not broken • Bad smells in code: • • • Long method / class Duplicate code Methods does several different things (bad cohesion) • Too much dependencies (bad coupling) • Complex / unreadable code

Refactoring Refactoring

Experience • Delivering working software faster is important! • You can write the code Experience • Delivering working software faster is important! • You can write the code to run somehow • With simple design • With less effort • Later you can refactor the code if necessary • Refactoring is not a reason to intentionally write bad code! • Good coding style is always important!

6. Simple Design • No Big Design Up Front (BDUF) • Reduces the overhead 6. Simple Design • No Big Design Up Front (BDUF) • Reduces the overhead • Ship working functionality faster and get feedback early • “Do The Simplest Thing That Could Possibly Work” • Later use refactoring to change it • Not too much formal documentation

Simple Design Simple Design

How It Works for Me? • Simple design does not mean How It Works for Me? • Simple design does not mean "no design" • It is about establishing priorities • It's a set of tradeoffs you make • If something is important for this release and for the whole system, it should be designed well • Don't lose time to design something you will not use soon!

7. Collective Code Ownership • Code to belongs to the project (team), not to 7. Collective Code Ownership • Code to belongs to the project (team), not to an individual engineer! • Any engineer can modify any code • Better quality of the code • Engineers are not required to work around deficiencies in code they do not own • Faster progress • No need to wait for someone else to fix something

Collective Code Ownership? Collective Code Ownership?

Experience • Collective code ownership is absolutely indispensable • You need to fight the Experience • Collective code ownership is absolutely indispensable • You need to fight the people who don't agree with this! • Fire people writing unreadable and unmaintainable code • Don't allow somebody to own some module and be irreplaceable

8. Continuous Integration • Pair writes up unit test cases and code for a 8. Continuous Integration • Pair writes up unit test cases and code for a task (part of a user story) • Pair unit tests code to 100% • Pair integrates • Pair runs ALL unit test cases to 100% • Pair moves on to next task with clean slate and clear mind • Should happen once or twice a day

How It Works for Me? • Integrating often is really valuable • Sometimes you How It Works for Me? • Integrating often is really valuable • Sometimes you cannot finish a task for one day and integrate it • For small projects with small teams integration is not an issue • For large and complex projects it's crucial • Think of automated build environment Make it Painless: integrate often

9. On-Site Customer • Customer available on site • Clarify user stories • Make 9. On-Site Customer • Customer available on site • Clarify user stories • Make critical business decisions • Developers don’t make assumptions • Developers don’t have to wait for decisions • Face to face communication minimizes the chances of misunderstanding

Experience • On-site customer actually does not work! • Customers are busy • Meetings Experience • On-site customer actually does not work! • Customers are busy • Meetings every day is working better • Customers are not competent! • Customers always say "Yes, this is what I want" and later say the opposite • You need to think instead of them • Use prototyping

10. Small Releases • Timeboxed • As small as possible, but still delivering business 10. Small Releases • Timeboxed • As small as possible, but still delivering business value • No releases to ‘implement the database’ • Get customer feedback early and often • Do the planning game after each iteration • Do they want something different? • Have their priorities changed?

Continous Delivery Continous Delivery

How It Works for Me? • Small releases are really valuable • Manage the How It Works for Me? • Small releases are really valuable • Manage the risk of delivering something wrong • Helps the customer to define better requirements • Release every few weeks • Large projects are not so flexible • Try to release something, even you know that it will be changed

11. Forty-Hour Work Week • Kent Beck says, “. . . fresh and eager 11. Forty-Hour Work Week • Kent Beck says, “. . . fresh and eager every morning, and tired and satisfied every night” • Burning the midnight oil kills performance • Tired developers make more mistakes • Slows you down more in the long run • If you mess with people’s personal lives (by taking it over), in the long run the project will pay the consequences

Experience • 40 hours a week or 40 hours without a sleep? • Come Experience • 40 hours a week or 40 hours without a sleep? • Come back to the real world! • Overtime is not recommendable but often can not be avoided • Better planning can help • Highly skilled senior engineers always suffer of overtime and high pressure • That's how the business works!

12. Coding Standards • Use coding conventions • Rules for naming, formatting, etc. • 12. Coding Standards • Use coding conventions • Rules for naming, formatting, etc. • Write readable and maintainable code • Method commenting • • Self-documenting code Don't comment bad code, rewrite it! • Refactor to improve the design • Use code audit tools (Fx. Cop, Check. Style, TFS)

Experiences • Coding standards are important • Enforce good practices to whole the team Experiences • Coding standards are important • Enforce good practices to whole the team – tools, code reviews, etc. • Standards should be simple • Complex standards are not followed • Standards should be more strict for larger teams • Developers don't like utter rules like "comment any class member"

The 13 th Practice? The Stand Up Meeting • Start the day with 15 The 13 th Practice? The Stand Up Meeting • Start the day with 15 -minute meeting • Everyone stands up (so the meeting stays short) in circle • Going around the room everyone says specifically: • What they did the day before • What they plan to do today • Any obstacles they are experiencing • Can be the way pairs are formed

Communication effectiveness People Communicate Most Effectively Face-to-Face 2 people at whiteboard 2 people on Communication effectiveness People Communicate Most Effectively Face-to-Face 2 people at whiteboard 2 people on phone Videotape Paper 2 people on email Richness of the communication channel

How XP Solve Some SE Problems Problem Solution Slipped schedule Short development cycles Cancelled How XP Solve Some SE Problems Problem Solution Slipped schedule Short development cycles Cancelled project Intensive customer presence Cost of changes Extensive, ongoing testing, system always running Defect rates Unit tests, customer tests Misunderstand the business Customer part of the team Business changes Changes are welcome Staff turnover Intensive teamwork

So What does XP Apply to? • Domains with changing requirements • High-risk projects So What does XP Apply to? • Domains with changing requirements • High-risk projects (including those with high schedule risk) • Small project team: 2 – 12 programmers • Cannot be used with a large team • Extended development team • Developers, managers and customer • Co-located • Automated testability

Your Own Development Process? Your Own Development Process?

Mix-and-Match • The practices in different agile methods can be extracted and combined • Mix-and-Match • The practices in different agile methods can be extracted and combined • Establish your own process • Build it step-by-step • Adapt good practices one by one • Examples • Pair programming and its variation • Daily 15 -minutes meeting • Test-driven development

Agile Development and XP Agile Development and XP