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
150
Recurrences & Intervals
wojtekmach
2
480
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
並行開発のためのコードレビュー
miyukiw
2
2.2k
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
360
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
480
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
320
CSC307 Lecture 10
javiergs
PRO
1
690
Oxlint JS plugins
kazupon
1
1.2k
Python’s True Superpower
hynek
0
190
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
230
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
860
ぼくの開発環境2026
yuzneri
1
300
浮動小数の比較について
kishikawakatsumi
0
370
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1.1k
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
5.8k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
210
Marketing to machines
jonoalderson
1
5k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
79
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
80
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
The Language of Interfaces
destraynor
162
26k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Six Lessons from altMBA
skipperchong
29
4.2k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.3k
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