Mindmap
Code Smells
Inhalt der Mindmap
Code Smells
"surface indication corresponding to a deeper problem in the system"
Where do they come from?
- Technical Debt
- Doing things the "fast" way
Types
- Bloaters
- Large classes
- Long methods
- Data Clumps
- Long parameter list
- OO Abusers
- Refused Bequest
- Switch statements
- Change Preventers
- Shotgun surgery
- Divergent Change
- Dispensables
- Duplicated code
- Lazy Class
- Data class
- Couplers
- Feature envy
- Inappropriate Intimacy
- Middle man
- Bloaters
Code smells help us find the problem
- Refactoring
- Incremental changes that improve design without changing functionality
- Behavior Preserving
- Why Refactor?
- Needs improvement
- Messy code
- Requirements change
- Types
- Rename
- Collapse Hierarchy
- Consolidate/Decompose conditional
- Extract Method
- Extract class
- Tools
- IDE's have many built-in tools to help us refactor
- When to refactor?
- adding a feature
- code review
- fixing a bug
- Refactoring is a part of the TDD cycle
- Test-Driven Development
- Why TDD?
- Huge expenses with bugs (607 billion in 2020)
- Verification Approaches
- Dynamic Verification
- Try to make it fail!
- Executing code to verify expected behavior
- Testing Stages
- Developer's Testing
- Alpha Testing
- Beta Testing
- Product Release
- Beta Testing
- Alpha Testing
- Within organization
- Outside organization
- Developer's Testing
- Static Verification
- Finding potential issues
- No execution
- Inspections/Reviews/Walkthroughs
- Inspection -- moderator + formal
- Review -- peers + less formal
- Walkthrough -- author + informal
- Formal Verification
- Time-consuming and expensive
- For high stakes scenarios
- Dynamic Verification
- Testing Techniques
- Opaque Box: assess from outside
- Clear Box: looking under the hood
- Writing tests before the code
- Red, Green, Refactor
- Make it fail, make it work, make it better
- Red, Green, Refactor
- Why TDD?
- Test-Driven Development
- Refactoring
Informationen
- Beschreibung
- Mindmap am Code Smells, erstellt von Matthew Pendarvis am 01/08/2024.
- Erstellt von
- Matthew Pendarvis · Aug 2024
- Aktualisiert
- 1 Aug 2024
- Aufrufe
- 1
- Bewertung