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
53
Tools to help you better understand the code
dpaluy
0
150
Debugging and Profiling Rails App
dpaluy
3
250
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
M5StickS3触ってXiaoZhiAI触ってみた #にぼし香 #iotlt
n0bisuke2
0
310
JAWS-UG/AWS Community Update - 2026/6/13 JAWS-UG TOHOKU 仙台
awsjcpm
0
1.3k
画面の向こうから「気づき」を得る 画面の向こうを「物差し」として捉える
subroh0508
1
440
とある地方技術勉強会に集うエンジニアたちのこれまでとこれから
pharaohkj
1
190
파이썬 토룡신점 운영후기
lqez
0
570
2026年、書籍をちゃんと読むぞ👊 〜約3万円分の書籍を積読にしないためにやること〜
subroh0508
5
900
地方カンファレンスのスタッフしてて思うこと
yumechi
0
280
私がカンファレンスのプロポーザルを書くときに考えていること
kotomin_m
1
800
JAWS-UG/AWSコミュニティプログラムのご紹介 - JAWS-UG 佐賀
awsjcpm
2
290
人見知りな HUB おじさんが 会話のハードルを超え、 今度は誰かの踏み台になろうとする話/hub-guy-as-a-stepping-stone
aokiplayer
2
1.1k
JAWS-UG/AWSコミュニティ JAWS-UG おおいた
awsjcpm
2
3.1k
放っておくと怖い睡眠負債について/fjordbootcamp-251122
yuukago
3
350
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Into the Great Unknown - MozCon
thekraken
41
2.7k
Building an army of robots
kneath
306
46k
A better future with KSS
kneath
240
18k
The agentic SEO stack - context over prompts
schlessera
0
880
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
500
Color Theory Basics | Prateek | Gurzu
gurzu
0
440
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
830
How GitHub (no longer) Works
holman
316
150k
How STYLIGHT went responsive
nonsquared
100
6.3k
Documentation Writing (for coders)
carmenintech
77
5.5k
Un-Boring Meetings
codingconduct
0
400
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