• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
why-tdd
 

why-tdd

on

  • 622 views

Presentation done

Presentation done

Statistics

Views

Total Views
622
Views on SlideShare
622
Embed Views
0

Actions

Likes
0
Downloads
7
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    why-tdd why-tdd Presentation Transcript

    • AMIR BARYLKO WHY TDD? WPG RUBY UG 2011Amir Barylko - TDD MavenThought Inc.
    • INTRO Why projects fail? Reality Check No more excuses Why TDD?Amir Barylko - TDD MavenThought Inc.
    • WHY PROJECTS FAIL? • Delivering late or over budget • Delivering the wrong thing • Unstable in production • Costly to maintainAmir Barylko - TDD MavenThought Inc.
    • REALITY CHECK • It is impossible to gather all the requirements at the beginning of a project. • Whatever requirements you do gather are guaranteed to change. • There will always be more to do than time and money will allow.Amir Barylko - TDD MavenThought Inc.
    • NO MORE EXCUSES • It works on my computer! • We need a satellite connection in order to • Itwas like that when I got run it! here! • We can’t reproduce the • The previous developer error! didn’t know XXXX! • We can’t test that!Amir Barylko - TDD Workshop PRDC 2011 MavenThought Inc.
    • WHY TDD? • Prove that your code • Regression tests as works byproduct • Avoid waste • Makechanges with (debugging) confidence • Increment code quality • Bring back the joy of coding! • Better designAmir Barylko - TDD Workshop PRDC 2011 MavenThought Inc.
    • APPLYING TDD Iteration 0 .. N Quality as a Driver Red - Green - RefactorAmir Barylko - TDD MavenThought Inc.
    • ITERATION 0 • Flush out architecture. • Setup Testing harness for TDD and BDD. • Setup continuous integration. • Setup scripts to build, deploy, etc. • Setup visual communication tools.Amir Barylko - TDD MavenThought Inc.
    • ITERATION 1.. N • Start by Story Planning • Pair programming (switching often) Every day! • Daily Scrum • End with RetrospectiveAmir Barylko - TDD MavenThought Inc.
    • QUALITY AS A DRIVER Red BDD Red Refactor Refactor TDD Green GreenAmir Barylko - TDD MavenThought Inc.
    • RED •Write a test that fails •Relax, is ok if it compilesAmir Barylko - TDD MavenThought Inc.
    • GREEN • Try to make the test pass • Do a simple solution • Use default values (not throwing exceptions) • Don’t worry if the code “smells”Amir Barylko - TDD MavenThought Inc.
    • REFACTOR • Avoid repeating code • Avoid hardcoding dependencies • Avoid “write only” code • Refactor with confidence! • Run all tests if possibleAmir Barylko - TDD MavenThought Inc.
    • DEMO MediaLibrary Add Top10Amir Barylko - TDD MavenThought Inc.
    • SUMMARY Limits Benefits Challenges AdoptionAmir Barylko - TDD MavenThought Inc.
    • LIMITS OF TDD • Unit test • Integration test • Acceptance testAmir Barylko - TDD MavenThought Inc.
    • BENEFITS • Let the methodology drive • It will save your bacon! • High quality the whole way! • Very few bugs! • Do your duty as developer!Amir Barylko - TDD MavenThought Inc.
    • CHALLENGES • Very different from conventional testing • Many developers find it complex to learn at first • Hard to start without a Mentor • Management buy in • Difficult to keep under deadline pressure • Beware of code coverage!Amir Barylko - TDD MavenThought Inc.
    • ADOPTION • Find Mentor/Couch/Trainer • Small iterations • Have metrics ready (velocity, etc) • Do whatever works for you • Find out which tools will benefit you • Automate, automate, automate!Amir Barylko - TDD MavenThought Inc.
    • QUESTIONS?Amir Barylko - TDD MavenThought Inc.