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.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
48
Tools to help you better understand the code
dpaluy
0
150
Debugging and Profiling Rails App
dpaluy
3
240
Faster on Rails
dpaluy
2
240
How to Prepare 3 min Fundraising Presentation
dpaluy
0
1k
Other Decks in How-to & DIY
See All in How-to & DIY
EmbeddingGemmaをDifyから使いたいけどAPI経由はつまらん #iotlt #gemma #dify
n0bisuke2
0
210
Goカードゲームを 作ってみた!
senoue
0
290
Burnoutとの「対話」 〜 アジャイルコーチングを活用した、燃え尽き症候群を克服するスキル 〜 / Dialogue with Burnout by Using Agile Coaching Skills
hageyahhoo
0
1k
JAWS-UG/AWS Community Update 彩の国埼玉支部1周年記念
awsjcpm
1
150
ライブ感を生む 巻き込み型スライドの作り方/Create your slide like a heavy metal concert
ikuodanaka
5
1.7k
JAWS-UG/AWS Community Update - 2026/6/13 JAWS-UG TOHOKU 仙台
awsjcpm
0
1.2k
蓮ノ空女学院スクールアイドルクラブはなぜ強いのか
subroh0508
0
100
スマートハウスの蓄電性能の効率化を実現してみた~電気自動車編~
runrunsan
0
550
大量のiOSシミュレータにアプリをインストールする
gurrium
0
160
JAWS-UG初心者支部 JAWS-UG Updates
awsjcpm
4
140
What's the difference in taste between expensive and cheap mills? Measuring coffee particle size distribution using ImageJ
dogrunjp
0
870
私がカンファレンスのプロポーザルを書くときに考えていること
kotomin_m
1
780
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
360
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
310
Context Engineering - Making Every Token Count
addyosmani
9
1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
430
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
850
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
200
Color Theory Basics | Prateek | Gurzu
gurzu
0
410
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
270
Unsuck your backbone
ammeep
672
58k
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