Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Formatting ruby code
Search
Wojtek Mach
April 16, 2014
Programming
0
120
Formatting ruby code
Wojtek Mach
April 16, 2014
Tweet
Share
More Decks by Wojtek Mach
See All by Wojtek Mach
Writing an Ecto Adapter: Introducing MyXQL
wojtekmach
1
150
Hex Core
wojtekmach
0
140
Recurrences & Intervals
wojtekmach
2
470
Building an Umbrella Project
wojtekmach
21
6k
Advanced OOP in Elixir
wojtekmach
6
660
OOP in Elixir
wojtekmach
4
300
Pattern Matching
wojtekmach
1
310
Other Decks in Programming
See All in Programming
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
26
22k
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.3k
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
200
社内オペレーション改善のためのTypeScript / TSKaigi Hokuriku 2025
dachi023
1
570
関数実行の裏側では何が起きているのか?
minop1205
1
680
SwiftUIで本格音ゲー実装してみた
hypebeans
0
110
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
エディターってAIで操作できるんだぜ
kis9a
0
710
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
160
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
1k
AIコーディングエージェント(NotebookLM)
kondai24
0
170
Featured
See All Featured
Writing Fast Ruby
sferik
630
62k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
720
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
A better future with KSS
kneath
240
18k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Designing for Performance
lara
610
69k
4 Signs Your Business is Dying
shpigford
186
22k
Practical Orchestrator
shlominoach
190
11k
Site-Speed That Sticks
csswizardry
13
990
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