Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Game of Life - #CommitConf 2018

Avatar for Dani Latorre Dani Latorre
November 26, 2018

Game of Life - #CommitConf 2018

Introduction to TDD and Pair Programing for Conway's Game of Life kata in the coding dojo for CommitConf 2018 in Madrid

Avatar for Dani Latorre

Dani Latorre

November 26, 2018

Other Decks in Technology

Transcript

  1. Me • @dani_latorre • Tech Lead in commercial Zara.com (yes,

    we are hiring) • CachiruloValley member. SOSZ organizer.
  2. What we are going to do? • Safe space to

    experiment and learn ! • The code should have tests • Tips for pair programming: • Be kind • You are not your code • Enjoy!
  3. Test-Driven Development • Test first & • Limiting scope with

    baby steps ' • Incremental design • Rhythm • Confidence
  4. Game of Life • Any live cell with fewer than

    two live neighbors dies, as if by under population • Any live cell with two or three live neighbors lives on to the next generation • Any live cell with more than three live neighbors dies, as if by overpopulation • Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction
  5. First iteration • Pair programming (TriProgramming is permitted, no more)

    • TDD flow: Red - Green - Refactor • Know the problem • At the end delete the code
  6. Second iteration • No magic numbers • No primitives as

    parameters in public methods • Time-boxed pair programming • At the end delete the code
  7. Closing circle ⭕ • What, if anything, did you learn

    today? • What, if anything, surprised you today? • What, if anything, will you do differently in the future? • #commitconf #GoL