More Related Content
Similar to Ruby On Rails coding conventions, standards and best practices
Similar to Ruby On Rails coding conventions, standards and best practices (19)
More from David Paluy (15)
Ruby On Rails coding conventions, standards and best practices
- 1. Ruby On Rails coding
conventions, standards
and best practices
David Paluy
August 2012
- 3. Source code Style
● Two spaces, no tabs
● Boolean tests:
don't use “and” and “or”,
always use “&&” and “| |”
- 4. Go Easy on the Comments
● If it's obvious – don't explain it
● Remove old commented code
● “How to” comments
- 5. Camels for Classes,
Snakes Everywhere Else
● “Snake case”:
lowercasse_words_separated_by_underscore
● “Camel case”:
ClassName good
Class_name bad
● Constants: (my own preference)
ALL_UPPERCASE = true
- 20. Git
the diff says what you did;
your commit message should tell me
why you did this