I'm in the process of developing written code standards for a Rails app and am looking for some good examples of coding standards developed by others. Something that expands a bit on the ideas discussed in...
Does anyone have a good reference to share?
http://www.scribd.com/doc/2889649/Rails-coding-standards-defined
Examples:
- STYLE: Line up hash arrows for readability
- STYLE: put spaces around => hash arrows
- STYLE: put spaces after ',' in method params - but none between method names and '('
(Note that I'm new to StackOverflow and not sure if this counts as a "question"...please advise if not...)
Ruby on Rails Best Practice: Keep Your Code DRY Ruby on Rails' object-oriented principles are built to help you avoid duplicating code throughout your web application. Whenever possible, a great Ruby on Rails tip is to re-use as much code as possible instead of repeating similar code in many places.
Coding standards help in the development of software programs that are less complex and thereby reduce the errors. If programming standards in software engineering are followed, the code is consistent and can be easily maintained. This is because anyone can understand it and can modify it at any point in time.
Here's a style guide I rather like, Ruby-focused but definitely of the "Rails generation" of Rubyists:
Elements of Ruby Style
Credit for which belongs to Pathfinder Development:
(source: pathf.com)
UPDATE. Two years later, I have found a better guide, brought to you by the copycopter project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With