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
JAWS-UG と AWS - JAWS-UG 沖縄 Cloud on the Beach 2025
awsjcpm
0
130
目指せ!本を書いて夢の不労所得 #第3木曜LT会
kaitou
1
170
251011「ひとりより、みんなで!」 九州の支部で始めた、新しい連携のかたち
east_takumi
2
130
10分de名コミュ “最高の自分”を演じ憧れの同業者と渡り合う
subroh0508
1
620
ATOMS3R-CAMとClaude SKILLSでタイムラプスチャレンジ #iotlt
n0bisuke2
0
240
[電子工作]クリップモーターをつくろう
oriontakemura
1
600
JAWS-UGについて JAWS-UG TOHOKU [青森] 弘前開催
awsjcpm
0
310
エンジニアになって2年間で学んだこと
kaiphoenix
0
250
Goカードゲームを 作ってみた!
senoue
0
180
Xの"だるま"とコナミコマンド #iotlt #obniz
n0bisuke2
0
300
2026年、書籍をちゃんと読むぞ👊 〜約3万円分の書籍を積読にしないためにやること〜
subroh0508
3
730
Burnoutとの「対話」 〜 アジャイルコーチングを活用した、燃え尽き症候群を克服するスキル 〜 / Dialogue with Burnout by Using Agile Coaching Skills
hageyahhoo
0
680
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Between Models and Reality
mayunak
1
190
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
910
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
440
YesSQL, Process and Tooling at Scale
rocio
174
15k
30 Presentation Tips
portentint
PRO
1
220
Automating Front-end Workflow
addyosmani
1371
200k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
The Limits of Empathy - UXLibs8
cassininazir
1
220
Test your architecture with Archunit
thirion
1
2.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
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