Tuesday, April 21, 2009

Ighalsk - Coding Guidelines

Here are the coding guidelines that I'm endeavouring to follow for Ighalsk. They're guidelines at this stage, not rules.
  1. Everything can be changed.
  2. Creating, extending and sharing is good and should be as easy as possible.
  3. All tests should pass.
  4. Names should be meaningful.
  5. Comments should express intent.
  6. Don't repeat yourself.
  7. Do the simplest thing possible.
To expand on these somewhat:
1. Can also be thought of as, "everything can be refactored". If a module can be rewritten to make it cleaner, simpler or more readable, it should.
2. An open-source principle, but it should also apply to objects in the game: monsters, items, powers, special levels and professions.
3. Irrelevant and/or obsolete tests can be removed.
6. From Pragmatic Programming - Extreme Programming calls this the "Once and Only Once" principle.
7. An Extreme Programming principle.

No comments:

Post a Comment