Reference
https://refactoring.com/catalog/
https://www.jyt0532.com/toc/refactoring/
1. Long Function
Replace Conditional with Polymorphism
Split Loop (重構與效能) 有時候為了讓程式碼更容易維護, 犧牲效能
4. Data Clumps
5. Primitive Obsession
6. Repeated Switch
7. Temporary Field
8. Alternative Classes with Different Interfaces
9. Refused Bequest
10. Divergent Change
11. Shotgun Surgery
Combine Function into Transform
12. Parallel Inheritance Hierarchies
13. Duplicate Code
14. Lazy Class
15. Speculative Generality
16. Data Class
Remove Setting Method (this value can't change)
17. Dead code
Remove Unreachable Code
18. Feature Envy
19. Message Chains
20. Middle Man
21. Inappropriate Intimacy
Replace Inheritance with Delegation (https://learnku.com/docs/99-software-pattern/delegation-pattern/12018)
22. Comments
23. Global Data
24. Mutable Data
Remove Setting Method (this value can't change)
25. Mysterious Name
26. Incomplete Library Class
27. Loops
28. Insider Trading
No comments:
Post a Comment