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
41
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
キャリア科目では教えてくれない、就活を生き抜く法則
logica0419
2
290
LLMはTRPGのGMができる(確信)
kgmkm
0
3k
Burnoutとの「対話」 〜 アジャイルコーチングを活用した、燃え尽き症候群を克服するスキル 〜 / Dialogue with Burnout by Using Agile Coaching Skills
hageyahhoo
0
970
AIをフル活用! 猫版MBTI「CATS診断」 爆速開発の裏側【個人開発のAIツール活用 LT Night 登壇用スライド】
omori0219
0
1.6k
おっきなガジェットの回線事情
2bo
1
220
猟銃所持許可を取ってみた
kenkino
2
170
ドローンをAWSで制御してみた
nagi900
0
150
餃子コミュニティの活性化/TechGYOZA
nishiuma
2
340
私がカンファレンスのプロポーザルを書くときに考えていること
kotomin_m
1
760
JAWS-UG/AWS Community Update - 2026/6/13 JAWS-UG TOHOKU 仙台
awsjcpm
0
1k
JAWS-UG/AWS Community Update
awsjcpm
0
290
サイボウズには100名以上の社員が出演する"夏フェス"があるって本当?
oguemon
1
830
Featured
See All Featured
Docker and Python
trallard
47
3.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
A Tale of Four Properties
chriscoyier
163
24k
KATA
mclloyd
PRO
35
15k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
It's Worth the Effort
3n
188
29k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
400
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Bash Introduction
62gerente
615
220k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
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