Reconstruction of some original side:
A, Extract Method principle
Responsibilities codes of different methods pulled out, creating a new approach
Two, Rename Method principle
The two classes in the same way as a parent abstract class, changing the name to the same duties as function method, class methods to ensure consistency
Third, the introduction of design patterns
Test Driven Development
Xp: (logger)
First, demand from the start
Simply log time
Second, changes in demand
The need to expand the error log function algorithm performance log log
Random combination of features: Decorator decorative patterns