Mind map
Refactoring
Map content
Refactoring
Small independent changes with the goal of improving
Rename
Collapse Hierarchy
Extract Method
Consolidate Conditional
- Could write a method to evaluate larger conditionals
Decompose Conditionals
Extract Class
Important in industry where quality is important
- Test Driven Development
- Dynamic Verification(testing)
- Performing levels of tests on the system to make sure it responds correctly
- Static Verification
- Examining code without executing it
- Inspections/Reviews
- Human intensive and often group-based review of the code
- Formal Verification
- Mathematical proof to ensure the code is 100% correct, can be very expensive
- Writing the tests before the classes
- Make it fail(TDD), make it work, make it better(refactor)
- Dynamic Verification(testing)
- Test Driven Development
Should not refactor if code is broken
Code Smells
- An indication that a deeper problem exists in the code
- Technical debt - the amount of work created by trying to save time up front
- Helps us identify problems
- Bloaters
- Classes that become too large
- OO Abusers
- Long switch statements instead of a method
- Change Preventers
- Shotgun surgery: having to make many small changes every time we make changes
- Divergent change: making too many changes in one class when making changes
- Dispensables
- Feature Envy
Information
- Description
- Mind Map on Refactoring, created by Charlie McHenry on 01/08/2024.
- Created by
- Charlie McHenry
- Views
- 2
- Rating