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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Luciano Sousa
September 12, 2019
Programming
56
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
83
Creating your startup without Developer
lucianosousa
0
190
Patterns Falacy v2
lucianosousa
0
140
Project Management like Software Developer
lucianosousa
1
120
The Patterns Falacy - Rails Version
lucianosousa
1
130
Sinatra::Ftw
lucianosousa
0
120
Other Decks in Programming
See All in Programming
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
170
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
MySQLとPostgreSQLって何が違うの?
akagami
0
140
VibeCodingからAgenticWorkflowへ
starfish719
0
870
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
220
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
210
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
510
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
300
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
200
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
180
「人を評価する AI」の設計と実装
ryoyanara
0
240
リアルな遅延を測る仕様
kota_yata
1
130
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
480
How STYLIGHT went responsive
nonsquared
100
6.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
660
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
900
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
210
30 Presentation Tips
portentint
PRO
1
380
Six Lessons from altMBA
skipperchong
29
4.5k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
440
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!