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
880
Other Decks in Programming
See All in Programming
Запуск 1С:УХ в крупном энтерпрайзе: мечта и реальность ПМа
lamodatech
0
970
AHC041解説
terryu16
0
510
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
28
6.1k
AWS Lambda functions with C# 用の Dev Container Template を作ってみた件
mappie_kochi
0
210
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
1
460
動作確認やテストで漏れがちな観点3選
starfish719
5
720
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
0
120
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
440
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
12
5.9k
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
970
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
3
970
Vue.jsでiOSアプリを作る方法
hal_spidernight
0
120
Featured
See All Featured
A designer walks into a library…
pauljervisheath
205
24k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
11
890
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Rails Girls Zürich Keynote
gr2m
94
13k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
RailsConf 2023
tenderlove
29
980
Unsuck your backbone
ammeep
669
57k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
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]
*