User:AVS/Refactoring Rules
From VCMI Project Wiki
< User:AVS
- No code duplication.
- No magic nombers
- use constant if value comes from code (mostly for enums)
- use configuration if value comes from configuration (text ids from general text handler).
- use configuration for widgets
- use string value to retrieve configuration parameters.
- Low coupling
- include only indispensable headers
- try use all classes from included headers. Consider refactoring if U use only small part of "known classes"
- (*) (!) we need automated testing to use refactoring heavily.