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
David Francisco
September 26, 2011
Programming
160
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Coding Standards & Conventions
David Francisco
September 26, 2011
Transcript
41 slides
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]
*
More Decks by David Francisco
See All by David Francisco
Learning Ruby
davidfrancisco
27
910
Other Decks in Programming
See All in Programming
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
350
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
340
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
360
AI Augmentation Techniques with Liberty
ivargrimstad
1
510
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
250
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1k
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
240
SODA - FACT BOOK(EN)
sodainc
1
260
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
650
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
250
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
360
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520
Thoughts on Productivity
jonyablonski
76
5.5k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
530
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Color Theory Basics | Prateek | Gurzu
gurzu
1
530
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Making the Leap to Tech Lead
cromwellryan
135
10k
Mobile First: as difficult as doing things right
swwweet
225
10k