SlideShare une entreprise Scribd logo
1  sur  41
Télécharger pour lire hors ligne
Test Driven


u           Development
                        andaid!


                  f
                 Gettin gP
        Rowan Merewood
Software Eng. / Team Lead
                 Ibuildings
WHO AM I?

Software Engineer &
Technical Team Lead
at Ibuildings UK

  I want to write good code
      and earn a living


   @rowan_m
                      m
Not ?
WHO AM I?




s
               i-am-not-a
             Cconsultant
            well-maybe-a-little
Not ?
WHO AM I?




s
             i-am-not
            selling-a
               book
Not ?
WHO AM I?




s
             i-am-not
            a-slave-to
            one=method
THE GOOD




                    @
Clean code, smart devs
  Latest technology
 Building your career

Elitist / Intimidating?



              DIFFERENT SITUATIONS
THE BAD




                     g
   Disgusting code
   Devs don't care
   Career dead-end

Changes break the app.
  Always bug-fixing


             DIFFERENT SITUATIONS
THE UGLY




                    c
 Good tests are hard
Writing tests takes time
     Time is money

 You're not an expert
        (yet...)


              DIFFERENT SITUATIONS
WHAT IS TDD?


1.Decide what you want to do
2.Write a test to show it working
3.Run the test and watch it fail
4.Write just enough code to pass the test
5.Re-run the test (and test suite)
6.Refactor (refine/improve)
7.Re-run tests
8.Repeat
WHAT IS TDD?


simplify
                  RED




H                GREEN


               REFACTOR
WHY IS THIS HARD?




l
 Do you know what
     you want

      before

    you code it?
WHY IS THIS HARD?




l   Does your client
      know what
      they want?

            Ever?
Train yourself to think like a scientist




1.Hypothesis
2.Repeatable Experiment
3.Conclusions
                             ]
ninja
  Train yourself to think like a scientist




                                  ]
            Kata
1.Hypothesis terally: "form")
  ( 型 or 形 , li
2.Repeatable movements
       A set of Experiment
3.Conclusionsain and again
    you repeat ag
                          ctly.
    un til can do it perfe



                                  Ninja weapon
!
DAVE THOMAS

 co-author of
The Pragmatic
 Programmer

                      Code Kata
                http://code
                            kata.pragpro
                                        g.co   m/
ROY OSHEROVE - TDD Kata
              http://osherove.com/tdd-kata-1/



      Create a simple String calculator
  with a method int Add(string numbers)


 The method can take 0, 1 or 2 numbers,
        and will return their sum
  (for an empty string it will return 0)
      for example “” or “1” or “1,2”
.
ROY OSHEROVE - TDD Kata




                     demo
Now you're an expert...


                    warning

Do not assume you can
just start to do this
in your project            D
DON'T BE A HERO


Introduce tests all at once...

●
    You will miss your deadline
●
    Your tests will not be maintained
●
    Your team will hate you
DIFFERENT APPROACHES


      Force tests
     on your client

    Make your client
     want the tests   L
FORCING TESTS




to your estimates.

Do not compromise
your principles.
                     L
Add a fixed percentage
SELLING TESTS




in creating tests.

Make the tests
a deliverable.
                       L
Use tests to define 'done'.

Involve the client
SELLING TESTS




Involve the client
in creating tests.

Make the tests
a deliverable.
                       L
Use tests to define 'done'.
                     Fitnesse Framework
                     http://fitnesse.org/
SELLING TESTS




Involve the client
in creating tests.

Make the tests
a deliverable.
                        L
Use tests to define 'done'.
                      Fitnesse Framework
                      http://fitnesse.org/


                           Selenium
                     http://seleniumhq.org/
DON'T BELIEVE THE HYPE


Make sure you don't over-promise.

Make sure you have the
infrastructure and skills

NO SILVER BULLETS
v
     INFRASTRUCTURE




1.Unit Testing
2.Acceptance Testing
3.Automated Deployment
4.Continuous Integration
5.Issue Tracking
Unit/Acceptanc
provides the tec
1.Unit Testing
                v
     INFRASTRUCTURE



                e testing
                hnical base


2.Acceptance Testing
3.Automated Deployment
4.Continuous Integration
5.Issue Tracking
Unit/
    Au s          v
      INFRASTRUCTURE



                   e testing
         Acceptanc eployment
            ate t d
        tomthe d echnical base
 provide a quick test env.
1.Unitows
    all Testing
2.Acceptance Testing
3.Automated Deployment
4.Continuous Integration
5.Issue Tracking
Unit/
    Au s    ate t dv
      INFRASTRUCTURE



                    e testing
         Acceptanc eployment
        tomthe d echnical rbasen
 provide ntinuouckIte
       Co s a qui
1.Unitow
        makes pr
                  s    eg atio
                     ntst env.
    all Testing ogress visible
2.Acceptance Testing
3.Automated Deployment
4.Continuous Integration
5.Issue Tracking
INFRASTRUCTURE




  Unit/
    Au s    ate t d
       Co s a qui
                  s v
                    e testing
         Acceptanc eployment
        tomthe d echnical rbasen
 provide ntinuouckIte
                        eg atio
                     ntst env.
                       ingviallows
1.UnitowIssue Traress sible
    all Testing og ck
        makes pr
2.Acceptance rting on TDD
            repo Testing
3.Automated Deployment
4.Continuous Integration
5.Issue Tracking
REPORTING


1.Code Coverage
2.Branch Coverage
3.Bug Origin:
  - tested code
  - untested code
4.Test/Dev Time:
  - per feature
  - per story
REPORTING

                                        c
                    Only trac k a metri
1.Code Coverage              is useful
                       if it
2.Branch Coverage              urages th
                                         e
                    and enco
3.Bug Origin:                behaviour
                                       !
                      right
  - tested code
  - untested code
4.Test/Dev Time:
  - per feature
  - per story
SKILLS & THE TEAM


               Owners not heroes

                Prepared to fail

              Honest & Disciplined
TDD DOES NOT
CREATE GOOD




a
    CODE

               Wait...
               What ?
TDD DOES NOT
CREATE GOOD    good plan




a
    CODE       good dev
               good code

               bad plan
               bad dev
               bad code
DISASTER RECOVERY
DISASTER RECOVERY



  Untestable code?

 Isolate and contain
         -or-
Create a testable API
DISASTER RECOVERY


   Running late?

    Drop features
         -or-
 Test the happy path
         -or-
    Test core only
DISASTER RECOVERY



   Broken build?

    Fix the test
        -or-
  Disable the test
   (or delete it)
DISASTER RECOVERY



  Team doesn't care

Use incentives/games
        -or-
  Find another job
   You 're worth it !
V                        QUESTIONS?

                          @rowan_m


              i n/3218
        joind.
 ttp://
h
                         thank-you

Contenu connexe

Tendances

TDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionTDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionDionatan default
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven DevelopmentLim Chanmann
 
TDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDTDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDDavid Rodenas
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)nedirtv
 
A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) CodeOps Technologies LLP
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development CodeOps Technologies LLP
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019Paulo Clavijo
 
Tdd practices
Tdd practicesTdd practices
Tdd practicesaxykim00
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentguestc8093a6
 
Tdd in php a brief example
Tdd in php   a brief exampleTdd in php   a brief example
Tdd in php a brief exampleJeremy Kendall
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentguy_davis
 

Tendances (20)

TDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionTDD Flow: The Mantra in Action
TDD Flow: The Mantra in Action
 
TDD with RSpec
TDD with RSpecTDD with RSpec
TDD with RSpec
 
Tdd
TddTdd
Tdd
 
TDD - Agile
TDD - Agile TDD - Agile
TDD - Agile
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
TDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDTDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDD
 
Test driven development(tdd)
Test driven development(tdd)Test driven development(tdd)
Test driven development(tdd)
 
Tdd
TddTdd
Tdd
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 
A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD)
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 
Tdd com Java
Tdd com JavaTdd com Java
Tdd com Java
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019
 
Tdd practices
Tdd practicesTdd practices
Tdd practices
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Atdd half day_new_1_up
Atdd half day_new_1_upAtdd half day_new_1_up
Atdd half day_new_1_up
 
TDD = bra design?
TDD = bra design?TDD = bra design?
TDD = bra design?
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Tdd in php a brief example
Tdd in php   a brief exampleTdd in php   a brief example
Tdd in php a brief example
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 

En vedette

My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
Of Gaps, Fillers and Empty Spaces… Fronteers2015 closing keynote
Of Gaps, Fillers and Empty Spaces… Fronteers2015 closing keynoteOf Gaps, Fillers and Empty Spaces… Fronteers2015 closing keynote
Of Gaps, Fillers and Empty Spaces… Fronteers2015 closing keynoteChristian Heilmann
 
Protect your users with Circuit breakers
Protect your users with Circuit breakersProtect your users with Circuit breakers
Protect your users with Circuit breakersScott Triglia
 
Designing irresistible apis
Designing irresistible apisDesigning irresistible apis
Designing irresistible apisKirsten Hunter
 
Introducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No ProblemIntroducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No ProblemAndrew Liu
 
DNS for Developers - NDC Oslo 2016
DNS for Developers - NDC Oslo 2016DNS for Developers - NDC Oslo 2016
DNS for Developers - NDC Oslo 2016Maarten Balliauw
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy CodeRowan Merewood
 
Getting Browsers to Improve the Security of Your Webapp
Getting Browsers to Improve the Security of Your WebappGetting Browsers to Improve the Security of Your Webapp
Getting Browsers to Improve the Security of Your WebappFrancois Marier
 
Microservices Minus the Hype: How to Build and Why
Microservices Minus the Hype: How to Build and WhyMicroservices Minus the Hype: How to Build and Why
Microservices Minus the Hype: How to Build and WhyMark Heckler
 
The Evolution and Future of Content Publishing
The Evolution and Future of Content PublishingThe Evolution and Future of Content Publishing
The Evolution and Future of Content PublishingFITC
 
DNS for Developers - ConFoo Montreal
DNS for Developers - ConFoo MontrealDNS for Developers - ConFoo Montreal
DNS for Developers - ConFoo MontrealMaarten Balliauw
 
Get more than a cache back! - ConFoo Montreal
Get more than a cache back! - ConFoo MontrealGet more than a cache back! - ConFoo Montreal
Get more than a cache back! - ConFoo MontrealMaarten Balliauw
 
Securing MicroServices - ConFoo 2017
Securing MicroServices - ConFoo 2017Securing MicroServices - ConFoo 2017
Securing MicroServices - ConFoo 2017Majid Fatemian
 
The Soul in The Machine - Developing for Humans
The Soul in The Machine - Developing for HumansThe Soul in The Machine - Developing for Humans
The Soul in The Machine - Developing for HumansChristian Heilmann
 

En vedette (17)

My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
Sensible scaling
Sensible scalingSensible scaling
Sensible scaling
 
Of Gaps, Fillers and Empty Spaces… Fronteers2015 closing keynote
Of Gaps, Fillers and Empty Spaces… Fronteers2015 closing keynoteOf Gaps, Fillers and Empty Spaces… Fronteers2015 closing keynote
Of Gaps, Fillers and Empty Spaces… Fronteers2015 closing keynote
 
Protect your users with Circuit breakers
Protect your users with Circuit breakersProtect your users with Circuit breakers
Protect your users with Circuit breakers
 
Designing irresistible apis
Designing irresistible apisDesigning irresistible apis
Designing irresistible apis
 
Introducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No ProblemIntroducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No Problem
 
DNS for Developers - NDC Oslo 2016
DNS for Developers - NDC Oslo 2016DNS for Developers - NDC Oslo 2016
DNS for Developers - NDC Oslo 2016
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
Getting Browsers to Improve the Security of Your Webapp
Getting Browsers to Improve the Security of Your WebappGetting Browsers to Improve the Security of Your Webapp
Getting Browsers to Improve the Security of Your Webapp
 
Microservices Minus the Hype: How to Build and Why
Microservices Minus the Hype: How to Build and WhyMicroservices Minus the Hype: How to Build and Why
Microservices Minus the Hype: How to Build and Why
 
The Evolution and Future of Content Publishing
The Evolution and Future of Content PublishingThe Evolution and Future of Content Publishing
The Evolution and Future of Content Publishing
 
DNS for Developers - ConFoo Montreal
DNS for Developers - ConFoo MontrealDNS for Developers - ConFoo Montreal
DNS for Developers - ConFoo Montreal
 
Get more than a cache back! - ConFoo Montreal
Get more than a cache back! - ConFoo MontrealGet more than a cache back! - ConFoo Montreal
Get more than a cache back! - ConFoo Montreal
 
Securing MicroServices - ConFoo 2017
Securing MicroServices - ConFoo 2017Securing MicroServices - ConFoo 2017
Securing MicroServices - ConFoo 2017
 
Microservices
MicroservicesMicroservices
Microservices
 
reveal.js 3.0.0
reveal.js 3.0.0reveal.js 3.0.0
reveal.js 3.0.0
 
The Soul in The Machine - Developing for Humans
The Soul in The Machine - Developing for HumansThe Soul in The Machine - Developing for Humans
The Soul in The Machine - Developing for Humans
 

Similaire à TDD and Getting Paid

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentjakubkoci
 
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...mCloud
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017Xavi Hidalgo
 
Why Your Selenium Tests are so Dang Brittle, and What to Do About It
Why Your Selenium Tests are so Dang Brittle, and What to Do About ItWhy Your Selenium Tests are so Dang Brittle, and What to Do About It
Why Your Selenium Tests are so Dang Brittle, and What to Do About ItJay Aho
 
Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)Gianluca Padovani
 
Test Drive Development
Test Drive DevelopmentTest Drive Development
Test Drive Developmentsatya sudheer
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven DevelopmentPablo Villar
 
Test Presentation
Test PresentationTest Presentation
Test Presentationsetitesuk
 
Should you be your own judge?
Should you be your own judge?Should you be your own judge?
Should you be your own judge?Achyut Pokhrel
 
Development without Testers: Myth or Real Option? (ConfeT&QA conference)
Development without Testers: Myth or Real Option? (ConfeT&QA conference)Development without Testers: Myth or Real Option? (ConfeT&QA conference)
Development without Testers: Myth or Real Option? (ConfeT&QA conference)Mikalai Alimenkou
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with LaravelTyler Johnston
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012Pietro Di Bello
 
Development without Testers: Myth or Real Option?
Development without Testers: Myth or Real Option?Development without Testers: Myth or Real Option?
Development without Testers: Myth or Real Option?Mikalai Alimenkou
 
Getting started with Test Driven Development - Ferdous Mahmud Shaon
Getting started with Test Driven Development - Ferdous Mahmud ShaonGetting started with Test Driven Development - Ferdous Mahmud Shaon
Getting started with Test Driven Development - Ferdous Mahmud ShaonCefalo
 
Getting started with Test Driven Development
Getting started with Test Driven DevelopmentGetting started with Test Driven Development
Getting started with Test Driven DevelopmentFerdous Mahmud Shaon
 

Similaire à TDD and Getting Paid (20)

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017
 
TDD Best Practices
TDD Best PracticesTDD Best Practices
TDD Best Practices
 
Testing smells
Testing smellsTesting smells
Testing smells
 
Why Your Selenium Tests are so Dang Brittle, and What to Do About It
Why Your Selenium Tests are so Dang Brittle, and What to Do About ItWhy Your Selenium Tests are so Dang Brittle, and What to Do About It
Why Your Selenium Tests are so Dang Brittle, and What to Do About It
 
Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)
 
Test Drive Development
Test Drive DevelopmentTest Drive Development
Test Drive Development
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
 
Test Presentation
Test PresentationTest Presentation
Test Presentation
 
Should you be your own judge?
Should you be your own judge?Should you be your own judge?
Should you be your own judge?
 
Development without Testers: Myth or Real Option? (ConfeT&QA conference)
Development without Testers: Myth or Real Option? (ConfeT&QA conference)Development without Testers: Myth or Real Option? (ConfeT&QA conference)
Development without Testers: Myth or Real Option? (ConfeT&QA conference)
 
Tdd
TddTdd
Tdd
 
Test Driven
Test DrivenTest Driven
Test Driven
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with Laravel
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012
 
Development without Testers: Myth or Real Option?
Development without Testers: Myth or Real Option?Development without Testers: Myth or Real Option?
Development without Testers: Myth or Real Option?
 
Simple testable code
Simple testable codeSimple testable code
Simple testable code
 
Getting started with Test Driven Development - Ferdous Mahmud Shaon
Getting started with Test Driven Development - Ferdous Mahmud ShaonGetting started with Test Driven Development - Ferdous Mahmud Shaon
Getting started with Test Driven Development - Ferdous Mahmud Shaon
 
Getting started with Test Driven Development
Getting started with Test Driven DevelopmentGetting started with Test Driven Development
Getting started with Test Driven Development
 

Plus de Rowan Merewood

Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"Rowan Merewood
 
A Dependency Injection Primer
A Dependency Injection PrimerA Dependency Injection Primer
A Dependency Injection PrimerRowan Merewood
 
Practical Applications of Zend_Acl
Practical Applications of Zend_AclPractical Applications of Zend_Acl
Practical Applications of Zend_AclRowan Merewood
 
Algorithm, Review, Sorting
Algorithm, Review, SortingAlgorithm, Review, Sorting
Algorithm, Review, SortingRowan Merewood
 
State Machines to State of the Art
State Machines to State of the ArtState Machines to State of the Art
State Machines to State of the ArtRowan Merewood
 

Plus de Rowan Merewood (6)

Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"
 
A Dependency Injection Primer
A Dependency Injection PrimerA Dependency Injection Primer
A Dependency Injection Primer
 
Practical Applications of Zend_Acl
Practical Applications of Zend_AclPractical Applications of Zend_Acl
Practical Applications of Zend_Acl
 
Algorithm, Review, Sorting
Algorithm, Review, SortingAlgorithm, Review, Sorting
Algorithm, Review, Sorting
 
Tools and Talent
Tools and TalentTools and Talent
Tools and Talent
 
State Machines to State of the Art
State Machines to State of the ArtState Machines to State of the Art
State Machines to State of the Art
 

Dernier

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

TDD and Getting Paid

  • 1. Test Driven u Development andaid! f Gettin gP Rowan Merewood Software Eng. / Team Lead Ibuildings
  • 2. WHO AM I? Software Engineer & Technical Team Lead at Ibuildings UK I want to write good code and earn a living @rowan_m m
  • 3. Not ? WHO AM I? s i-am-not-a Cconsultant well-maybe-a-little
  • 4. Not ? WHO AM I? s i-am-not selling-a book
  • 5. Not ? WHO AM I? s i-am-not a-slave-to one=method
  • 6. THE GOOD @ Clean code, smart devs Latest technology Building your career Elitist / Intimidating? DIFFERENT SITUATIONS
  • 7. THE BAD g Disgusting code Devs don't care Career dead-end Changes break the app. Always bug-fixing DIFFERENT SITUATIONS
  • 8. THE UGLY c Good tests are hard Writing tests takes time Time is money You're not an expert (yet...) DIFFERENT SITUATIONS
  • 9. WHAT IS TDD? 1.Decide what you want to do 2.Write a test to show it working 3.Run the test and watch it fail 4.Write just enough code to pass the test 5.Re-run the test (and test suite) 6.Refactor (refine/improve) 7.Re-run tests 8.Repeat
  • 10. WHAT IS TDD? simplify RED H GREEN REFACTOR
  • 11. WHY IS THIS HARD? l Do you know what you want before you code it?
  • 12. WHY IS THIS HARD? l Does your client know what they want? Ever?
  • 13. Train yourself to think like a scientist 1.Hypothesis 2.Repeatable Experiment 3.Conclusions ]
  • 14. ninja Train yourself to think like a scientist ] Kata 1.Hypothesis terally: "form") ( 型 or 形 , li 2.Repeatable movements A set of Experiment 3.Conclusionsain and again you repeat ag ctly. un til can do it perfe Ninja weapon
  • 15. ! DAVE THOMAS co-author of The Pragmatic Programmer Code Kata http://code kata.pragpro g.co m/
  • 16. ROY OSHEROVE - TDD Kata http://osherove.com/tdd-kata-1/ Create a simple String calculator with a method int Add(string numbers) The method can take 0, 1 or 2 numbers, and will return their sum (for an empty string it will return 0) for example “” or “1” or “1,2”
  • 17. . ROY OSHEROVE - TDD Kata demo
  • 18. Now you're an expert... warning Do not assume you can just start to do this in your project D
  • 19. DON'T BE A HERO Introduce tests all at once... ● You will miss your deadline ● Your tests will not be maintained ● Your team will hate you
  • 20. DIFFERENT APPROACHES Force tests on your client Make your client want the tests L
  • 21. FORCING TESTS to your estimates. Do not compromise your principles. L Add a fixed percentage
  • 22. SELLING TESTS in creating tests. Make the tests a deliverable. L Use tests to define 'done'. Involve the client
  • 23. SELLING TESTS Involve the client in creating tests. Make the tests a deliverable. L Use tests to define 'done'. Fitnesse Framework http://fitnesse.org/
  • 24. SELLING TESTS Involve the client in creating tests. Make the tests a deliverable. L Use tests to define 'done'. Fitnesse Framework http://fitnesse.org/ Selenium http://seleniumhq.org/
  • 25. DON'T BELIEVE THE HYPE Make sure you don't over-promise. Make sure you have the infrastructure and skills NO SILVER BULLETS
  • 26. v INFRASTRUCTURE 1.Unit Testing 2.Acceptance Testing 3.Automated Deployment 4.Continuous Integration 5.Issue Tracking
  • 27. Unit/Acceptanc provides the tec 1.Unit Testing v INFRASTRUCTURE e testing hnical base 2.Acceptance Testing 3.Automated Deployment 4.Continuous Integration 5.Issue Tracking
  • 28. Unit/ Au s v INFRASTRUCTURE e testing Acceptanc eployment ate t d tomthe d echnical base provide a quick test env. 1.Unitows all Testing 2.Acceptance Testing 3.Automated Deployment 4.Continuous Integration 5.Issue Tracking
  • 29. Unit/ Au s ate t dv INFRASTRUCTURE e testing Acceptanc eployment tomthe d echnical rbasen provide ntinuouckIte Co s a qui 1.Unitow makes pr s eg atio ntst env. all Testing ogress visible 2.Acceptance Testing 3.Automated Deployment 4.Continuous Integration 5.Issue Tracking
  • 30. INFRASTRUCTURE Unit/ Au s ate t d Co s a qui s v e testing Acceptanc eployment tomthe d echnical rbasen provide ntinuouckIte eg atio ntst env. ingviallows 1.UnitowIssue Traress sible all Testing og ck makes pr 2.Acceptance rting on TDD repo Testing 3.Automated Deployment 4.Continuous Integration 5.Issue Tracking
  • 31. REPORTING 1.Code Coverage 2.Branch Coverage 3.Bug Origin: - tested code - untested code 4.Test/Dev Time: - per feature - per story
  • 32. REPORTING c Only trac k a metri 1.Code Coverage is useful if it 2.Branch Coverage urages th e and enco 3.Bug Origin: behaviour ! right - tested code - untested code 4.Test/Dev Time: - per feature - per story
  • 33. SKILLS & THE TEAM Owners not heroes Prepared to fail Honest & Disciplined
  • 34. TDD DOES NOT CREATE GOOD a CODE Wait... What ?
  • 35. TDD DOES NOT CREATE GOOD good plan a CODE good dev good code bad plan bad dev bad code
  • 37. DISASTER RECOVERY Untestable code? Isolate and contain -or- Create a testable API
  • 38. DISASTER RECOVERY Running late? Drop features -or- Test the happy path -or- Test core only
  • 39. DISASTER RECOVERY Broken build? Fix the test -or- Disable the test (or delete it)
  • 40. DISASTER RECOVERY Team doesn't care Use incentives/games -or- Find another job You 're worth it !
  • 41. V QUESTIONS? @rowan_m i n/3218 joind. ttp:// h thank-you