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
Coding Standards & Conventions
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
David Francisco
September 26, 2011
Programming
150
5
Share
Coding Standards & Conventions
David Francisco
September 26, 2011
More Decks by David Francisco
See All by David Francisco
Learning Ruby
davidfrancisco
27
890
Other Decks in Programming
See All in Programming
Kingdom of the Machine
yui_knk
2
1.5k
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
110
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
380
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
22
12k
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
770
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
180
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
180
Spec-Driven Development with AI Agents (Workshop, May 2026)
antonarhipov
3
340
20260514_its_the_context_window_stupid.pdf
heita
0
860
🦞OpenClaw works with AWS
licux
1
350
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
150
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.7k
Featured
See All Featured
We Are The Robots
honzajavorek
0
220
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Into the Great Unknown - MozCon
thekraken
41
2.5k
From π to Pie charts
rasagy
0
180
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
190
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
190
A Soul's Torment
seathinner
6
2.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Transcript
26 February 2011 *
[email protected]
*
None
bonus tips
None
None
“ ”
1 Indentation 1.1 Line length 1.2 Wrapping lines 1.3 Alignment
2 White space 2.1 Blank lines 2.2 Blank spaces 2.3 Trailing white space 3 Naming conventions 4 Declarations 4.1 Placement 5 Dead Code 6 Comments 6.1 Special comments 7 Parenthesis
1 - Indentation
1 - Indentation Because it is a Java language coding
standard presented in the Java Language Specification, from Sun Microsystems
1 - Indentation Because of line wrapping, which will be
explained later on
1 - Indentation Because it is the Ruby convention
1 - Indentation Just because it makes your life easier
1 - Indentation
1.1 – Indentation – Line length How it looks like
using 90 cols per line
1.2 – Indentation – Wrapping lines
1.3 – Indentation – Alignment
1.3 – Indentation – Alignment
2.1 – White space - Blank lines
2.2 – White space - Blank spaces
2.2 – White space - Blank spaces
2.3 – White space – Trailing white space http://andrei.gmxhome.de/anyedit/
3 – Naming conventions
3 – Naming conventions
4.1 – Declarations – Placement
5 – Dead Code
6.1 – Comments – Special comments
7 – Parenthesis By Noel Rappin, from http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/.
7 – Parenthesis By Noel Rappin, from http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/.
7 – Parenthesis By Noel Rappin, from http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/.
None
1 – Commit messages
1 Reverting 2 Messages
1 – Reverting By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html. DEV 1 DEV
2
2 – Messages By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html.
1 Models 2 Views 3 Controllers
1 – Models By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html.
1 – Models By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html.
1 – Models By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html.
2 – Views By Neeraj Choudhary, from http://scribd.com/doc/2889649/Rails-coding-standards-defined.
3 – Controllers By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html.
26 February 2011 *
[email protected]
*