Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Compiler Based Testing
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Xavier F. Gouchet
April 03, 2019
Programming
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Compiler Based Testing
Xavier F. Gouchet
April 03, 2019
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Writing a Kotlin Compiler Plugin
xgouchet
0
85
Being an ethical software engineer
xgouchet
0
350
Libérez votre créativité
xgouchet
0
190
Unleash your Programming Creativity
xgouchet
0
240
Demystifying the Test Pyramid
xgouchet
1
770
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
160
Property Based Testing in Practice
xgouchet
0
140
Develop your CI tools
xgouchet
2
520
How to write a safe and reliable Open Source Library
xgouchet
1
370
Other Decks in Programming
See All in Programming
速習iPhone Duo対応
yuukiw00w
1
590
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
190
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
130
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
110
AHC070解法紹介
eijirou
0
120
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
560
アクセシビリティから考える情報設計
high_g_engineer
0
380
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
180
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
730
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
130
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
350
Featured
See All Featured
A Soul's Torment
seathinner
8
3.6k
Accessibility Awareness
sabderemane
1
210
Visualization
eitanlees
152
17k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Embracing the Ebb and Flow
colly
88
5.2k
Marketing to machines
jonoalderson
1
5.8k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
240
Into the Great Unknown - MozCon
thekraken
41
2.7k
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