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
48
Tools to help you better understand the code
dpaluy
0
150
Debugging and Profiling Rails App
dpaluy
3
240
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
JAWS-UG/AWS Community Update 彩の国埼玉支部1周年記念
awsjcpm
1
150
ボードゲーム × 専用収納 〜3Dプリントで埋めるニッチな隙間〜 / Board Games × Custom Storage
handlename
0
330
多摩ニュータウンを、 味わう
aokiplayer
2
740
あなたは何故コミュニティに参加するのか?
awsjcpm
3
420
What's the difference in taste between expensive and cheap mills? Measuring coffee particle size distribution using ImageJ
dogrunjp
0
870
ドローンをAWSで制御してみた
nagi900
0
170
Node-REDで制御できるエッジカメラのreCameraを触る #iotlt #JLCPCB #recamera
n0bisuke2
0
190
ライブ感を生む 巻き込み型スライドの作り方/Create your slide like a heavy metal concert
ikuodanaka
5
1.7k
JAWS-UG/AWSコミュニティ -JAWS-UGくまもと#16
awsjcpm
1
250
ときメモは 運営が30年かけて “実プレイ”していた
mzryuka
0
110
献立を支える技術
godan
1
110
ModuleLLM、最前線!
anoken
1
380
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
450
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
250
AI: The stuff that nobody shows you
jnunemaker
PRO
9
900
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Into the Great Unknown - MozCon
thekraken
41
2.7k
Crafting Experiences
bethany
1
250
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
480
Become a Pro
speakerdeck
PRO
31
6.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
610
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
330
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
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