From 8253e5b9a91e24bb6a342bc686f25b8686c430e6 Mon Sep 17 00:00:00 2001 From: Ashton McGlone Date: Mon, 17 Feb 2025 15:20:55 -0500 Subject: [PATCH] Add 'Code_Smells_Patterns/Duplicated_Code.md' --- Code_Smells_Patterns/Duplicated_Code.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Code_Smells_Patterns/Duplicated_Code.md diff --git a/Code_Smells_Patterns/Duplicated_Code.md b/Code_Smells_Patterns/Duplicated_Code.md new file mode 100644 index 0000000..713784f --- /dev/null +++ b/Code_Smells_Patterns/Duplicated_Code.md @@ -0,0 +1,5 @@ +**Duplicated Code** + +* Force: Refactoring may be considered if a common structure is recongized among related methods. + +* Solution: It may be possible to generalize smaller methods to allow them to work as one. However, you must be careful to not over generalize a method and allow it to have more power than nessecary. A good metric to measure by is that a method should have between 6-8 meaningful lines of code.