Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Coding Standards & Conventions
David Francisco
September 26, 2011
More Decks by David Francisco
See All by David Francisco
Learning Ruby
davidfrancisco
27
910
Other Decks in Programming
See All in Programming
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
840
No More NoSuchMethodError
exoego
1
110
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
140
Performance Optimization With LLMs
xleitix
0
210
contenteditable と日本語入力に向き合う
colorful12
0
220
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
340
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
460
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
1
200
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.8k
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
190
Vue Fes Japan の “作る側”に関わってみて
naokihaba
1
190
気持ちぃ〜角丸 Squircle
ryu1013
0
340
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
560
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
290
The browser strikes back
jonoalderson
0
1.9k
Making Projects Easy
brettharned
120
6.8k
Ruling the World: When Life Gets Gamed
codingconduct
0
420
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Designing Experiences People Love
moore
143
24k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
610
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
Statistics for Hackers
jakevdp
799
230k
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]
*