Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
130
Compiler Based Testing
Xavier F. Gouchet
PRO
April 03, 2019
Tweet
Share
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Writing a Kotlin Compiler Plugin
xgouchet
PRO
0
43
Being an ethical software engineer
xgouchet
PRO
0
310
Libérez votre créativité
xgouchet
PRO
0
130
Unleash your Programming Creativity
xgouchet
PRO
0
190
Demystifying the Test Pyramid
xgouchet
PRO
1
590
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
120
Property Based Testing in Practice
xgouchet
PRO
0
89
Develop your CI tools
xgouchet
PRO
2
440
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
300
Other Decks in Programming
See All in Programming
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
5
18k
Evolving NEWT’s TypeScript Backend for the AI-Driven Era
xpromx
0
260
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
11
6.9k
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
370
「文字列→日付」の落とし穴 〜Ruby Date.parseの意外な挙動〜
sg4k0
0
360
AIコーディングエージェント(Manus)
kondai24
0
120
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
120
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
5
260
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
4.1k
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
190
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
6
1.9k
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
210
Featured
See All Featured
Navigating Team Friction
lara
191
16k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Writing Fast Ruby
sferik
630
62k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
A Tale of Four Properties
chriscoyier
162
23k
The Invisible Side of Design
smashingmag
302
51k
Site-Speed That Sticks
csswizardry
13
990
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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