Test Driven Development: More Development Than Ever

1

Transcript of Test Driven Development: More Development Than Ever

More Development Than EverTest Driven Development

Team Lead at EPAM

Agile practitioner (CSM)

Trainer

Public speaker

Writes perfect code with no bugsAlso saves the world during coffee breaks

I’m more likethis guy

Billions of years ago…In the stone age of computer science…

© Mutatis mutandis

© Computer History Museum

1994–95:rediscovered byKent Beck

© Improve It

2014 – 1995 = ?

2014 – 1999 = 15

2014 – 2002 = 12

I spend too much time writing tests.

TDD

Non-TDD

Think Test Code

Think Code

Think Test Code

Think Code

Debug!!!

In reality

Think Test Code

TDD vs. debugging only

Shorter feedback cycle

Reusable test suite

Code instead of pen and paper

Genuine feeling of completeness

Predictability

I spend too much time writing tests.

I would have spent this time anyway.

It doesn’t apply exactly to my case.

Legacy code

Front-end

Embedded systems

It doesn’t apply exactly to my case.

There’s a fair chance my case is not unique.

I’m new to the technology,

I can’t test what I don’t know.

It’s OK to use a debuggerIt’s OK to go back and forth

Test is a hypothesisyou can prove on the spot.

I’m new to the technology,

I can’t test what I don’t know.

TDD in fact helps me learn.

I have to modify the code too often, my tests become waste.

Think Test Code Refactor

Think Test Code Refactor

I have to modify the code too often, my tests become waste.

Code without tests is non-existing to me.

My project is too agile, don’t have time for tests!

Well…

WaterfallRequirements

Design

Implementation

Verification

Maintenance

Agile

Requirements

Design

Implementation

Verification

Maintenance

Requirements

Design

Implementation

Verification

Maintenance

Requirements

Design

Implementation

Verification

Maintenance

My project is too agile, don’t have time for tests!

I use TDD to build in quality into my code.

Test Development

Driven

TDD is a way toprepare your workplace andkeep it safe

© johnjazz

There strategyAnd there’s execution

And execution is hard

http://kirbarn.blogpost.com

[email protected]

@kirbarn

ReferencesTen Years Of Test Driven Development

Why does Kent Beck refer to the "rediscovery" of test-driven development? (Quora)

Waterfall model (Wikipedia)

JQuery

Books"Extreme Programming Explained: Embrace Change" by Kent Beck, Cynthia Andres

"Test Driven Development: By Example" by Kent Beck

"Working Effectively with Legacy Code" by Michael C. Feathers

"Test Driven Development for Embedded C" by James W. Grenning

Image sourceshttp://commons.wikimedia.org/wiki/File:Kent_Beck_no_Workshop_Mapping_XP.jpg

http://www.freeimages.com/photo/903964

http://commons.wikimedia.org/wiki/File:Punched_card.jpg

http://www.computerhistory.org/revolution/punched-cards/2/4/40

http://wall.alphacoders.com/big.php?i=62375

http://m.pegitboard.com/pin/b0b39cd746fcdabcc1000acff560051b

https://ru.wikipedia.org/wiki/Keep_Calm_and_Carry_On#mediaviewer/File:Keep_Calm_and_Carry_On_Poster.svg

http://www.belconsole.by/Tematicheskie_razdely/strategii/starcraft_ii_heart_of_the_swarm/starcraft_ii_heart_of_the_swarm_dopolnenie_pc_jewel_/