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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
170
Hex Core
wojtekmach
0
170
Recurrences & Intervals
wojtekmach
2
520
Building an Umbrella Project
wojtekmach
21
6.1k
Advanced OOP in Elixir
wojtekmach
6
680
OOP in Elixir
wojtekmach
4
320
Pattern Matching
wojtekmach
1
330
Other Decks in Programming
See All in Programming
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
120
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
330
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
160
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
0
300
「AI時代、配布するPythonコードをどう守るか: 難読化の実験と判断軸」 #PyconJP2026
pkshadeck
PRO
2
150
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
2
260
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
0
180
typoなんかねぇよ
raspython3
0
660
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
260
Flow は今どうなっているか
mizdra
PRO
0
890
AIの中の人になってみる
htkym
0
150
Featured
See All Featured
Everyday Curiosity
cassininazir
0
310
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.6k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Visualization
eitanlees
152
17k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Skip the Path - Find Your Career Trail
mkilby
1
220
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
510
Unsuck your backbone
ammeep
672
58k
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