Difference between revisions of "User:AVS/Refactoring Rules"
From VCMI Project Wiki
< User:AVS
(Created page with "# 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 gen...") |
(No difference)
|
Latest revision as of 08:52, 18 January 2013
- 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.
