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.5k
1
Share
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
28
Tools to help you better understand the code
dpaluy
0
150
Debugging and Profiling Rails App
dpaluy
3
230
Faster on Rails
dpaluy
2
230
How to Prepare 3 min Fundraising Presentation
dpaluy
0
990
Other Decks in How-to & DIY
See All in How-to & DIY
What's the difference in taste between expensive and cheap mills? Measuring coffee particle size distribution using ImageJ
dogrunjp
0
840
プログラミング道場 "CoderDojo" を支援するサーバー提供システム 『DojoPaaS』 / How DojoPaaS powers the CoderDojo community in Japan
coderdojojapan
PRO
0
160
生成AIは 『コードを書く』だけじゃない アーキテクチャ設計から環境構築まで——社内データ活用DXの全貌
punipuni_mint
0
170
Node-REDで制御できるエッジカメラのreCameraを触る #iotlt #JLCPCB #recamera
n0bisuke2
0
180
ModuleLLM、最前線!
anoken
1
340
5年間ぐらい、 スプリントレトロスペクティブは、 「+/Δ」しかしてないので、 あらためて良いのか悪いか考えてみる / Doing Plus Delta for about five years
camel_404
1
410
なぜJAWS-UGはこんなにも活発なのか?
awsjcpm
1
230
JAWS-UG/AWSコミュニティ アップデート (JAWS-UG函館支部)
awsjcpm
3
150
JAWS-UGとAWS - JAWS-UG彩の国埼玉設立のお祝い
awsjcpm
2
690
『いってらっしゃい』と『お帰りなさい』を言ってくれる『ぬい』 に動きをつけてみた!
scbc1167
0
110
多摩ニュータウンを、 味わう
aokiplayer
1
630
JAWS-UG 福岡 in 北九州 | JAWS-UG/AWSコミュニティ プログラムのご紹介
awsjcpm
1
210
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
44k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
350
The Mindset for Success: Future Career Progression
greggifford
PRO
0
330
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
300
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Building Applications with DynamoDB
mza
96
7k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
280
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
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