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
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
54
Tools to help you better understand the code
dpaluy
0
150
Debugging and Profiling Rails App
dpaluy
3
250
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
個人制作コンテンツの多言語展開のノウハウを全公開! 〜世界に自分を発信しよう!〜
syotasasaki593876
0
220
JAWS-UG/AWS Community Update 2026/05/25 JAWS-UG札幌 & 秋田コラボ会
awsjcpm
0
140
JAWS-UG/AWS Community Update 彩の国埼玉支部1周年記念
awsjcpm
1
170
高校生の時にLINEDCに出会って、 気づけば大学を卒業します!!
inoue2002
0
110
生成AIは 『コードを書く』だけじゃない アーキテクチャ設計から環境構築まで——社内データ活用DXの全貌
punipuni_mint
0
230
エッジAIでBBQの肉の焼き加減判定をやってみた #iotlt #seeed
n0bisuke2
2
360
なぜJAWS-UGはこんなにも活発なのか?
awsjcpm
1
270
ROSAというLLM使ったROSエージェントをおもちゃに実装してみた話
takeofuture
0
290
多摩ニュータウンを、 味わう
aokiplayer
2
780
파이썬 토룡신점 운영후기
lqez
0
580
サイボウズには100名以上の社員が出演する"夏フェス"があるって本当?
oguemon
1
980
大量のiOSシミュレータにアプリをインストールする
gurrium
0
170
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Paper Plane
katiecoart
PRO
2
53k
Building the Perfect Custom Keyboard
takai
2
860
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
260
Become a Pro
speakerdeck
PRO
31
6.2k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
310
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
700
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
180
How to build a perfect <img>
jonoalderson
1
5.9k
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