extreme programming

Post on 29-Nov-2014

1.302 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

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

eXtreme Programming!Agile Software Development!

ARTEM TABALIN!

Iterative vs Waterfall!

Waterfall!

Disadvantages!

•  High amount of risk!

•  Impossible to go back and fix!

•  No result until very end!

•  Impossible to strictly follow the requirements!

Result!

•  Broken expectations!

•  Delivery delay!

•  Double budget!

•  Low quality!

When to use!

•  Simple project!

•  Short project!

•  Clear requirements!

•  Familiar technology!

What to do?!

•  Complex project!

•  Long project!

•  Ambiguous requirements!

•  Unknown technology!

Iterative!

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!

Benefits!

•  Risk management!

•  Early delivery!

•  Cost control!

•  High quality!

Agile Methodologies!

•  eXtreme Programming!

•  SCRUM!

•  Feature Driven Development!

•  KanBan!

Welcome XP!

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!

Driving Software!

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

Four Variables!

•  Cost!

•  Time!

•  Quality!

•  Scope

Choose any three!

Four (5) Values!

•  Communication!

•  Simplicity do the simplest thing that can possible work!

•  Feedback!

•  Courage!

•  Respect!

XP Practices!

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!

Metaphor!

Coding Standards!Coding Rules followed by the team!

•  Formatting patterns!

•  Naming conventions!

•  Programming constructs to avoid!

•  Custom agreements!

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!

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!

On-site Customer!

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

Simple Design!

Is there any way to do it simpler?!

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!!

Short Releases!

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

40-Hour Week!

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

Continuous Integration!Get system build several times a day!

Aims

•  Prevent “integration hell”!

•  Last stable build always available!

•  Automatic tests running!

Continuous Integration - Principles!

•  Maintain single code repository!

•  Automate the build!

•  Self-testing build!

•  Everyone commits to the baseline daily!

•  Automate deployment!

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!

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!

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!

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)!

Testing!

Test-Driven Development!

Tests Classification!•  Unit Tests functionality in isolation!

•  Integration Tests components interaction

•  Functional & Acceptance Tests business requirements!

•  Specific Tests load, performance, usability, security!

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!

TDD - Mantra !

Red!

Green!Refactor!

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)!

Unit Tests Best Practices!

•  Test first!

•  Assert first!

•  Arrange → Act → Assert!

•  Tests isolation!

•  Mocking dependencies!

Arrange → Act → Assert!

Tests Isolation!

Mocking Dependencies!

Other Unit Tests!

•  Explanation Test explain with test!

•  Learning (Boundary) Test external library!

•  Regression Test bug elimination!

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!

Pair Programming!

Two programmers work at one workstation!

Pair Programming - Benefits!•  Less defects!

•  Better decisions!

•  Higher productivity less distractions!

•  Developers confidence!

•  Knowledge sharing!

•  Learning!

•  Team building!

Pair Programming - Variations!

•  Expert – Expert!

•  Expert – Novice!

•  Novice – Novice!

•  Remote pair programming!

Pair Programming - Problems!

•  “Watch the master” phenomenon!

•  Disengagement and silence!

How to fight with?!

Each developer keeps the keyboard in turn!

Pair Programming for TDD!

•  Dev1: Write test!

•  Dev2: Implement functionality!

•  Dev1: Make refactoring!

•  Dev1 ⇔ Dev2 and repeat!

Thank you!!

Your questions, please!!ARTEM TABALIN!

References!

•  Beck K. Extreme Programming Explained: Embrace Change!

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

•  Beck K. Test Driven Development: By Example!

top related