Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby On Rails coding conventions, standards and...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
David Paluy
August 22, 2012
How-to & DIY
1
1.4k
Ruby On Rails coding conventions, standards and best practices
David Paluy
August 22, 2012
Tweet
Share
More Decks by David Paluy
See All by David Paluy
Tools to help you better understand the code
dpaluy
0
140
Debugging and Profiling Rails App
dpaluy
3
230
Faster on Rails
dpaluy
2
220
How to Prepare 3 min Fundraising Presentation
dpaluy
0
990
Other Decks in How-to & DIY
See All in How-to & DIY
251011「ひとりより、みんなで!」 九州の支部で始めた、新しい連携のかたち
east_takumi
2
130
Azure PortalのQoLを上げてたら Big Techに怒られた
horihiro
2
540
What's the difference in taste between expensive and cheap mills? Measuring coffee particle size distribution using ImageJ
dogrunjp
0
780
2025年03月02日 メイカーズながおかまつり での講演 「コミュニティベースでの製品開発ものづくりフェアの役割」
takasumasakazu
0
310
Trying "Vibe No-code/Low-code" with MCP #noderedjp
n0bisuke2
0
120
JAWS-UG/AWSコミュニティプログラムのご紹介 - JAWS-UG 佐賀
awsjcpm
2
200
バッドプラクティスから学ぶハワイアン航空で行く re:Invent
kentosuzuki
0
470
スマートハウスの蓄電性能の効率化を実現してみた~電気自動車編~
runrunsan
0
380
JAWS-UG/AWS Communities Updates 2025/11/8 JAWS-UG 島根支部
awsjcpm
1
120
JAWS-UG Community Upadate - JAWS-UG 熊本
awsjcpm
2
210
M5StickS3触ってXiaoZhiAI触ってみた #にぼし香 #iotlt
n0bisuke2
0
180
Burnoutとの「対話」 〜 アジャイルコーチングを活用した、燃え尽き症候群を克服するスキル 〜 / Dialogue with Burnout by Using Agile Coaching Skills
hageyahhoo
0
680
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
AI: The stuff that nobody shows you
jnunemaker
PRO
2
260
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
66
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Building Adaptive Systems
keathley
44
2.9k
Everyday Curiosity
cassininazir
0
130
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
140
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Tell your own story through comics
letsgokoyo
1
810
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
55
Transcript
Ruby On Rails coding conventions, standards and best practices David
Paluy August 2012
Philosophy (from Rails) • DRY – Don't Repeat Yourself •
Convention over Configuration • YAGNI - You ain't gonna need it
Source code Style • Two spaces, no tabs • Boolean
tests: don't use “and” and “or”, always use “&&” and “| |”
Go Easy on the Comments • If it's obvious –
don't explain it • Remove old commented code • “How to” comments
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
Parentheses (Optional)
Parentheses (Do & Don't)
Folding Up Lines
Folding Up Blocks
if vs unless
while vs until
Use Modifier Forms
each, NOT for
In the Wild
Use Symbols to Stand for Something
Composing Methods for Humans
Make the code a little more articulate
Readable Code
Readable code makes your classes easier to test
Git the diff says what you did; your commit message
should tell me why you did this
Summary Good code is like a good joke: It needs
no explanation
Credentials