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
Playing with Sorbet
Search
Luciano Sousa
September 12, 2019
Programming
0
52
Playing with Sorbet
A short presentation about how Sorbet could help your project
Luciano Sousa
September 12, 2019
Tweet
Share
More Decks by Luciano Sousa
See All by Luciano Sousa
Knowing mina deploy
lucianosousa
1
77
Creating your startup without Developer
lucianosousa
0
170
Patterns Falacy v2
lucianosousa
0
120
Project Management like Software Developer
lucianosousa
1
110
The Patterns Falacy - Rails Version
lucianosousa
1
120
Sinatra::Ftw
lucianosousa
0
110
Other Decks in Programming
See All in Programming
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
210
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
170
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
420
へんな働き方
yusukebe
4
2.3k
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
270
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
130
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
600
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
200
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
130
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1k
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
140
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
140
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
470
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
160
How to Ace a Technical Interview
jacobian
281
24k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Designing Powerful Visuals for Engaging Learning
tmiket
0
280
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
220
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
490
Faster Mobile Websites
deanohume
310
31k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
350
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
Transcript
Playing with Sorbet
What
Sorbet is a fast, powerful type checker designed for Ruby.
Why
Once upon a time
We expose a public API
Expecting params = { user: { first_name: "Luciano", last_name: "Sousa"
} }
We got a
params = { user: "a" }
TypeError (no implicit conversion of Symbol into Integer)
None
NoMethodError (undefined method `where' for nil:NilClass)
Let’s talk about Java
None
Let’s talk about dynamic vs static typed languages
• •
• • •
String javaString = new String(“I am a Java string”) ruby_string
= “I am a Ruby string”
Dynamic languages
Ruby
Examples
begin do_something rescue StandardErro do_something_else end
Tests
Let's talk about Shopify
~1500 devs
~40 deploys/day
~5 million req/min
~83k req/sec ~170k req/sec peak
Sorbet at Shopify
~36 issues fixed
~17 dead code never hit
~16 name error
~3 wrong args
Maybe some millions
Examples
“I hate type annotations.”
class UserHelper def name_length(name) name.length end end
# typed: true class UserHelper def name_length(name) name.length end end
# typed: true class UserHelper extend T::Sig def name_length(name) name.length
end end
# typed: true class UserHelper extend T::Sig sig { params(name:
String).returns(Integer) } def name_length(name) name.length end end
How it works
Disclaimer
None
# typed: true
None
extend T::Sig
sig { params(name: String).returns(Integer) }
sig { params(name: String).returns(Integer) }
Resources •
Resources •
Resources •
Resources •
Thanks!