tdd performance kata

7
Live TDD Demo Arithmetic Expression Evaluator Ionut G. Stan & Andrei Savu

Upload: openagile-romania

Post on 13-Jan-2015

588 views

Category:

Documents


5 download

DESCRIPTION

 

TRANSCRIPT

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.

Problem1 + 2 * 5 - 4 = ? 

ToolsPython, unittest, TextMate

Data FlowExpression > 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 :)