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
파이썬 토룡신점 운영후기
lqez
0
510
スイングやカードをいい感じに立てるスタンドの話
niccolli
1
400
The Definitive? Guide To Locally Organizing RubyKaigi
sylph01
9
2.5k
ORBBEC会社概要 製品カタログ 2024 11 10
takasumasakazu
0
220
Xの"だるま"とコナミコマンド #iotlt #obniz
n0bisuke2
0
300
アイデアをカタチにする、イマジニア
haruka_imgr
0
180
サイボウズには100名以上の社員が出演する"夏フェス"があるって本当?
oguemon
0
560
活動振り返りと生成AIによるコード生成の試み
covao
0
140
終わりのない会議を超えて:HolacracyのTactical Meetingを体験しよう!
andrearc
0
170
人を補助するAI ~AIとの壁打ちがきっかけになる~ #共創AIミートアップ
ishikiemo
0
530
カンファレンスでリフレッシュ!無理なく楽しむカンファレンス参加術 / How to enjoy conferences without stress
kattsuuya
1
9.5k
ラズパイカメラ向け ケーブル延長基板・ハウジングの開発
koheimasaki
PRO
2
440
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
Mobile First: as difficult as doing things right
swwweet
225
10k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
100
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Evolving SEO for Evolving Search Engines
ryanjones
0
130
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Designing Experiences People Love
moore
144
24k
First, design no harm
axbom
PRO
2
1.1k
Being A Developer After 40
akosma
91
590k
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