Taken from this StackOverflow comment:

  1. Thinking before coding
  2. Fixing bugs or potential for bugs as soon as I see one (not leave it for tomorrow)
  3. Test each little piece of functionality that makes sense on its own
  4. Have it as principle to avoid quick hacks
  5. Use defensive programming techniques everywhere where possible (immutable objects, read-only properties, type constraints etc.)
  6. Write self-explanatory code and comments where code may seem not easy to understand
  7. Avoid sophisticated expressions that require a very fresh state of mind to comprehend
  8. Avoid dense blurbs of code, better make it more verbose to avoid misunderstanding (not saving a few characters on code block brackets helps greatly)
  9. Avoid duplication of code. It will be later next to impossible to trace all instances.
  10. Avoid magic constants in code. Even if you're 200% sure you'll only need it in one place, extract it to a constant. Will do you good.