SlideShare a Scribd company logo
Sam Serpoosh

@masihjesus
http://masihjesus .wordpress.com
https://github.com/Sam-Serpoosh
http://linkedin.com /in/samserpoosh
“programmers have more in
common with chefs than
with desk jockeys like
accountants or attorneys.”
~Greg Baugues
 Nobody

wants
to wash the
dishes!


Test-First programming.



Kent Beck used it in Chrysler C3 project
in 1996.



TDD in XP(eXtreme Programming)
practices.



the most important and useful approach
Enumerable

Select method in

Ruby!
• Invokes the block passing in

successive elements from
self, returning an array containing
those elements for which the block
returns a true value (equivalent to
Enumerable#select).
it “fetches green squares” do
green_square =
squares.select {|square| square.color ==
green}
green_square.color.should == green
end


Tests tell the code
how to look like from
its user’s perspective



It is more a design
technique and tests
are great side-effects!



You feel the pain
first when it’s hard
to use!


You are not allowed to write any
production code unless you have a failing
unit test and that production code is about
to make it pass.



You are not allowed to write any more of a
unit test than is sufficient to fail; and
compilation failures are failures.



You are not allowed to write any more
production code than is sufficient to pass
the one failing unit test.
Kent Beck defines:


Never write a single line of code unless
you have a failing automated test.



Eliminate Duplication(DRY, Don’t
Repeat Yourself)







Red (Automated test fails)
Green (Automated test pass)
Refactor (eliminate
duplication, eliminate the mess, clean
the code)
Sushi Chef Metaphor
Red
Dirty Dishes of dinner
Green

Refactor
Start

Write a
test
See it fails
because there’s
no dev code

Run the Test

Write (just enough)
Dev Code to compile
See it fails
because no logic
is implemented

Run the Test
Write (just enough)
Dev Code to compile

See the
Test pass

Run the Test

Refactoring
•

Knowing about execution of system all the
times.

•

Short cycles (even 10 minutes is too long).

•

A minute ago all their code worked. (Pick a
Random Person)
•

Thousands of unit tests will be
produced.

•

Can run them anytime we want.

•

Whenever we make any kind of change.

•

Executable and live documentation of
system instead of pile of papers.
•

There’s a test as an example to show
you what you want!

•

They CANNOT be out of date

•

Make the FEAR disappear (Refactoring)
 Oh

My God this
code is a mess

I

need to clean this up!
 But I’m not gonna touch it!
TDD 
Testable
Decoupled

Decoupling
most important
factor
TDD 
managing dependency better 
DIP
•

so much flexible and easy to change.
Software is Soft again! Go ahead and
change!

•

NOT  Fragile, Rigid, Immobile

•
TESTS MORE SPECIFIC

CODE MORE GENERAL
•

2005 study  TDD  more productive &
increase their confidence.

•

software  much more
flexible, reliable, testable & with great live
documentation.

•

NOT PROFESSIONAL if you don’t do TDD
(~ Uncle Bob, Ron Jeffries, Kent
Beck, etc.)
had been a programmer for 3 decades
before I was introduced to TDD. I did not
think anyone could teach me a low level
programming practice that would make a
difference. But when I started TDD, I was
dumbfounded at the effectiveness of the
technique.
~ Robert C. Martin

I
Blog posts and articles:


Grand Design by Stephen Hawking &
Leonard Mlodinow

•

http://objectmentor.com/articles

•

http://cleancoder.com/articles

•

http://codebetter.com/articles

•

Code like a chef series!
•

Robert C. Martin craftsmanship article
series

•

Uncle Bob on Rules and Benefits of TDD

•

Michael Feathers Synergy between Design
and Testability

•

Jeremy D. Miller Writing Maintainable
Programs series

•

Sarah Gray on Visualizing Enumerable
Books:
• TDD by Example (Kent Beck)
• Clean Code (Robert C. Martin)
• Agile Software Development
Principles, Patterns, Practices (Robert C.
Martin)
• Working Effectively With Legacy Code
(Michael Feathers)
• Growing Object-Oriented Software Guided
by Tests (Steve Freeman & Nat Pryce)
• Refactoring (Martin Fowler)
Lectures And Conferences:
•
•
•
•
•
•
•

Clean Code I, II (Robert C. Martin)
Are you a Professional? (Robert C. Martin)
Synergy between Design and Testability
(Michael Feathers)
Effective Software Development (Alistair
Cockburn)
Clean, Testable Code (Misko Hevery)
Clean Coders Videos (Clean Code Matters)
Destroy All Software (Gary Bernhardt)
TDD & Effective Software Development

More Related Content

What's hot

The problem with tdd
The problem with tddThe problem with tdd
The problem with tddDror Helper
 
Intro to TDD
Intro to TDDIntro to TDD
Intro to TDD
Jason Nocks
 
Four Stages of Automated Testing by Bradley Temple
Four Stages of Automated Testing by Bradley TempleFour Stages of Automated Testing by Bradley Temple
Four Stages of Automated Testing by Bradley Temple
QA or the Highway
 
Improve your TDD skills
Improve your TDD skillsImprove your TDD skills
Improve your TDD skills
XPeppers
 
Daniel Cerecedo | From legacy to cloud... and beyond | Codemotion Madrid 2018
Daniel Cerecedo | From legacy to cloud... and beyond | Codemotion Madrid 2018  Daniel Cerecedo | From legacy to cloud... and beyond | Codemotion Madrid 2018
Daniel Cerecedo | From legacy to cloud... and beyond | Codemotion Madrid 2018
Codemotion
 
My journey as a developer
My journey as a developerMy journey as a developer
My journey as a developer
Mehdi Khalili
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
Hicham El Hammouchi
 
Test Driven Development: More Development Than Ever
Test Driven Development: More Development Than EverTest Driven Development: More Development Than Ever
Test Driven Development: More Development Than Ever
Kiryl Baranoshnik
 
Pair Programming (2014)
Pair Programming (2014)Pair Programming (2014)
Pair Programming (2014)Peter Kofler
 
TestBash: Quality Does Not Belong With the Tester!
TestBash: Quality Does Not Belong With the Tester!TestBash: Quality Does Not Belong With the Tester!
TestBash: Quality Does Not Belong With the Tester!
Maaret Pyhäjärvi
 
Coderetreat @ CodersTUG
Coderetreat @ CodersTUGCoderetreat @ CodersTUG
Coderetreat @ CodersTUGMatteo Baglini
 
Bringing Open-Source Practices to Your Day Job
Bringing Open-Source Practices to Your Day JobBringing Open-Source Practices to Your Day Job
Bringing Open-Source Practices to Your Day Job
Ben Coe
 
Unit testing for project managers
Unit testing for project managersUnit testing for project managers
Unit testing for project managers
Zend by Rogue Wave Software
 
The Software Craftsman (2nd edition)
The Software Craftsman (2nd edition)The Software Craftsman (2nd edition)
The Software Craftsman (2nd edition)
goeran
 
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
Igor Bronovskyy
 
Best pratice
Best praticeBest pratice
Best pratice
Eugenio Romano
 
Pair programming demystified
Pair programming demystifiedPair programming demystified
Pair programming demystified
Marek Kirejczyk
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
Md. Enamul Haque Chowdhury
 
Visual Studio tricks every dot net developer should know
Visual Studio tricks every dot net developer should knowVisual Studio tricks every dot net developer should know
Visual Studio tricks every dot net developer should know
Dror Helper
 
Outside-in Testing in Vue with Cypress
Outside-in Testing in Vue with CypressOutside-in Testing in Vue with Cypress
Outside-in Testing in Vue with Cypress
Josh Justice
 

What's hot (20)

The problem with tdd
The problem with tddThe problem with tdd
The problem with tdd
 
Intro to TDD
Intro to TDDIntro to TDD
Intro to TDD
 
Four Stages of Automated Testing by Bradley Temple
Four Stages of Automated Testing by Bradley TempleFour Stages of Automated Testing by Bradley Temple
Four Stages of Automated Testing by Bradley Temple
 
Improve your TDD skills
Improve your TDD skillsImprove your TDD skills
Improve your TDD skills
 
Daniel Cerecedo | From legacy to cloud... and beyond | Codemotion Madrid 2018
Daniel Cerecedo | From legacy to cloud... and beyond | Codemotion Madrid 2018  Daniel Cerecedo | From legacy to cloud... and beyond | Codemotion Madrid 2018
Daniel Cerecedo | From legacy to cloud... and beyond | Codemotion Madrid 2018
 
My journey as a developer
My journey as a developerMy journey as a developer
My journey as a developer
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development: More Development Than Ever
Test Driven Development: More Development Than EverTest Driven Development: More Development Than Ever
Test Driven Development: More Development Than Ever
 
Pair Programming (2014)
Pair Programming (2014)Pair Programming (2014)
Pair Programming (2014)
 
TestBash: Quality Does Not Belong With the Tester!
TestBash: Quality Does Not Belong With the Tester!TestBash: Quality Does Not Belong With the Tester!
TestBash: Quality Does Not Belong With the Tester!
 
Coderetreat @ CodersTUG
Coderetreat @ CodersTUGCoderetreat @ CodersTUG
Coderetreat @ CodersTUG
 
Bringing Open-Source Practices to Your Day Job
Bringing Open-Source Practices to Your Day JobBringing Open-Source Practices to Your Day Job
Bringing Open-Source Practices to Your Day Job
 
Unit testing for project managers
Unit testing for project managersUnit testing for project managers
Unit testing for project managers
 
The Software Craftsman (2nd edition)
The Software Craftsman (2nd edition)The Software Craftsman (2nd edition)
The Software Craftsman (2nd edition)
 
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
 
Best pratice
Best praticeBest pratice
Best pratice
 
Pair programming demystified
Pair programming demystifiedPair programming demystified
Pair programming demystified
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Visual Studio tricks every dot net developer should know
Visual Studio tricks every dot net developer should knowVisual Studio tricks every dot net developer should know
Visual Studio tricks every dot net developer should know
 
Outside-in Testing in Vue with Cypress
Outside-in Testing in Vue with CypressOutside-in Testing in Vue with Cypress
Outside-in Testing in Vue with Cypress
 

Similar to TDD & Effective Software Development

Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
Danny Preussler
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven developmentEinar Ingebrigtsen
 
How to test a Mainframe Application
How to test a Mainframe ApplicationHow to test a Mainframe Application
How to test a Mainframe Application
Michael Erichsen
 
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
ssusercaf6c1
 
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
Nacho Cougil
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)
Nacho Cougil
 
TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)
Ahmed Misbah
 
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
Paulo Clavijo
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is Importaint
Sana Nasar
 
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd   seven years afterIan Cooper webinar for DDD Iran: Kent beck style tdd   seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
Iranian Domain-Driven Design Community
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Jason Tice
 
TDD in Agile
TDD in AgileTDD in Agile
TDD in Agile
Atish Narlawar
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
michael.labriola
 
TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012
Alan Christensen
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
Jon Kruger
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)
Thierry Gayet
 
TDD In Practice
TDD In PracticeTDD In Practice
TDD In Practice
Alan Christensen
 
Unit Testing talk
Unit Testing talkUnit Testing talk
Unit Testing talk
Sergei Kukharev
 
TDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekTDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech Week
Nacho Cougil
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
Pablo Villar
 

Similar to TDD & Effective Software Development (20)

Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
How to test a Mainframe Application
How to test a Mainframe ApplicationHow to test a Mainframe Application
How to test a Mainframe Application
 
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
 
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)
 
TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)
 
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
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is Importaint
 
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd   seven years afterIan Cooper webinar for DDD Iran: Kent beck style tdd   seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
 
TDD in Agile
TDD in AgileTDD in Agile
TDD in Agile
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)
 
TDD In Practice
TDD In PracticeTDD In Practice
TDD In Practice
 
Unit Testing talk
Unit Testing talkUnit Testing talk
Unit Testing talk
 
TDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekTDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech Week
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
 

Recently uploaded

Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 

Recently uploaded (20)

Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 

TDD & Effective Software Development

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 10.
  • 11.
  • 12.
  • 13. “programmers have more in common with chefs than with desk jockeys like accountants or attorneys.” ~Greg Baugues
  • 15.
  • 16.
  • 17.  Test-First programming.  Kent Beck used it in Chrysler C3 project in 1996.  TDD in XP(eXtreme Programming) practices.  the most important and useful approach
  • 18.
  • 19.
  • 20. Enumerable Select method in Ruby! • Invokes the block passing in successive elements from self, returning an array containing those elements for which the block returns a true value (equivalent to Enumerable#select).
  • 21. it “fetches green squares” do green_square = squares.select {|square| square.color == green} green_square.color.should == green end
  • 22.  Tests tell the code how to look like from its user’s perspective  It is more a design technique and tests are great side-effects!  You feel the pain first when it’s hard to use!
  • 23.  You are not allowed to write any production code unless you have a failing unit test and that production code is about to make it pass.  You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.  You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
  • 24. Kent Beck defines:  Never write a single line of code unless you have a failing automated test.  Eliminate Duplication(DRY, Don’t Repeat Yourself)
  • 25.      Red (Automated test fails) Green (Automated test pass) Refactor (eliminate duplication, eliminate the mess, clean the code) Sushi Chef Metaphor Red Dirty Dishes of dinner Green Refactor
  • 26. Start Write a test See it fails because there’s no dev code Run the Test Write (just enough) Dev Code to compile See it fails because no logic is implemented Run the Test Write (just enough) Dev Code to compile See the Test pass Run the Test Refactoring
  • 27. • Knowing about execution of system all the times. • Short cycles (even 10 minutes is too long). • A minute ago all their code worked. (Pick a Random Person)
  • 28.
  • 29. • Thousands of unit tests will be produced. • Can run them anytime we want. • Whenever we make any kind of change. • Executable and live documentation of system instead of pile of papers.
  • 30. • There’s a test as an example to show you what you want! • They CANNOT be out of date • Make the FEAR disappear (Refactoring)
  • 31.  Oh My God this code is a mess I need to clean this up!  But I’m not gonna touch it!
  • 33. • so much flexible and easy to change. Software is Soft again! Go ahead and change! • NOT  Fragile, Rigid, Immobile •
  • 35. • 2005 study  TDD  more productive & increase their confidence. • software  much more flexible, reliable, testable & with great live documentation. • NOT PROFESSIONAL if you don’t do TDD (~ Uncle Bob, Ron Jeffries, Kent Beck, etc.)
  • 36. had been a programmer for 3 decades before I was introduced to TDD. I did not think anyone could teach me a low level programming practice that would make a difference. But when I started TDD, I was dumbfounded at the effectiveness of the technique. ~ Robert C. Martin I
  • 37. Blog posts and articles:  Grand Design by Stephen Hawking & Leonard Mlodinow • http://objectmentor.com/articles • http://cleancoder.com/articles • http://codebetter.com/articles • Code like a chef series!
  • 38. • Robert C. Martin craftsmanship article series • Uncle Bob on Rules and Benefits of TDD • Michael Feathers Synergy between Design and Testability • Jeremy D. Miller Writing Maintainable Programs series • Sarah Gray on Visualizing Enumerable
  • 39. Books: • TDD by Example (Kent Beck) • Clean Code (Robert C. Martin) • Agile Software Development Principles, Patterns, Practices (Robert C. Martin) • Working Effectively With Legacy Code (Michael Feathers) • Growing Object-Oriented Software Guided by Tests (Steve Freeman & Nat Pryce) • Refactoring (Martin Fowler)
  • 40. Lectures And Conferences: • • • • • • • Clean Code I, II (Robert C. Martin) Are you a Professional? (Robert C. Martin) Synergy between Design and Testability (Michael Feathers) Effective Software Development (Alistair Cockburn) Clean, Testable Code (Misko Hevery) Clean Coders Videos (Clean Code Matters) Destroy All Software (Gary Bernhardt)