TDD Coding Dojo
Mahmood Hanif
mmhanif@gmail.com
https://www.linkedin.com/in/mhanif
Shu-Ha-Ri
First learn, then detach, and finally
transcend.
Legacy Code =
Code without Tests
http://www.objectmentor.com/resources/articles/xp
episode.htm
Bowling Game – Robert C Martin (Uncle Bob)
Red-Green-Refactor
Above diagram copied shamelessly from unknown online source via Google Images
•Given
•When
•Then
•Arrange
•Act
•Assert
Conway’s Game Of Life
https://en.wikipedia.org/wiki/Conway%27s_Ga
me_of_Life
http://www.bitstorm.org/gameoflife/
Rules
• Any live cell with fewer than two live neighbours
dies, as if caused by under-population.
• Any live cell with two or three live neighbours
lives on to the next generation.
• Any live cell with more than three live neighbours
dies, as if by over-population.
• Any dead cell with exactly three live neighbours
becomes a live cell, as if by reproduction.
Randori
• Two people at a time
• One person at keyboard
• The other assists
• Every 5 minutes keyboarder moves off,
assister goes to keyboard, new person assists
http://cyber-dojo.org: 98D0F6
Retrospective
What did we learn?
https://github.com/mmhanif/GOL

Tdd Coding Dojo