From f5c22f30255e7bf0d5aa382e935a0d1267585761 Mon Sep 17 00:00:00 2001 From: reasu Date: Fri, 3 Nov 2023 00:06:07 +0100 Subject: [PATCH] ping pong session --- sessions/02_pen_and_paper/_content.qmd | 8 +- sessions/03_facing_reality/_content.qmd | 73 ------------------- sessions/03_ping_pong/_content.qmd | 97 +++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 77 deletions(-) delete mode 100644 sessions/03_facing_reality/_content.qmd create mode 100644 sessions/03_ping_pong/_content.qmd diff --git a/sessions/02_pen_and_paper/_content.qmd b/sessions/02_pen_and_paper/_content.qmd index 6ffdedb..c60b8e0 100644 --- a/sessions/02_pen_and_paper/_content.qmd +++ b/sessions/02_pen_and_paper/_content.qmd @@ -54,15 +54,15 @@ Outside-In: --- -{{< include ./sessions/_pairing.qmd >}} +{{< include ../_pairing.qmd >}} --- -{{< include ./sessions/_learning_and_practicing.qmd >}} +{{< include ../_learning_and_practicing.qmd >}} --- -{{< include ./sessions/_retrospective.qmd >}} +{{< include ../_retrospective.qmd >}} * How did you simplify? * What is your first test case? @@ -70,4 +70,4 @@ Outside-In: --- -{{< include ./sessions/_short_break.qmd >}} +{{< include ../_short_break.qmd >}} diff --git a/sessions/03_facing_reality/_content.qmd b/sessions/03_facing_reality/_content.qmd deleted file mode 100644 index 26b3678..0000000 --- a/sessions/03_facing_reality/_content.qmd +++ /dev/null @@ -1,73 +0,0 @@ -# Session 2 - -Focus: Familiarize yourself with the code (and face reality). - -Facilitator: Patrick Scheibert, Katrin Heiderer - ---- - -## Existing Code :-( - -The code is there, we want to improve it. - -::: {.r-fit-text} -[https://github.com/swkWien/SupermarketReceipt-Refactoring-Kata](https://github.com/swkWien/SupermarketReceipt-Refactoring-Kata) -::: - ---- - -## Code Review, Refactoring, Pair-Programming - -* Read the code ("read by refactoring") -* Which design elements (aka classes) are there? -* How are they connected? Which classes hold which data? -* Which classes are doing what? -* Compare with your diagrams from session 1. - ---- - -## Tips - -* Start with small IDE refactoring steps. -* Rename the variables so they are more meaningful. -* Extract methods to reduce complexity of the code. - ---- - -## Extra Challenges - -### One Level of Indentation - -Each method cannot contain statements that require more than one level of indentation (conditional statements, loops, etc) - -### Short Methods - -Limit the number of statements permitted for a function to 5 lines. - ---- - -{{< include ../_pairing.qmd >}} - ---- - -{{< include ../_learning_and_practicing.qmd >}} - ---- - -{{< include ../_retrospective.qmd >}} - -* "I agree / Don't agree" - ---- - -{{< include ../_retrospective.qmd >}} - -* Which refactorings did you do? - -* Which class or method names did you change? - -* What was your experience in the pairs with different languages? - ---- - -{{< include ../_short_break.qmd >}} \ No newline at end of file diff --git a/sessions/03_ping_pong/_content.qmd b/sessions/03_ping_pong/_content.qmd new file mode 100644 index 0000000..468968f --- /dev/null +++ b/sessions/03_ping_pong/_content.qmd @@ -0,0 +1,97 @@ +# Session 2 + +Focus: Ping Pong πŸ“ + +Facilitator: Rea Sutter + +--- + +## Get Your Hands Dirty πŸ› οΈπŸ‘·πŸ—οΈ + +Now let's start coding! + +Work test-driven, start with any test from last session + +Switch roles ping-pong style + +--- + +## How to TDD πŸ€”βœ…πŸ’‘ + +::: {.fragment} +πŸŸ₯ RED - write a test and see it fail +::: + +::: {.fragment} +🟩 GREEN - write **minimal amount** of code to pass the test +::: + +::: {.fragment} +🟨 REFACTOR - don't add/change functionality +::: + +::: {.fragment} +πŸ” REPEAT +::: + +--- + +## How to Ping Pong πŸ€”πŸ“πŸ’‘ + +::: {.fragment} +πŸ…°οΈ writes a test, sees it fail +::: + +::: {.fragment} +πŸ‡§ writes the code, sees tests succeed +::: + +::: {.fragment} +πŸ…°οΈ refactors, tests still green +::: + +::: {.fragment} +πŸ‡§ writes the next test, sees it fail +::: + +::: {.fragment} +πŸ…°οΈ writes the code, sees tests succeed +::: + +::: {.fragment} +etc. +::: + +--- + +## Demo πŸ§πŸ’» + +--- + +## Extra Challenge: Explore Directions πŸ§­πŸ—ΊοΈ + +> Inside out? Outside in? + +Which direction are you more comfortable with? + +Try the other one! + +--- + +{{< include ../_pairing.qmd >}} + +--- + +{{< include ../_learning_and_practicing.qmd >}} + +--- + +{{< include ../_retrospective.qmd >}} + +* What went well? +* What was the most difficult part? +* Which role do you prefer, and why? + +--- + +{{< include ../_short_break.qmd >}}