Skip to content

Latest commit

 

History

History
81 lines (50 loc) · 3.3 KB

CONTRIBUTING_STANDARDS.md

File metadata and controls

81 lines (50 loc) · 3.3 KB

Contents

Coding Standards and Best Practices

Coding Standards

Please use descriptive full word variable names.

  • In the lifecycle of most projects, fixing bugs and maintaining current features end up taking 50%+ of total engineering time.
  • Our goal is to create a code base that is easy to understand, making fixing bugs and maintaining current features as painless as possible. We will have many engineers working with this code, and we want to be welcoming to engineers who are new to the project.
  • Short variable names can often create confusion, where a new engineer needs to spend time figuring out what a short variable name actually means. (Ex/ Please use “person” instead of “per” or “p”.) For this project please use descriptive full word variable names.
  • Fellow engineers should be able to zoom around the code and not get stopped with riddles created by short names.

Variable Naming Standards

  • Please name variables all lower case with "_" in between words.
  • Please use full words instead of abbreviations (Ex/ Please use “person” instead of “per” or “p”.)
  • Exception: Please use lower case camel case ("camelCaseLettering") for local variables passed into components as properties, unless you are passing a widely used data variable (like "google_civic_election_id"), especially if it is passed around to multiple components.

Art Asset Naming

  1. Asset names should be all lower case (ex/ "lower.png")

  2. If a name has multiple words, use "-" between words in the name (ex/ "lower-case.png")

  3. If sequential, put order word + number at start of name (ex/ "slide1-")

  4. For fixed size images, include width and height at the end of the name (ex/ "-200x150"). Does not apply to svg files.

  5. If an image is still a "first draft", lets add "-draft" to the name + version number (ex/ "slide3-connect-list-with-photos-draft1-300x370.png")

  6. If adding images that are meant to be used in one limited area of the App, please put them in their own folder within "src/img/global".

Examples of good names:

slide1-ballot-simple.svg

slide3-connect-list-with-photos-draft1-300x370.png

Examples of names we avoid:

Image1.svg

If there's no issue in github.com, please create one

Let us Know you're working on the issue

If you're actively working on an issue, please comment in the issue thread stating that you're working on a fix, or (if you're an official contributor) assign it to yourself.

This way, others will know they shouldn't try to work on a fix at the same time.

Version numbering

We use SemVer for version numbers. More info: Versions: Release Names vs Version Numbers


Next: What the Heck is a Pull Request?

Go back to Readme Home