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
The Zen of Kotlin by Vincent Carrier
Search
GDG Montreal
February 28, 2018
Technology
0
150
The Zen of Kotlin by Vincent Carrier
GDG Montreal
February 28, 2018
Tweet
Share
More Decks by GDG Montreal
See All by GDG Montreal
Advanced Pregnancy Risk Assessment Using AI Model Chain by Kiruthika Subramani
gdgmontreal
0
15
Al and Security: A double edge sword? by Stacy Véronneau and Yan Bellerose
gdgmontreal
0
28
Scaling AI on a Budget: A Startup's GPU Optimization Journey by Shannon Lal
gdgmontreal
0
19
Build Your Own Secured AI Platform with Google Cloud Vertex AI by unleashing the Power of Multi-LLM by Eckarath Khounsombath
gdgmontreal
0
38
FlutterMTL_-_Flutter_Next_24.pdf
gdgmontreal
0
19
Developing Flutter Applications in Dev Container Environments - Ali Yazdi
gdgmontreal
0
78
Building an ML powered Android Livestreaming App by Etienne Caron
gdgmontreal
1
42
Boosting Your Mobile App: Small Details, Big Impact by Mathieu Fillion
gdgmontreal
0
17
The Hitchhiker's Guide to MLOps by David Cardozo
gdgmontreal
0
10
Other Decks in Technology
See All in Technology
Amazon S3 Tablesと外部分析基盤連携について / Amazon S3 Tables and External Data Analytics Platform
nttcom
0
120
RSNA2024振り返り
nanachi
0
530
Larkご案内資料
customercloud
PRO
0
650
2.5Dモデルのすべて
yu4u
2
790
30分でわかる『アジャイルデータモデリング』
hanon52_
9
2.5k
Building Products in the LLM Era
ymatsuwitter
10
5k
PL900試験から学ぶ Power Platform 基礎知識講座
kumikeyy
0
120
バックエンドエンジニアのためのフロントエンド入門 #devsumiC
panda_program
16
7k
明日からできる!技術的負債の返済を加速するための実践ガイド~『ホットペッパービューティー』の事例をもとに~
recruitengineers
PRO
3
290
株式会社EventHub・エンジニア採用資料
eventhub
0
4.2k
利用終了したドメイン名の最強終活〜観測環境を育てて、分析・供養している件〜 / The Ultimate End-of-Life Preparation for Discontinued Domain Names
nttcom
1
120
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
1.8k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Rails Girls Zürich Keynote
gr2m
94
13k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
320
Building Applications with DynamoDB
mza
93
6.2k
Faster Mobile Websites
deanohume
306
31k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Visualization
eitanlees
146
15k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
Transcript
The Zen of Kotlin By Vincent Carrier
Follow along https://github.com/Vincent-Carrier/Omego.git
Simple rules, infinite possibilities • Take turns to place stones
• If one of your group is surrounded by the other, it is captured • The player with the most territory wins
Less code is more
None
with()
Without with()
None
apply()
Without apply()
Good code documents itself
Local functions
None
Extension functions and lambdas with receivers Within my AppCompatActivity:
Custom getter functions
Type aliases
Type aliases
Don’t expose more than you should
lateinit vs by lazy
package visibility does not exist in Kotlin • package limits
visibility to enclosing folder. internal limits visibility to enclosing module. • Get comfortable with modules!
Why modules? • Encourages better code structure • Easier to
distribute and reuse • Compiles faster • Convert to an Instant App easily THIS IS GRADLE. IT’S A BUILD SYSTEM FOR THE JVM THAT WORKS THROUGH A BEAUTIFUL DIRECTED ACYCLIC GRAPH MODEL.
Module types • Phone & Tablet • Android Library •
Java Library • And more…
build.gradle (Project) Define some common dependencies to avoid having to
repeat ourselves too much
build.gradle (model) build.gradle (app)
Thank you for listening