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
David Francisco
September 26, 2011
Programming
5
140
Coding Standards & Conventions
David Francisco
September 26, 2011
Tweet
Share
More Decks by David Francisco
See All by David Francisco
Learning Ruby
davidfrancisco
27
890
Other Decks in Programming
See All in Programming
dynamic!
moro
10
8k
Swift Concurrency - 状態監視の罠
objectiveaudio
2
520
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
160
CSC305 Lecture 06
javiergs
PRO
0
230
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1.1k
私達はmodernize packageに夢を見るか feat. go/analysis, go/ast / Go Conference 2025
kaorumuta
2
570
技術的負債の正体を知って向き合う / Facing Technical Debt
irof
0
170
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
32k
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
1k
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
3
5k
Railsだからできる 例外業務に禍根を残さない 設定設計パターン
ei_ei_eiichi
0
900
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
490
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
173
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
Designing for Performance
lara
610
69k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Docker and Python
trallard
46
3.6k
Making Projects Easy
brettharned
120
6.4k
Designing for humans not robots
tammielis
254
26k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
Typedesign – Prime Four
hannesfritz
42
2.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Into the Great Unknown - MozCon
thekraken
40
2.1k
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]
*