This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
howtos:toolcoding:good_practices [2010/11/08 16:46] marcus.williams |
howtos:toolcoding:good_practices [2010/11/08 17:03] marcus.williams |
||
---|---|---|---|
Line 43: | Line 43: | ||
Stub: best practices for variable naming, esp. locals FIXME | Stub: best practices for variable naming, esp. locals FIXME | ||
- | It is generally recommended that variable names use the [[http://en.wikipedia.org/wiki/CamelCase|lower camel case]] convention. However, in some cases the use of underscores for coding clarity is appropriate (especially for procedures, views and source datasets). | + | It is generally recommended that variable names use the [[http://en.wikipedia.org/wiki/CamelCase|lowerCamelCase]] convention. However, in some cases the use of underscores in conjunction with lowerCamelCase for coding clarity is appropriate (especially for procedures, views and source datasets). |
Variable description modifiers should be used as suffixes, rather than prefixes (e.g. //dwelling unit share// rather than //share of dwelling units//). The same is true for variable names, but for these modifier abbreviations are recommended to keep name lengths manageable (e.g. ''dwellUnitShr''). A table of suggested abbreviations is provided below: | Variable description modifiers should be used as suffixes, rather than prefixes (e.g. //dwelling unit share// rather than //share of dwelling units//). The same is true for variable names, but for these modifier abbreviations are recommended to keep name lengths manageable (e.g. ''dwellUnitShr''). A table of suggested abbreviations is provided below: |