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
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
36
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
私の ダイエット トレーナー AIさんから 自己紹介が あります
itsukiisamu
0
110
おっきなガジェットの回線事情
2bo
1
210
社会人9年目の僕が贈る処世術
coco_se
0
210
地方カンファレンスのスタッフしてて思うこと
yumechi
0
220
JAWS/AWS Community Updates - JAWS-UG新潟 #29
awsjcpm
1
130
JAWS-UG 山梨 第10回 勉強会 Community Update
awsjcpm
0
1.1k
AWS Community/JAWS-UG Update - JAWS-UG 上越妙高支部リブート
awsjcpm
2
110
登壇資料を素早く作るための順番
kotomin_m
8
2.1k
プログラミング道場 "CoderDojo" を支援するサーバー提供システム 『DojoPaaS』 / How DojoPaaS powers the CoderDojo community in Japan
coderdojojapan
PRO
0
170
生成AIは 『コードを書く』だけじゃない アーキテクチャ設計から環境構築まで——社内データ活用DXの全貌
punipuni_mint
0
180
EmbeddingGemmaをDifyから使いたいけどAPI経由はつまらん #iotlt #gemma #dify
n0bisuke2
0
200
AWSコミュニティプログラムのご紹介 -グローバル展開するコミュニティプログラム-
awsjcpm
0
340
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
580
Facilitating Awesome Meetings
lara
57
6.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
44k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
380
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
360
Technical Leadership for Architectural Decision Making
baasie
3
400
HDC tutorial
michielstock
2
690
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Utilizing Notion as your number one productivity tool
mfonobong
4
310
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