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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
あなたは何故コミュニティに参加するのか?
awsjcpm
3
390
Trying "Vibe No-code/Low-code" with MCP #noderedjp
n0bisuke2
0
150
キャリア科目では教えてくれない、就活を生き抜く法則
logica0419
2
290
JAWS-UG/AWSコミュニティ JAWS-UG おおいた
awsjcpm
2
3k
スマートハウスの蓄電性能の効率化を実現してみた~電気自動車編~
runrunsan
0
510
【ふりかえりワークショップ】Tryを決めるだけじゃない!感情にフォーカスした、ふりかえりを体験しよう!
scrummasudar
0
1.4k
ATOMS3R-CAMとClaude SKILLSでタイムラプスチャレンジ #iotlt
n0bisuke2
0
300
なぜJAWS-UGはこんなにも活発なのか?
awsjcpm
1
240
JAWS-UG/AWSコミュニティプログラムのご紹介 (JAWS-UG広島)
awsjcpm
1
150
LLMはTRPGのGMができる(確信)
kgmkm
0
3k
Within the team, I grow as a tester and continuously pursue product quality
camel_404
6
3.2k
なぜISPでオリジナルカードゲームを作ったのか?制作者と対談 - NIFTY Tech Talk #25
niftycorp
PRO
0
110
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Paper Plane (Part 1)
katiecoart
PRO
0
9.2k
What's in a price? How to price your products and services
michaelherold
247
13k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
420
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Color Theory Basics | Prateek | Gurzu
gurzu
0
370
Building the Perfect Custom Keyboard
takai
2
800
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
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