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
Formatting ruby code
Search
Wojtek Mach
April 16, 2014
Programming
0
130
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
670
OOP in Elixir
wojtekmach
4
300
Pattern Matching
wojtekmach
1
310
Other Decks in Programming
See All in Programming
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2k
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.4k
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
150
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
230
Cap'n Webについて
yusukebe
0
160
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
700
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
130
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.5k
tparseでgo testの出力を見やすくする
utgwkk
2
330
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
980
チームをチームにするEM
hitode909
0
430
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
500
Featured
See All Featured
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
590
The Cult of Friendly URLs
andyhume
79
6.7k
GraphQLとの向き合い方2022年版
quramy
50
14k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
The browser strikes back
jonoalderson
0
280
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Designing Powerful Visuals for Engaging Learning
tmiket
0
190
Building an army of robots
kneath
306
46k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
76
Building a Scalable Design System with Sketch
lauravandoore
463
34k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
The Spectacular Lies of Maps
axbom
PRO
1
410
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