From c238aa638734761a01a96a44f2a90bfd8ba666ae Mon Sep 17 00:00:00 2001 From: emily Date: Mon, 25 Nov 2024 09:18:03 +0100 Subject: [PATCH] Additional links for split variable refactoring and learning hour --- _code_smells/variable_with_long_scope.md | 1 + _learning_hours/refactoring/split_variable.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/_code_smells/variable_with_long_scope.md b/_code_smells/variable_with_long_scope.md index 8299b0c..93903c8 100644 --- a/_code_smells/variable_with_long_scope.md +++ b/_code_smells/variable_with_long_scope.md @@ -1,6 +1,7 @@ --- layout: code_smell title: Variable with Long Scope +name: variable_with_long_scope source: Emily Bache --- diff --git a/_learning_hours/refactoring/split_variable.md b/_learning_hours/refactoring/split_variable.md index a636afd..7938acf 100644 --- a/_learning_hours/refactoring/split_variable.md +++ b/_learning_hours/refactoring/split_variable.md @@ -2,6 +2,7 @@ theme: refactoring title: Split Variable name: split_variable +code_smell: variable_with_long_scope kata: tennis difficulty: 3 author: emilybache @@ -39,7 +40,7 @@ Depending on how confident your group will be able to do these refactorings, you 3. **Calculated Datamember** In Office Cleaner 9 there is a method 'parseInput' that calculates two datamembers - coordHashSet and position. If you want to extract parts of this calculation to a testable pure function then it will need to be passed the current state of these datamembers explicitly. You split the assignment of the datamember from the calculation of its value by introducing a new variable for the calculation, then assigning it at the end. ## Concrete: do split variable -Set the group loose on the refactoring in all the examples you've shown. Make sure they have access to the list of the safe steps for all variants of this refactoring, and remind them to use their tools. +Set the group loose on the refactoring in all the examples you've shown. Make sure they have access to the [list of the safe steps]({% link _refactorings/split_variable.md %}) for all variants of this refactoring, and remind them to use their tools. ## Conclusions: when will you use this? How will you notice you need 'split variable'? What will you do then? This is a [Write important takeaway]({% link _activities/conclusions/write_important_takeaway.md %}) conclusion.