TDD Le Principe de priorite des transformations

Post on 11-Nov-2014

1.318 views 0 download

Tags:

description

 

Transcript of TDD Le Principe de priorite des transformations

TDD & Le Principe de Prioritédes Transformations

Eric Lefevre-ArdantAgile France 27 Mai 2011

http://ericlefevre.net/ - http://twitter.com/elefevre

Prérequis

● TDD● Ordinateur

Au programme

● Implémentation en TDD classique● Introduction aux Transformations● Implémentation avec Transformations

Implémentation classique

http://www.flickr.com/photos/elefevre/5523345912/

Introduction aux Transformations

http://www.flickr.com/photos/elefevre/2744262464/

Refactorings vs. Transformations

if > récursion > boucle

Règle 1

En codant, préférer les transformations les plus prioritaires

Règle 2

Préférer les tests qui peuvent être passés avec les transformations les

plus prioritaires

Règle 3

Revenir en arrière pour voir s’il n’y aurait pas un test qui permettent une

transformation plus prioritaire.

Implémentation avec Transformations

http://www.flickr.com/photos/elefevre/5014954493/

A retenir...

http://www.flickr.com/photos/elefevre/5090027951

Opérations arithmétiques == fonctions

http://www.flickr.com/photos/elefevre/3943421085/

La Récursion est prioritaire (?)

http://www.flickr.com/photos/elefevre/5681328034/

L'ordre des priorités est à raffiner

http://www.flickr.com/photos/elefevre/5383402081/

Ne pas hésiter à revenir en arrière

http://www.flickr.com/photos/elefevre/2815032208

Connaissance du domaine nécessaire

http://www.flickr.com/photos/elefevre/2812899993

Difficile d'ajouter des fonctionnalités

http://www.flickr.com/photos/elefevre/2813914543/

Autres transformations ?

http://www.flickr.com/photos/nukeit1/244748817/

"To understand the limits of a technique,overuse it then back off."

Steve Freeman, 22 avril 2011http://twitter.com/#!/sf105/status/61423778055462912

Références

● http://cleancoder.posterous.com/the-transformation-priority-premise

Programme

● 09h30-09h45 Introduction● 09h45-10h15 Implémentation en TDD classique● 10h15-10h30 Introduction aux Transformations● 10h30-11h00 Implémentation avec Transformations● 11h00-11h30 Pause● 11h30-11h45 Rétrospective Intermédiaire● 11h45-12h15 Implémentation avec Transformations (suite)● 12h15-12h30 Rétrospective● 12h30-13h00 Démo