Monday, August 14, 2006

Programming Rules

  1. Always write code to be reusable (or re-write code to be re-usable). Never encode the same logic twice.
  2. Always make data referenceable. Never encode data within logic or infrastructure.
  3. Use meaningful Names with words who's definition fits the concept you are representing. Use a Dictionary or Thesaurus. Avoid plurals and grammatical sugar, stick with root words and descriptive adjectives. (A list of users is a UserList not Users)
  4. Everything changes. (Static is good. Dynamic is better.)
  5. Everything has scope. (Nothing is global but everything is accessable). (see 2)
  6. Code is data. (see 5)
  7. If a change to the system can be represented in code, keep the code! (see 6)
  8. Everything should be as human readable as possible.
  9. Never delete anything. Archive, deactivate, omit or ignore unwanted data. (see 7)
  10. Always track data redundancy. Never create redundancy indiscriminately. (see 1)

No comments: