Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 2099
- - **DRY**: Don't Repeat Yourself
- - Refactor the common functionality into one method, if copies in same class
- - Inheritance for multiple classes
- - **Technical Debt**
- - Things being harder to maintain in the long run
- - No point of JavaDoc-ing private attributes
- - **Fail-fast**
- - catch the error as soon as you can, stop everything to avoid a flawed process
- - **Defensive copying**
- - return a copy of something rather than the reference to stop other classes from modifying it
- - **Pre-conditions**
- - Handled using `Exceptions` or `Assertions`
- - **Associations vs Dependencies**
- - **Dependency Inversion**
- - You have two things that inherit from one thing
- - Make a superclass
- - Have the dependencies move to that
- ```
- test = "gtgtgtgt"
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement