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
JAWS-UG/AWSコミュニティ JAWS-UG おおいた
awsjcpm
2
3k
JAWS-UG と AWS - JAWS-UG 沖縄 Cloud on the Beach 2025
awsjcpm
0
180
ドローンをAWSで制御してみた
nagi900
0
170
フィールドエンジニア at 多摩川 / Field Engineer at Tamagawa
aokiplayer
0
340
登壇資料を素早く作るための順番
kotomin_m
8
2.2k
JAWS-UG/AWSコミュニティプログラムのご紹介 (JAWS-UG広島)
awsjcpm
1
160
Nutanix Community Edition 超入門 25.04
ricefield66
0
410
エッジAIでBBQの肉の焼き加減判定をやってみた #iotlt #seeed
n0bisuke2
2
320
なぜISPでオリジナルカードゲームを作ったのか?制作者と対談 - NIFTY Tech Talk #25
niftycorp
PRO
0
110
サイボウズには100名以上の社員が出演する"夏フェス"があるって本当?
oguemon
1
890
ネガティブをねじ伏せ、n=1のキャリアに変える技術
subroh0508
1
1.2k
なぜJAWS-UGはこんなにも活発なのか?
awsjcpm
1
250
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
ラッコキーワード サービス紹介資料
rakko
1
4M
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Abbi's Birthday
coloredviolet
3
8.7k
We Are The Robots
honzajavorek
0
280
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
190
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
620
Into the Great Unknown - MozCon
thekraken
41
2.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
330
Google's AI Overviews - The New Search
badams
0
1.1k
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