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
Formatting ruby code
Search
Wojtek Mach
April 16, 2014
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Formatting ruby code
Wojtek Mach
April 16, 2014
More Decks by Wojtek Mach
See All by Wojtek Mach
Writing an Ecto Adapter: Introducing MyXQL
wojtekmach
1
180
Hex Core
wojtekmach
0
180
Recurrences & Intervals
wojtekmach
2
520
Building an Umbrella Project
wojtekmach
21
6.1k
Advanced OOP in Elixir
wojtekmach
6
690
OOP in Elixir
wojtekmach
4
330
Pattern Matching
wojtekmach
1
340
Other Decks in Programming
See All in Programming
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
0
1.4k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
110
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
780
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
380
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
22
22k
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
速習iPhone Duo対応
yuukiw00w
2
980
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.1k
Featured
See All Featured
Scaling GitHub
holman
464
140k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
620
How to build a perfect <img>
jonoalderson
1
6.1k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
Thoughts on Productivity
jonyablonski
76
5.4k
It's Worth the Effort
3n
188
29k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Building Adaptive Systems
keathley
44
3.2k
Tell your own story through comics
letsgokoyo
1
1.1k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
750
Into the Great Unknown - MozCon
thekraken
41
2.8k
From π to Pie charts
rasagy
1
400
Transcript
Formatting Ruby Code
4 rules of simple design (Kent Beck) 1. All tests
pass 2. No duplicate code 3. Express all the ideas 4. Minimize classes and methods
4 rules of simple design (Kent Beck) 1. All tests
pass 2. No duplicate code 3. Express all the ideas 4. Minimize classes and methods 0. Code is properly formatted
Styleguides • https://github.com/bbatsov/ruby-style-guide • https://github.com/styleguide/ruby • etc
Styleguides
Styleguides • Styleguides are great, but...
Styleguides • Styleguides are great, but… • “Hey, can you
format code according to …”?
Go
Go • Go doesn’t have styleguides
Go • Go doesn’t have styleguides • gofmt a.go
rubyfmt
Parsing ruby code
Parsing ruby code https://github.com/seattlerb/ruby_parser
Parsing ruby code https://github.com/seattlerb/ruby2ruby
Diff
None
https://github.com/wojtekmach/rubyfmtbot
Thanks! • http://golang.org/cmd/gofmt • https://github.com/seattlerb/ruby_parser • https://github.com/seattlerb/sexp_processor • https://github.com/seattlerb/ruby2ruby •
https://github.com/wojtekmach/rubyfmt • https://github.com/wojtekmach/rubyfmtbot