Thursday, May 20, 2010

Principled Programming

  1. The Principle of Personal Character states: Write your code so that it reflects, or rises above, the best parts of your personal character.
  2. The Principle of Aesthetics states: Strive for beauty and elegance in every aspect of your work.
  3. The Principle of Clarity States: Value clarity equally with correctness. Utilize the proven techniques that will produce clarity in your code. Correctness will likely follow suit.
  4. The Principle of Layout states: Use the visual layout of your code to communicate the structure of your code to human readers.
  5. The Principle of Explicitness States: Always favor the explicit over the implicit.
  6. The Principle of Self-Documenting Code states: The most reliable document of software is the code itself. In many cases, the code is the only documentation. Therefore, strive to make your code self-documenting, and where you can't, add comments.
  7. The Principle of Comments states: Comment in full sentences in order to summarize and communicate intent.
  8. The Principle of Assumptions states: Take reasonable steps to test, document, and otherwise draw attention to the assumptions made in every module and routine.
  9. The Principle of User Interaction states: Never make the user feel stupid.
  10. The Principle of Going Back states: The time to write good code is at the time you are writing it.
  11. The Principle of Other People's Time and Money states: A true professional does not waste the time and money of other people by delivering poor quality work.


Borrowed from here

No comments:

Post a Comment