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
1.4k
Ruby On Rails coding conventions, standards and best practices
David Paluy
August 22, 2012
Tweet
Share
More Decks by David Paluy
See All by David Paluy
Tools to help you better understand the code
dpaluy
0
140
Debugging and Profiling Rails App
dpaluy
3
230
Faster on Rails
dpaluy
2
220
How to Prepare 3 min Fundraising Presentation
dpaluy
0
990
Other Decks in How-to & DIY
See All in How-to & DIY
わたしと仕事とアジャイルコミュニティ / developers summit 2025
matsuoshi
0
1.7k
サイボウズには100名以上の社員が出演する"夏フェス"があるって本当?
oguemon
0
550
LLMはTRPGのGMができる(確信)
kgmkm
0
2.2k
Maker Mela Mumbai 2025 資料 2024/12/12取得
takasumasakazu
0
120
私がカンファレンスのプロポーザルを書くときに考えていること
kotomin_m
1
510
JAWS-UGのご紹介 JAWS-UGとは?
awsjcpm
0
5.5k
地方カンファレンスのスタッフしてて思うこと
yumechi
0
170
ネガティブをねじ伏せ、n=1のキャリアに変える技術
subroh0508
1
1.1k
AWSと学生支援 - Education-JAWS #0
awsjcpm
1
220
なぜJAWS-UGはこんなにも活発なのか?
awsjcpm
1
190
プログラミング道場 "CoderDojo" を支援するサーバー提供システム 『DojoPaaS』 / How DojoPaaS powers the CoderDojo community in Japan
coderdojojapan
PRO
0
130
【加筆修正版】ハードワークを支えるフィジカルとメンタルを構築る#rubymusclemixin 活動 #きのこ2025 #きのこ2025_b
bash0c7
0
310
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
430
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Ethics towards AI in product and experience design
skipperchong
2
190
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Designing for Timeless Needs
cassininazir
0
130
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Designing Experiences People Love
moore
144
24k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
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