Update 'Code_Smells_Patterns/index.md'

main
Ashton McGlone 8 months ago
parent 2290bbb59c
commit 10e6732977

@ -1,25 +1,12 @@
# Code Smell Patterns # Code Smell Patterns
**Code Smells** are often signs that refactoring could be needed. That is not always the case, but these "smells" should be looked at further to dethermine if there is a need for refactoring. **Code Smells** are often signs that refactoring could be needed. That is not always the case, but these "smells" should be looked at further to determine if there is a need for refactoring.
[Duplicated Code](./Duplicated_Code.md) [Duplicated Code](./Duplicated_Code.md)
[Excessive Conditionals](./Excessive_Conditionals.md) [Excessive Conditionals](./Excessive_Conditionals.md)
* Solution: It may be possible to break these conditionals up into smaller, more conscise methods that are easier to read and have a clear purpose. [Reocurring Parameter lists](./Reocurring_Parameter_Lists.md)
**Reocurring Parameter lists**
* Force: Refactoring may be considered if a certian list of parameters keeps reappearing in many methods.
For example:
```
function(int a, int b, string c)
function2(int a, int b, string c)
function3(int a, int b, string c)
```
* Solution: It may be possible to group these parameters into an object and instead pass the object around to different functions rather than passing each parameter.
**Big Objects** **Big Objects**

Loading…
Cancel
Save