Skip to content

Commit

Permalink
Additional links for split variable refactoring and learning hour
Browse files Browse the repository at this point in the history
  • Loading branch information
emilybache committed Nov 25, 2024
1 parent b2c63f1 commit c238aa6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions _code_smells/variable_with_long_scope.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: code_smell
title: Variable with Long Scope
name: variable_with_long_scope
source: Emily Bache
---

Expand Down
3 changes: 2 additions & 1 deletion _learning_hours/refactoring/split_variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
theme: refactoring
title: Split Variable
name: split_variable
code_smell: variable_with_long_scope
kata: tennis
difficulty: 3
author: emilybache
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit c238aa6

Please sign in to comment.