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
52
0
Share
Playing with Sorbet
A short presentation about how Sorbet could help your project
Luciano Sousa
September 12, 2019
More Decks by Luciano Sousa
See All by Luciano Sousa
Knowing mina deploy
lucianosousa
1
77
Creating your startup without Developer
lucianosousa
0
180
Patterns Falacy v2
lucianosousa
0
120
Project Management like Software Developer
lucianosousa
1
120
The Patterns Falacy - Rails Version
lucianosousa
1
120
Sinatra::Ftw
lucianosousa
0
110
Other Decks in Programming
See All in Programming
AI時代になぜ書くのか
mutsumix
0
340
JCON - Create Agentic AI Apps, The Easy Way!
kdubois
1
100
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
340
when storing skills in S3 file
watany
3
1.5k
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.1k
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
AIと共に生きる技術選定 2026
sgash708
0
130
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.9k
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.5k
My daily life on Ruby
a_matsuda
3
200
Road to RubyKaigi: Play Hard(ware)
makicamel
1
560
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.7k
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
3
350
KATA
mclloyd
PRO
35
15k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
110
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
500
Optimising Largest Contentful Paint
csswizardry
37
3.7k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
From π to Pie charts
rasagy
0
180
Why Our Code Smells
bkeepers
PRO
340
58k
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!