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
David Paluy
August 22, 2012
How-to & DIY
1.5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby On Rails coding conventions, standards and best practices
David Paluy
August 22, 2012
More Decks by David Paluy
See All by David Paluy
LLM Telemetry & Evals as First Class Rails Concerns - BlueRidgeRuby 2026
dpaluy
0
44
Tools to help you better understand the code
dpaluy
0
150
Debugging and Profiling Rails App
dpaluy
3
240
Faster on Rails
dpaluy
2
230
How to Prepare 3 min Fundraising Presentation
dpaluy
0
1k
Other Decks in How-to & DIY
See All in How-to & DIY
多摩ニュータウンを、 味わう
aokiplayer
2
710
JAWS-UG/AWS Community Update
awsjcpm
0
290
MustをWillに変える技術 〜アイドル・郁田はるきが"すべき"の壁を超えるまで〜
subroh0508
1
2k
JAWS-UG/AWS Community Update 彩の国埼玉支部1周年記念
awsjcpm
1
140
「無理」を「コントロール」するスキル / Skills to Control "Muri"
hageyahhoo
6
4.2k
お前も同人作家にならないか? 技術系同人誌制作入門
arkw
3
110
人を補助するAI ~AIとの壁打ちがきっかけになる~ #共創AIミートアップ
ishikiemo
2
600
AIツール“三種の神器”ではじめる 自動運転AIチャレンジ
covao
0
100
Node-REDで制御できるエッジカメラのreCameraを触る #iotlt #JLCPCB #recamera
n0bisuke2
0
190
2025版 鯖落ちパーツで安価に機械学習用マシンを作ってみる
bobfromjapan
0
920
Linuxが動く自作SBCを作る話.pdf
daimiya
0
740
とある地方技術勉強会に集うエンジニアたちのこれまでとこれから
pharaohkj
1
170
Featured
See All Featured
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
Chasing Engaging Ingredients in Design
codingconduct
0
240
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Un-Boring Meetings
codingconduct
0
350
Optimising Largest Contentful Paint
csswizardry
37
3.8k
Evolving SEO for Evolving Search Engines
ryanjones
0
240
The Invisible Side of Design
smashingmag
301
52k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
610
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
220
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
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