Skip to content

Coding Guidelines

Geoff Greer edited this page Feb 27, 2024 · 7 revisions

General Guidelines

  • Prefer code that is easy to read and understand to code that is "elegant" or clever.
  • When in doubt, leave a comment.
  • If you change code near a comment, check to make sure the comment and the code still agree.
  • Tests are good. If you are removing or disabling a test, there had better be a good reason for it.
  • Avoid lots of nested conditions. Three is probably the most you should ever use. Prefer early returns if possible.

Concrete Guidelines

Clone this wiki locally