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
April 03, 2019
Programming
170
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
76
Being an ethical software engineer
xgouchet
0
340
Libérez votre créativité
xgouchet
0
170
Unleash your Programming Creativity
xgouchet
0
230
Demystifying the Test Pyramid
xgouchet
1
730
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
150
Property Based Testing in Practice
xgouchet
0
120
Develop your CI tools
xgouchet
2
500
How to write a safe and reliable Open Source Library
xgouchet
1
350
Other Decks in Programming
See All in Programming
symfony/aiとlaravel/boost
77web
0
120
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.7k
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
140
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
1k
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
660
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
830
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
240
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
290
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
7
1.1k
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.7k
Performance Engineering for Everyone
elenatanasoiu
0
250
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to Talk to Developers About Accessibility
jct
2
280
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
280
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
210
Deep Space Network (abreviated)
tonyrice
0
220
Measuring & Analyzing Core Web Vitals
bluesmoon
9
880
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Scaling GitHub
holman
464
140k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
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