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
9
Al and Security: A double edge sword? by Stacy Véronneau and Yan Bellerose
gdgmontreal
0
11
Scaling AI on a Budget: A Startup's GPU Optimization Journey by Shannon Lal
gdgmontreal
0
10
Build Your Own Secured AI Platform with Google Cloud Vertex AI by unleashing the Power of Multi-LLM by Eckarath Khounsombath
gdgmontreal
0
17
FlutterMTL_-_Flutter_Next_24.pdf
gdgmontreal
0
7
Developing Flutter Applications in Dev Container Environments - Ali Yazdi
gdgmontreal
0
7
Building an ML powered Android Livestreaming App by Etienne Caron
gdgmontreal
0
13
Boosting Your Mobile App: Small Details, Big Impact by Mathieu Fillion
gdgmontreal
0
7
The Hitchhiker's Guide to MLOps by David Cardozo
gdgmontreal
0
6
Other Decks in Technology
See All in Technology
The Role of Developer Relations in AI Product Success.
giftojabu1
1
130
AIチャットボット開発への生成AI活用
ryomrt
0
170
Platform Engineering for Software Developers and Architects
syntasso
1
520
アジャイルでの品質の進化 Agile in Motion vol.1/20241118 Hiroyuki Sato
shift_evolve
0
170
TypeScript、上達の瞬間
sadnessojisan
46
13k
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
290
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
520
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
130
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
230
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
Featured
See All Featured
Building Your Own Lightsaber
phodgson
103
6.1k
GitHub's CSS Performance
jonrohan
1030
460k
Done Done
chrislema
181
16k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Music & Morning Musume
bryan
46
6.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Become a Pro
speakerdeck
PRO
25
5k
The Invisible Side of Design
smashingmag
298
50k
Code Review Best Practice
trishagee
64
17k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
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