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
tparseでgo testの出力を見やすくする
utgwkk
2
260
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
140
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
160
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
500
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
450
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.1k
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.3k
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
1
240
GISエンジニアから見たLINKSデータ
nokonoko1203
0
170
開発に寄りそう自動テストの実現
goyoki
2
1.2k
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
240
これならできる!個人開発のすゝめ
tinykitten
PRO
0
120
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
A Modern Web Designer's Workflow
chriscoyier
698
190k
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
Site-Speed That Sticks
csswizardry
13
1k
Accessibility Awareness
sabderemane
0
15
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Faster Mobile Websites
deanohume
310
31k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
20
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Crafting Experiences
bethany
0
19
GitHub's CSS Performance
jonrohan
1032
470k
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