extreme programming

51
eXtreme Programming Agile Software Development ARTEM TABALIN

Upload: artem-tabalin

Post on 29-Nov-2014

1.300 views

Category:

Software


1 download

DESCRIPTION

How to succeed in software development. Following agile methodology principles helps to achieve much better results. Know more about eXtreme Programming, one of the famous agile software development methodology.

TRANSCRIPT

Page 1: eXtreme Programming

eXtreme Programming!Agile Software Development!

ARTEM TABALIN!

Page 2: eXtreme Programming

Iterative vs Waterfall!

Page 3: eXtreme Programming

Waterfall!

Page 4: eXtreme Programming

Disadvantages!

•  High amount of risk!

•  Impossible to go back and fix!

•  No result until very end!

•  Impossible to strictly follow the requirements!

Page 5: eXtreme Programming

Result!

•  Broken expectations!

•  Delivery delay!

•  Double budget!

•  Low quality!

Page 6: eXtreme Programming

When to use!

•  Simple project!

•  Short project!

•  Clear requirements!

•  Familiar technology!

Page 7: eXtreme Programming

What to do?!

•  Complex project!

•  Long project!

•  Ambiguous requirements!

•  Unknown technology!

Page 8: eXtreme Programming

Iterative!

Page 9: eXtreme Programming

Iteration lifecycle!

1.  Figure out Use Cases!

2.  Choose most valuable for iteration!

3.  Analyze chosen use cases!

4.  Design / Code / Deploy / Test!

5.  Show results to customer!

6.  Repeat from #2 considering feedback #5!

Page 10: eXtreme Programming

Benefits!

•  Risk management!

•  Early delivery!

•  Cost control!

•  High quality!

Page 11: eXtreme Programming

Agile Methodologies!

•  eXtreme Programming!

•  SCRUM!

•  Feature Driven Development!

•  KanBan!

Page 12: eXtreme Programming

Welcome XP!

Page 13: eXtreme Programming

Risk

•  Delivery delay!

•  Too many bugs!

•  Lack of functionality!

•  Core devs leaving!

•  Requirements change!

Measure

•  Short releases!

•  Testing!

•  Tasks prioritization!

•  Pair programming!

•  On-site customer!

XP Against Risks!

Page 14: eXtreme Programming

Driving Software!

Change is the only unchangeable thing. !Drive a project like you drive a car.!

Page 15: eXtreme Programming

Four Variables!

•  Cost!

•  Time!

•  Quality!

•  Scope

Choose any three!

Page 16: eXtreme Programming

Four (5) Values!

•  Communication!

•  Simplicity do the simplest thing that can possible work!

•  Feedback!

•  Courage!

•  Respect!

Page 17: eXtreme Programming

XP Practices!

Page 18: eXtreme Programming

XP Includes!

•  Metaphor!

•  Coding Standards!

•  Collective Ownership!

•  On-site Customer!

•  Simple Design!

•  Continuous Refactoring!

•  Short Releases!

•  40-Hour Week!

•  Continuous Integration!

•  Testing!

•  Pair Programming!

•  Planning Game!

Page 19: eXtreme Programming

Metaphor!

Page 20: eXtreme Programming

Coding Standards!Coding Rules followed by the team!

•  Formatting patterns!

•  Naming conventions!

•  Programming constructs to avoid!

•  Custom agreements!

Page 21: eXtreme Programming

Collective Ownership!

Any developer of a team!

•  Has access to the entire source code!

•  Is allowed to change any part of code!

•  Is responsible for the code!

IMPORTANT: Unit Tests required!

Page 22: eXtreme Programming

Collective Ownership - Benefits!

•  Reduce negative effect of losing a programmer!

•  Complex code eliminated by teammates!

•  No “tricky code” owners!

•  Full control over the code for everyone!

Page 23: eXtreme Programming

On-site Customer!

The customer on hand at all times and available for questions!

Page 24: eXtreme Programming

Simple Design!

Is there any way to do it simpler?!

Page 25: eXtreme Programming

Continuous Refactoring!Today’s design calls for refactoring!

When!•  During TDD cycle!•  Before adding new feature!•  New feature added!

What!•  Code duplication!•  Code that smells!!

Page 26: eXtreme Programming

Short Releases!

Release should be as short as possible and contain most valuable business requirements!

Page 27: eXtreme Programming

40-Hour Week!

Overtime is a symptom of a serious !problem on the project !

Page 28: eXtreme Programming

Continuous Integration!Get system build several times a day!

Aims

•  Prevent “integration hell”!

•  Last stable build always available!

•  Automatic tests running!

Page 29: eXtreme Programming

Continuous Integration - Principles!

•  Maintain single code repository!

•  Automate the build!

•  Self-testing build!

•  Everyone commits to the baseline daily!

•  Automate deployment!

Page 30: eXtreme Programming

Planning Game!

•  Release (1-6 months) business cycle!

•  Iteration (1-3 weeks) developer cycle!

•  Stand-up meeting everyday!

•  Story (feature) measure of software for customer!

Page 31: eXtreme Programming

Release Planning!1.  Customer writes stories!

2.  Developers estimate the stories!

3.  Splitting/Combining the stories!

4.  Sorting stories by value and risk!

5.  Choosing the scope based on velocity!

6.  Steering phase!•  customer can add a story or change the priority!•  developer can change the estimation!•  plan change!

Page 32: eXtreme Programming

Iteration Planning!1.  Dividing stories into tasks!

2.  Estimating the tasks yesterday’s weather!

3.  Devs take responsibility for tasks!

4.  Load factor estimation 0.5 is normal value!

5.  Rebalancing according to #4!

6.  Steering phase!•  tasks adding!•  tasks reassigning !•  plan change!

Page 33: eXtreme Programming

Stand-Up Meeting!

•  Short everyday meeting at the same time!

•  Everybody stands for the whole meeting in circle!

•  Everybody says!•  what he did yesterday!•  what he is doing today!•  what problems he has!

•  For problems announcing (not solving)!

Page 34: eXtreme Programming

Testing!

Test-Driven Development!

Page 35: eXtreme Programming

Tests Classification!•  Unit Tests functionality in isolation!

•  Integration Tests components interaction

•  Functional & Acceptance Tests business requirements!

•  Specific Tests load, performance, usability, security!

Page 36: eXtreme Programming

TDD - Benefits!•  Assurance of correctness!

•  Eliminates risk of changes!

•  Ensures better design!

•  Provides documentation!

•  Reduce debug time!

•  Makes to write loosely coupled code!

•  Gives confidence!

Page 37: eXtreme Programming

TDD - Mantra !

Red!

Green!Refactor!

Page 38: eXtreme Programming

TDD - Cycle!

•  Add test!

•  Run all tests and fail (Red)!

•  Make required change to succeed!

•  Run all tests and succeed (Green)!

•  Refactor to remove duplication (Refactor)!

Page 39: eXtreme Programming

Unit Tests Best Practices!

•  Test first!

•  Assert first!

•  Arrange → Act → Assert!

•  Tests isolation!

•  Mocking dependencies!

Page 40: eXtreme Programming

Arrange → Act → Assert!

Page 41: eXtreme Programming

Tests Isolation!

Page 42: eXtreme Programming

Mocking Dependencies!

Page 43: eXtreme Programming

Other Unit Tests!

•  Explanation Test explain with test!

•  Learning (Boundary) Test external library!

•  Regression Test bug elimination!

Page 44: eXtreme Programming

Test Greening Rules!

•  Getting to Green strategies!•  obvious implementation!•  fake it!•  triangulation!

•  Do the simplest solution possible!

•  Postpone faced problems for next steps!

•  No code for future!

Page 45: eXtreme Programming

Pair Programming!

Two programmers work at one workstation!

Page 46: eXtreme Programming

Pair Programming - Benefits!•  Less defects!

•  Better decisions!

•  Higher productivity less distractions!

•  Developers confidence!

•  Knowledge sharing!

•  Learning!

•  Team building!

Page 47: eXtreme Programming

Pair Programming - Variations!

•  Expert – Expert!

•  Expert – Novice!

•  Novice – Novice!

•  Remote pair programming!

Page 48: eXtreme Programming

Pair Programming - Problems!

•  “Watch the master” phenomenon!

•  Disengagement and silence!

How to fight with?!

Each developer keeps the keyboard in turn!

Page 49: eXtreme Programming

Pair Programming for TDD!

•  Dev1: Write test!

•  Dev2: Implement functionality!

•  Dev1: Make refactoring!

•  Dev1 ⇔ Dev2 and repeat!

Page 50: eXtreme Programming

Thank you!!

Your questions, please!!ARTEM TABALIN!

Page 51: eXtreme Programming

References!

•  Beck K. Extreme Programming Explained: Embrace Change!

•  Beck K., Fowler M. Planning Extreme Programming!

•  Beck K. Test Driven Development: By Example!