Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
56
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
How to Stylus 20251031
hareyakayuruyaka
0
180
AWS/JAWS-UG Community Updates at JAWS-UG Kagoshima
awsjcpm
0
100
おっきなガジェットの回線事情
2bo
1
240
大量のiOSシミュレータにアプリをインストールする
gurrium
0
180
JAWS-UG/AWS Community Update 2026/05/25 JAWS-UG札幌 & 秋田コラボ会
awsjcpm
0
150
MustをWillに変える技術 〜アイドル・郁田はるきが"すべき"の壁を超えるまで〜
subroh0508
1
2.1k
地方カンファレンスのスタッフしてて思うこと
yumechi
0
280
スイングやカードをいい感じに立てるスタンドの話
niccolli
1
520
EjecTea 2026 / 20260228-osc26tk-ejectea
akkiesoft
0
1k
「変えること」「変わること」を楽しむ力で"敵わない存在"と向き合う
subroh0508
2
3.5k
[JAWS DAYS 2026 | Track B] Local Roots, Global Reach
awsjcpm
0
130
Trying "Vibe No-code/Low-code" with MCP #noderedjp
n0bisuke2
0
170
Featured
See All Featured
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
510
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Test your architecture with Archunit
thirion
2
2.4k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
Rails Girls Zürich Keynote
gr2m
96
14k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
Why Our Code Smells
bkeepers
PRO
340
58k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
230
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Embracing the Ebb and Flow
colly
88
5.2k
Between Models and Reality
mayunak
4
450
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