improve your tdd skills

23
Ivan Lombardi Borgia [email protected] @ivanlombardib

Upload: xpeppers

Post on 17-Feb-2017

222 views

Category:

Software


0 download

TRANSCRIPT

Ivan Lombardi [email protected]

@ivanlombardib

TDD Workshop

practices

tddrefactoringpair progamming

Test Driven Development

“Test-driven development (TDD), a proven set of techniques that encourage simple designs and test suites that inspire confidence”

Kent Beck

“Test-driven development is a way of managing fear during programming”

Kent Beck

Fast feedback

Emergent / simple design

Requirements nailed down

Non regression test suite

Always up to date code documentation

why?

Add a little test

Run all tests and fail

Make the simplest change to succeed

Run all tests and succeed

Refactor

how?

Red

Refactor Green

tdd mantra

Refactoring

Changing a software system without altering the external behavior of the code

“In essence when you refactor you are improving the design of the code after it has been written”

Martin Fowler

how?

Passes the testsReveals intentionNo duplicationFewest elements

Beck’s 4 rules of simple design

Pair Programming

Continuous feedback / exchangeMore focusLess frustrationHigher quality fighting poor practicesLess bugsCollective code ownership… and it’s fun!

Why?

Side by side in front of the monitorSwitch role oftenCommunicateAppropriate workspace layout

How?

String Calculator

● focus on the journey● improve your tdd skills● no fear to fail

Today’s kata

Questions?

and now…Let’s start coding!!!

Extreme Programming Explained (Edition 2) - Kent Beck

http://www.extremeprogramming.org/

Test Driven Development By Example - Kent Beck

Refactoring - Martin Fowler

http://refactoring.com/

Resources