Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Global Day of Coderetreat Munich 2018

84 views

Published on

The slides of the Global Day of Coderetreat Munich 2018 I facilitated and we organized in the context of our Software Craft Meetup Munich on 17.11.2018.

Published in: Technology
  • Be the first to comment

Global Day of Coderetreat Munich 2018

  1. 1. GLOBAL DAY OF CODERETREAT Munich, November 17, 2018
  2. 2. WHAT IS A CODERETREAT?
  3. 3. 1 DAY 1 KATA
  4. 4. 1 DAY 1 KATA 6 SESSIONS 6 PAIRING PARTNER 6 CONSTRAINTS
  5. 5. Hidden Slide Slower 2000 Developers 100 Cities 6 Continents 18 Time zones GLOBAL DAY OF CODERETREAT
  6. 6. ROLES HOST &Z?jBrA+>y(r
  7. 7. ROLES HOST FACILITATOR &Z?jBrA+>y(r
  8. 8. ROLES HOST FACILITATOR &Z?jBrA+>y(r YOUR PAIR
  9. 9. ROLES HOST FACILITATOR &Z?jBrA+>y(r YOUR PAIR YOU
  10. 10. WHY A CODERETREAT?
  11. 11. @ DAY JOB
  12. 12. @ DAY JOB NO ROOM FOR LEARNING & IMPROVEMENT
  13. 13. A SAFE PLACE NO TIME PRESSURE
  14. 14. A SAFE PLACE NO TIME PRESSURE BE RESPECTFUL
  15. 15. GOALS LEARN
  16. 16. GOALS FUN LEARN
  17. 17. CHALLENGE YOURSELF Experiment Stretch your comfort zone Learn new practices
  18. 18. FOCUS ON finish the problem doing it right practicing improvement
  19. 19. DELETE YOUR CODE After each session
  20. 20. WHY RESET? Clear your mind Focus on different goals Start from different parts
  21. 21. ORGA
  22. 22. PREREQUISITES Working Dev Env DVCS (e.g. Git, Mercurial) Testing Framework Mock Framework (optional)
  23. 23. Local Sponsors Hidden Slide Slower
  24. 24. PLEASE Ask for help Use the feedback wall =>
  25. 25. AGENDA Intro Session 1-3 Lunch Session 4-6 Closing Circle / Retro
  26. 26. HOW IS YOUR EXPERIENCE LEVEL WITH TDD? PLEASE LINE UP!
  27. 27. KATA TIC TAC TOE 3x3 Board Player "X" and "O" Player with 3 in one line wins • horizontal • vertical • diagonal
  28. 28. SESSION 1 PART 1 "THE TEST LIST" Goal Understand • the problem • its test cases
  29. 29. SESSION 1 PART 1 "THE TEST LIST" Think about the use cases / user stories What are reasonable boundaries? Collect a list of tests in a text file (no code!)
  30. 30. SESSION 1 PART 1 "THE TEST LIST" Sync What features / boundaries did you find? What tests did you find? Test categories? Dimensions?
  31. 31. SESSION 1 PART 2 "TEST FIRST" Write a test and let it fail Write the simplest possible implementation that the test runs green
  32. 32. SESSION 1 PART 2 "TEST FIRST" Why? Set a clear goal no YAGNI Separate API from Implementation Causality: Red->Green Testing discipline, high coverage early ROI Only chance for testing an error message
  33. 33. SESSION 1 PART 2 "TEST FIRST" Write one test Let them fail Make the test failure expressive Continue with next very different test
  34. 34. SESSION 1 PART 2 "TEST FIRST" Sync Which tests did you write? Are your test failures expressive? Object(s) under Test?
  35. 35. SESSION 2 "TDD + PING PONG" GOALS Learn TDD Change pairing roles often
  36. 36. SESSION 2 "TDD + PING PONG" TDD = test-first + refactoring = red, green, refactor
  37. 37. SESSION 2 "TDD + PING PONG" Focus write test: what should code do implement: solve the problem refactor: good design
  38. 38. SESSION 2 "TDD + PING PONG" 1. Passes all Tests 2. Reveals intention 3. No Duplication 4. Fewer Elements 4 Rules of Simple Design
  39. 39. SESSION 2 "TDD + PING PONG" Uncle Bob’s 3 Rules of TDD 1. You can't write any production code until you have first written a failing unit test. 2. You can't write more of a unit test than is sufficient to fail, and not compiling is failing. 3. You can't write more production code than is sufficient to pass the currently failing unit test.
  40. 40. SESSION 2 "TDD + PING PONG" TDD GOALS Incremental & Clean Design Fast Feedback
  41. 41. SESSION 2 "TDD + PING PONG" Ping Pong Pairing 1. Alice writes failing test 2. Bob makes test green 3. Bob writes failing test 4. Alice makes test green 5. Alice writes failing test 6. …
  42. 42. SESSION 2 "TDD + PING PONG" Uncle Bob’s 3 Rules of TDD 1. You can't write any production code until you have first written a failing unit test. 2. You can't write more of a unit test than is sufficient to fail, and not compiling is failing. 3. You can't write more production code than is sufficient to pass the currently failing unit test. Do refactor duplication and improve names
  43. 43. SESSION 2 "TDD + PING PONG" Sync What did you observe? What did (not) work? What about design/refactoring? How did pairing work?
  44. 44. SESSION 3 "BABY STEPS TDD" LEARNING GOALS Why are baby steps important How to achieve baby steps
  45. 45. SESSION 3 "BABY STEPS TDD" change 1 Initial code state change 2 state 1 state 2 … change n target code state ● slow feedback ● high risk ● exponential complexity ● problems hard to find LEAP
  46. 46. SESSION 3 "BABY STEPS TDD" get green asap ● commit on green ● revert to green change 1 Initial state change 2 state 1 state 2 … change n target state BABY STEPS
  47. 47. SESSION 3 "BABY STEPS TDD" + fast feedback + less risk - a bit more effort change 1 Initial state change 2 state 1 state 2 … change n target state BABY STEPS
  48. 48. SESSION 3 "BABY STEPS TDD" Start a 2 min. timer when you get red When back to green reset the timer and When timer rings and you are still in red git reset --hard git commit
  49. 49. SESSION 3 "BABY STEPS TDD" Sync How did it work, was it hard? Did you get better during the session? How did you achieve baby steps?
  50. 50. Command & Query Separation Commands: void methods, change state Queries: return value, no side effects SESSION 4 "TELL DON’T ASK" Bertrand Meyer, "Object Oriented Software Construction“
  51. 51. "Procedural code gets information then makes decisions. Object-oriented code tells objects to do things.“ Alex Sharp "The big idea is messaging“ Alan Kay about OO SESSION 4 "TELL DON’T ASK"
  52. 52. SESSION 4 "TELL DON’T ASK" GOALS Learn about messaging in OO
  53. 53. Whats wrong here? point.setX(point.getX() + 1); SESSION 4 "TELL DON’T ASK" Bertrand Meyer, "Object Oriented Software Construction“
  54. 54. Whats wrong here? point.setX(point.getX() + 1); „Asking“ internal state and base calc on Feature Envy SESSION 4 "TELL DON’T ASK" Bertrand Meyer, "Object Oriented Software Construction“
  55. 55. Push "Tell" into Point point.moveRight(); SESSION 4 "TELL DON’T ASK" Bertrand Meyer, "Object Oriented Software Construction“
  56. 56. Constraints • Void only: no return values / exceptions • Change only state in your own members • or send messages to your neighbour object SESSION 4 "TELL DON’T ASK"
  57. 57. Sync What was hard? How did you solve it? What did you learn from it? In which contexts does(n’t) it work? SESSION 4 "TELL DON’T ASK"
  58. 58. GOAL Try Functional Programming SESSION 5 "FUNCTIONAL"
  59. 59. SESSION 5 "FUNCTIONAL" What is Functional Programming?
  60. 60. SESSION 5 "FUNCTIONAL" Constraints No functional language Minimize Mutability pure functions no mutable state Expressions not statements (if necessary: side effects only at the top level) no ifs / switch Name everything Don't abbreviate No primitive types nor anonymous functions / lambdas Intermediary variables instead of chaining function calls
  61. 61. SESSION 5 "FUNCTIONAL" Sync • What was hard? • How did you handle it? • Difference to session before? • What make sense for "real life“?
  62. 62. SESSION 6 "YOUR CHOICE" The goal is fun!
  63. 63. Choose one yourself Your favorite of the day Write your own Testrunner No conditionals & no loops Object Calisthenics Only RegEx SESSION 6 "YOUR CHOICE"
  64. 64. Sync • What did you choose? • What surprised you? • What was hard? • How did you handle it? SESSION 6 "YOUR CHOICE"
  65. 65. • what did you learn today? • what surprised you about today? • what are you going to do differently in your Project? CLOSING
  66. 66. Please give us feedback about the day on the feedback wall so we can improve next time! FEEDBACK
  67. 67. LICENSE Creative Commons Attribution-ShareAlike
  68. 68. IMAGES Some are Public Domain except theses licensed with Creative Commons with attributions: By Symbolon By Ainsley Wagoner
  69. 69. IMAGES By Luis Prado Dave Gandy Christopher.Michel
  70. 70. IMAGES Kigsz Another Believer Maria Ly
  71. 71. IMAGES Büşra ÖZCOŞKUN Guru Aneeque Ahmed
  72. 72. IMAGES  Rudy Jaspers  logan Hopkins
  73. 73. IMAGES  Kick THOR Seattle Municipal Archives
  74. 74. IMAGES   Uriel Sosa Adrien Coquet Yogesh More

×