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
150
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
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
230
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
370
Ruby and LLM Ecosystem 2nd
koic
1
460
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
130
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
190
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
870
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
130
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
240
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
530
Docコメントで始める簡単ガードレール
keisukeikeda
1
110
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
200
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
170
Featured
See All Featured
Being A Developer After 40
akosma
91
590k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Navigating Weather and Climate Data
rabernat
0
130
Site-Speed That Sticks
csswizardry
13
1.1k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Embracing the Ebb and Flow
colly
88
5k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
410
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
The World Runs on Bad Software
bkeepers
PRO
72
12k
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]
*