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 Gouchet
April 03, 2019
Programming
1
99
Compiler Based Testing
Xavier Gouchet
April 03, 2019
Tweet
Share
More Decks by Xavier Gouchet
See All by Xavier Gouchet
Libérez votre créativité
xgouchet
0
77
Unleash your Programming Creativity
xgouchet
0
120
Demystifying the Test Pyramid
xgouchet
1
400
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
71
Property Based Testing in Practice
xgouchet
0
57
Develop your CI tools
xgouchet
2
370
How to write a safe and reliable Open Source Library
xgouchet
1
240
Benchmarking your app's performance
xgouchet
0
190
Benchmarking your app's performance
xgouchet
0
91
Other Decks in Programming
See All in Programming
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
4
370
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
480
Writing documentation can be fun with plugin system
okuramasafumi
0
120
Software Architecture
hschwentner
6
2.1k
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
130
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
150
“あなた” の開発を支援する AI エージェント Bedrock Engineer / introducing-bedrock-engineer
gawa
11
1.8k
SpringBoot3.4の構造化ログ #kanjava
irof
2
970
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
110
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.6k
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
890
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
310
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Building Applications with DynamoDB
mza
93
6.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
630
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Optimizing for Happiness
mojombo
376
70k
Speed Design
sergeychernyshev
25
780
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