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
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
【ふりかえりワークショップ】Tryを決めるだけじゃない!感情にフォーカスした、ふりかえりを体験しよう!
scrummasudar
0
1k
終わりのない会議を超えて:HolacracyのTactical Meetingを体験しよう!
andrearc
0
170
わたしと仕事とアジャイルコミュニティ / developers summit 2025
matsuoshi
0
1.7k
新婚19年目から学ぶ夫婦円満の正しい歩き方 / Life is beautiful
soudai
PRO
13
4.9k
Node-REDで制御できるエッジカメラのreCameraを触る #iotlt #JLCPCB #recamera
n0bisuke2
0
150
「変えること」「変わること」を楽しむ力で"敵わない存在"と向き合う
subroh0508
1
1.5k
Maker Mela Mumbai 2025 資料 2024/12/12取得
takasumasakazu
0
120
AWSコミュニティプログラムのご紹介 -グローバル展開するコミュニティプログラム-
awsjcpm
0
270
Raspberry Pi Connectを使って #Manus => Node-RED操作チャレンジ #iotlt vol121
n0bisuke2
0
180
バッドプラクティスから学ぶハワイアン航空で行く re:Invent
kentosuzuki
0
470
JAWS-UG と AWS - JAWS-UG 沖縄 Cloud on the Beach 2025
awsjcpm
0
130
AIをフル活用! 猫版MBTI「CATS診断」 爆速開発の裏側【個人開発のAIツール活用 LT Night 登壇用スライド】
omori0219
0
1.4k
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
110
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Technical Leadership for Architectural Decision Making
baasie
1
240
Building Applications with DynamoDB
mza
96
6.9k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
66
Game over? The fight for quality and originality in the time of robots
wayneb77
1
120
Evolving SEO for Evolving Search Engines
ryanjones
0
130
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
50
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Agile that works and the tools we love
rasmusluckow
331
21k
Accessibility Awareness
sabderemane
0
52
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