SlideShare una empresa de Scribd logo
1 de 7
Descargar para leer sin conexión
Live TDD Demo


Arithmetic Expression Evaluator


  Ionut G. Stan & Andrei Savu
Mindset change

Think about the smallest feature that you want to
implement and express it in test code.
 
Implement it.
 
This leads to emergent design.
Problem
1 + 2 * 5 - 4 = ? 


Tools
Python, unittest, TextMate


Data Flow
Expression > Split in tokens > Postfix notation > Evaluate

1+2*5-4  >  (1, +, 2, *, 5, -, 4)  >  (1, 2, 5, *, +, 4, -)  >  7
Postfix Notation !?


     1 + 2             >   1 2 +
     1 + 2 - 3        >   1 2 + 3 -
     1 + 2 * 3        >   1 2 3 * + 
     1 + 2 * 3 - 4  >   1 2 3 * + 4 -
Conclusions




      TDD is no silver bullet
Questions?

  thanks :)

Más contenido relacionado

Más de OpenAgile Romania

Daniel nicolescu agilepm-final
Daniel nicolescu agilepm-finalDaniel nicolescu agilepm-final
Daniel nicolescu agilepm-finalOpenAgile Romania
 
Executive Report Executive Dashboard Report Handout
Executive Report Executive Dashboard Report HandoutExecutive Report Executive Dashboard Report Handout
Executive Report Executive Dashboard Report HandoutOpenAgile Romania
 
Executive Dashboard Report For Agile Projects
Executive Dashboard Report For Agile ProjectsExecutive Dashboard Report For Agile Projects
Executive Dashboard Report For Agile ProjectsOpenAgile Romania
 
The Life Of A Tester In An Agile Team
The Life Of A Tester In An Agile TeamThe Life Of A Tester In An Agile Team
The Life Of A Tester In An Agile TeamOpenAgile Romania
 
The Craftsman Developer In An Agile World
The Craftsman Developer In An Agile WorldThe Craftsman Developer In An Agile World
The Craftsman Developer In An Agile WorldOpenAgile Romania
 

Más de OpenAgile Romania (10)

Daniel nicolescu agilepm-final
Daniel nicolescu agilepm-finalDaniel nicolescu agilepm-final
Daniel nicolescu agilepm-final
 
Open ro agilecoaching
Open ro agilecoachingOpen ro agilecoaching
Open ro agilecoaching
 
Survive In Agility Islands
Survive In Agility IslandsSurvive In Agility Islands
Survive In Agility Islands
 
Agile Startup
Agile StartupAgile Startup
Agile Startup
 
Brain & Quality Software
Brain & Quality SoftwareBrain & Quality Software
Brain & Quality Software
 
Uber Vu - Scrum & Startups
Uber Vu - Scrum & StartupsUber Vu - Scrum & Startups
Uber Vu - Scrum & Startups
 
Executive Report Executive Dashboard Report Handout
Executive Report Executive Dashboard Report HandoutExecutive Report Executive Dashboard Report Handout
Executive Report Executive Dashboard Report Handout
 
Executive Dashboard Report For Agile Projects
Executive Dashboard Report For Agile ProjectsExecutive Dashboard Report For Agile Projects
Executive Dashboard Report For Agile Projects
 
The Life Of A Tester In An Agile Team
The Life Of A Tester In An Agile TeamThe Life Of A Tester In An Agile Team
The Life Of A Tester In An Agile Team
 
The Craftsman Developer In An Agile World
The Craftsman Developer In An Agile WorldThe Craftsman Developer In An Agile World
The Craftsman Developer In An Agile World
 

Tdd demo

  • 1. Live TDD Demo Arithmetic Expression Evaluator Ionut G. Stan & Andrei Savu
  • 2.
  • 3. Mindset change Think about the smallest feature that you want to implement and express it in test code.   Implement it.   This leads to emergent design.
  • 4. Problem 1 + 2 * 5 - 4 = ?  Tools Python, unittest, TextMate Data Flow Expression > Split in tokens > Postfix notation > Evaluate 1+2*5-4  >  (1, +, 2, *, 5, -, 4)  >  (1, 2, 5, *, +, 4, -)  >  7
  • 5. Postfix Notation !?  1 + 2             >   1 2 +  1 + 2 - 3        >   1 2 + 3 -  1 + 2 * 3        >   1 2 3 * +   1 + 2 * 3 - 4  >   1 2 3 * + 4 -
  • 6. Conclusions TDD is no silver bullet