Skip to content

Instantly share code, notes, and snippets.

@foucist
Forked from crcx/style_guide.rst
Created September 12, 2010 16:50
Show Gist options
  • Save foucist/576233 to your computer and use it in GitHub Desktop.
Save foucist/576233 to your computer and use it in GitHub Desktop.

Retro Style Guide

Author: Charles Childers
Date: September 12, 2010

Formatting

  • Use ASCII
  • Use 2 space indent, no tabs.
  • Use Unix-style line endings.
  • If a function is more than one line, start the code on the line following the name
  • All functions should have stack comments
  • Try not to exceed 80 characters per line
  • Avoid trailing whitespace.
  • Closing semicolons should not be on a separate line

Naming

  • use snake_case with word names lowercase. Keep acronyms uppercase.
  • use short names for indexes
  • vocabulary names should end with an apostrophe
  • constants should be in UPPERCASE

Comments

  • Comments should be enclosed in parenthesis
  • Keep comments roughly aligned within a local grouping
  • Avoid superfluous comments

Stack Comments

  • rules..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment