SlideShare a Scribd company logo
1 of 41
Download to read offline
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

More Related Content

What's hot

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
 

What's hot (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
 

Viewers also liked

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
 

Viewers also liked (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
 

Similar to 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
 

Similar to 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
 

More from 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
 

More from 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
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

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