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
250
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
NPOでのDevinの活用
codeforeveryone
0
650
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
660
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
260
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
180
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
260
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
1k
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
240
#QiitaBash MCPのセキュリティ
ryosukedtomita
0
660
Discover Metal 4
rei315
2
110
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
340
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
260
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
150
Featured
See All Featured
Unsuck your backbone
ammeep
671
58k
Embracing the Ebb and Flow
colly
86
4.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Designing for humans not robots
tammielis
253
25k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Six Lessons from altMBA
skipperchong
28
3.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
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