Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Proper indentation is very important.  Just because the code lines up properly in your editor of choice, does not mean it will line up properly for someone else working on the project.  This can be very annoying.  These requirements will prevent this.

Tabs should be used to indent all code blocks.  Spaces should never be used to indent code blocks.  Mixing tabs and spaces results in misaligned code blocks for other developers who prefer different indentation settings.  Consider the following code block which is indented with all tabs (shown with and without whitespaces):

...

  • Comment as much as sanely possible.
  • There should always be at least 1 space between the # character and the beginning of the comment.  This makes it a little easier to read multi-line comments:
    • No:
      #Comments are your friend, they help #other other developers understand your brilliance.
    • Yes:
      # Comments are your friend, they help
      # other developers understand your brilliance.

...