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
Compiler Based Testing
Search
Xavier F. Gouchet
PRO
April 03, 2019
Programming
0
120
Compiler Based Testing
Xavier F. Gouchet
PRO
April 03, 2019
Tweet
Share
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Being an ethical software engineer
xgouchet
PRO
0
260
Libérez votre créativité
xgouchet
PRO
0
110
Unleash your Programming Creativity
xgouchet
PRO
0
170
Demystifying the Test Pyramid
xgouchet
PRO
1
500
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
100
Property Based Testing in Practice
xgouchet
PRO
0
82
Develop your CI tools
xgouchet
PRO
2
400
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
270
Benchmarking your app's performance
xgouchet
PRO
0
220
Other Decks in Programming
See All in Programming
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
210
MDN Web Docs に日本語翻訳でコントリビュートしたくなる
ohmori_yusuke
1
120
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
460
VS Code Update for GitHub Copilot
74th
2
630
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
0
160
WebViewの現在地 - SwiftUI時代のWebKit - / The Current State Of WebView
marcy731
0
110
AIともっと楽するE2Eテスト
myohei
6
2.4k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
52
33k
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
550
10 Costly Database Performance Mistakes (And How To Fix Them)
andyatkinson
0
300
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
810
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
440
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
77
9.5k
KATA
mclloyd
30
14k
Thoughts on Productivity
jonyablonski
69
4.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Writing Fast Ruby
sferik
628
62k
Become a Pro
speakerdeck
PRO
29
5.4k
Optimizing for Happiness
mojombo
379
70k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Visualization
eitanlees
146
16k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Site-Speed That Sticks
csswizardry
10
690
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Transcript
@xgouchet Compiler based Testing CodeMobile UK 2019 - Chester
@xgouchet About me… Xavier F. Gouchet Android developer since the
Cupcake years Lead Android Engineer at WorkWell @xgouchet on every social network you can think of… 2
@xgouchet Testing is Hard Let’s let the compiler do most
of the hard work for us 3
@xgouchet Kotlin / Swift ▧ Statically Typed ▧ Strong Typed
▧ Type Safe ▧ Type Inference 4
@xgouchet Basic use case — JSON { "id" : 481516,
"title" : "Lorem ipsum dolor sit amet…", "picture" : "https://cloudhost.com/5162342", "created": 1553631328 } 5
@xgouchet Basic use case — App Model data class Event(
val id: Int, val title: String, val picture: String, val created: Int } 6
@xgouchet Primitive Aversion Primitives are lightweight… but lack context 7
@xgouchet Use existing types ▧ Integrated in framework and libraries
▧ Zero additional work data class Event( … val created: Date } 8
@xgouchet Type Alias ▧ Give context ▧ Prevent invalid assignements
▧ Ease Maintenance typealias Id = Int data class Event( val id: Id, … } 9
@xgouchet Type Checking ▧ Limit Primitive Scope ▧ Validate data
data class Url(val value: String) { init { val parsedUrl = URL(value) } } data class Event( … val picture: Url } 10
@xgouchet Additional gains 11
@xgouchet Bonus ▧ Share common operations ▧ Force explicit types
▧ Simplify complex structure 12
@xgouchet @xgouchet Thanks! Any questions? 13 Presentation template by SlidesCarnival