Coding Rules
From dis-Emi-A
Contents |
Major Rules
- No duplication
- Multiple inheritance helps (C++, Ruby Mixins [1])
- If is evil
Corollaries
- Exceptions are evil, but return codes are worse
Minor Rules
- Use Code Tagging
- Previous functionality trumpts new functionality
- third party libraries should be isolated
- Compile with *ALL* warnings turned on
- Do not rely on test cases, properly inspect code
Framework Rules
- Whatever the language, have a way to pass (on a per-thread basis) parameters without modifying the signature of all methods up to the point where the parameters have to be used. An inheritable context of sorts. Example: passing an http timeout to a third party http client library.
