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

Coderetreat @Q42

Coderetreat @Q42

Slides used during the Coderetreat held at Q42. For more details read the blog https://blog.q42.nl/team-philips-hue-goes-on-code-retreat-d515c699f902

Mark van Straten

July 07, 2017
Tweet

More Decks by Mark van Straten

Other Decks in Programming

Transcript

  1. What is it? • Intensive practice event • Focus on

    fundamentals of software development • Focus on skill improvement • Get out of your comfort zone
  2. Things we will practice today • Pair programming • Test

    Driven Development • Reducing Complexity • Self Documenting Code
  3. Schedule • 9:30 - 9:45 - intro • 9:45 -

    10:45 - session #1 - 45 mins coding, 15 mins retro • 11:00 - 12:00 - session #2 • Lunch • 13:00 - 14:00 - session #3 • 14:15 - 15:15 - session #4 • 15:30 - 16:30 - MOB programming • 16:30 - Wrap up with some drinks
  4. • Find somebody to pair with • `mkdir coderetreat &&

    cd coderetreat && git init` • End of the session `cd .. && rm -rf coderetreat/` • Retrospective How To
  5. Conway’s game of life 1. Any live cell with fewer

    than two live neighbours dies, as if caused by underpopulation. 2. Any live cell with two or three live neighbours lives on to the next generation. 3. Any live cell with more than three live neighbours dies, as if by overpopulation. 4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
  6. Session #1 - Ping Pong 1. Person A only writes

    testcase 2. Person B only gets the test to pass 3. Both persons refactor when appropriate 4. Switch roles, repeat “Red ⟼ Green ⟼ Refactor”
  7. 4 Rules of simplicity 1. Pass All Tests 2. Clear,

    Expressive & Consistent 3. Duplicates no behaviour or configuration 4. Minimal Methods, Classes & Modules
  8. Session #2 - Baby steps Prep: Take your phone, set

    timer at 2 minute interval 1. Start timer; Write one test and make it pass before timer runs out a. Success? ⟼ `git commit` Failure? ⟼ `git reset --hard` 2. Start timer; Refactor and make tests pass before timer runs out a. Success? ⟼ `git commit` Failure? ⟼ `git reset --hard` 3. Goto 1. No talking without a running timer!
  9. • No talking • Ping pong (write test; implement it)

    • Most nefarious implementation passing test Session #3 - Mute Evil Coder
  10. Session #4 - Dirty Is my last name Implement as

    dirty and fast as possible. Anything goes. Simply get this thing running!
  11. Mob Programming • 1 driver - only translating commands into

    code • 1 navigator - directing the driver • Rest = researchers helping the navigator • Role change every 5 minutes
  12. Mob Task: LCD Digits Your task is to create an

    LCD string representation of an integer value using a 3x3 grid of space, underscore, and pipe characters for each digit. Each digit is shown below (using a dot instead of a space) ._. ... ._. ._. ... ._. ._. ._. ._. ._. |.| ..| ._| ._| |_| |_. |_. ..| |_| |_| |_| ..| |_. ._| ..| ._| |_| ..| |_| ..| Example: 910 ._. ... ._. |_| ..| |.| ..| ..| |_| https://gist.github.com/crunchie84/4aa7c1c29e94aef4f28a1f3a9efedc92#file-code- kata-lcd-digits-md
  13. Closing circle (Retrospective) 1. What, if anything, did you learn

    today? 2. What, if anything, surprised you today? 3. What, if anything, will you do differently in the future?