-
Notifications
You must be signed in to change notification settings - Fork 1
Code Conventions
In general, follow PEP 8 - Style Guide for Python Code and PEP 20 - The Zen of Python (great examples of that Zen here)
CamelCase
prop_name
var_name
Not 1 letter unless it's a loop iterator If loop iterator is not used (i.e. looping for the sake of looping), use _
This one is absolutely bullet-proof, and is recommended on all client-sided pages.
CamelCase
propertyName
varName
Terminate all commands with semicolons. Never rely on semi-colon insertion, it has many ambiguous edge-cases.
Please try to indent things properly so we can line up closings!
You can never have too many.
We aim for around 80 chars / line, but Barbara doesn't care AT ALL and will often go longer.
def fcn( param1, param2 )
ie. No space after fcn name, space between braces and params is optional
var foo = function( ) { // Curly brace goes on this line
}; // Curly brace gets it's own line - how lucky!
We try to mimic our directory structure in our URIs.
/s/shopify/beta is in /apps/sibt/shopify/templates/beta.html
/admin/* is in /apps/admin/__.py
/about is in /apps/homepage
Keep in format of:
{Present tense verb} one-liner about the commit
- change #1
- change #2
- change #3
Example:
Add SIBT mass emailer
- can only select one version
- HTML tags allowed
Avoid useless comments!