CHAPTER 3 : General Principles
PART 1 : BASICS
CHAPTER 3 : General Principles
3.1 Keywords
3.2 Think of the reader
3.3 Keep it simple
3.4 Be explicit
3.5 Be consistent
3.6 Minimize scope
3.7 There's no one true style
3.8 A standard which isn't used, isn't a standard
3.9 Distinguish between standards and guidelines
3.10 Standards don't guarantee good coding
3.11 Decide on your portability quotient
3.12 Standards are a function of their audience
3.13 Keep project standards
3.14 Use standard libraries
3.15 Utilize available tools
3.16 Summary
<--Prev page | Next page -->
3.16 Summary
- Define a set of keywords to define the spirit of your standards.
- Think of the reader. Don't just write for yourself.
- Keep it simple (remember the KISS principle).
- Be explicit. Say what you mean (the SWYM principle).
- Be consistent.
- Minimize scope, both logical and visual.
- Remember: SECS (Simple, Explicit, Consistent, Scoped).
- There's no one true style, but choose one and stick to it.
- A standard which isn't used isn't a standard, so be careful in selection and
implementation.
- Distinguish between standards which must be followed, and guidelines which
need not be followed.
- Standards don't guarantee good programs.
- Decide on your portability quotient.
- Standards are a function of their audience.
- Decide on the scope of your standards. Agree at least at project team level.
- Keep project standards, especially where they vary from company standards.
- Use available standard libraries (don't reinvent the wheel)
- Use available tools to help flag problems and maintain the code.
<--Prev page | Next page -->
|