Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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.
 ...
Problem
1 + 2 * 5 - 4 = ? 


Tools
Python, unittest, TextMate


Data Flow
Expression > Split in tokens > Postfix notation ...
Postfix Notation !?


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




      TDD is no silver bullet
Questions?

  thanks :)
Tdd demo
Upcoming SlideShare
Loading in …5
×

Tdd demo

630 views

Published on

  • Be the first to comment

  • Be the first to like this

Tdd demo

  1. 1. Live TDD Demo Arithmetic Expression Evaluator Ionut G. Stan & Andrei Savu
  2. 2. 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.
  3. 3. 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
  4. 4. 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 -
  5. 5. Conclusions TDD is no silver bullet
  6. 6. Questions? thanks :)

×