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
120
The Zen of Kotlin by Vincent Carrier
GDG Montreal
February 28, 2018
Tweet
Share
More Decks by GDG Montreal
See All by GDG Montreal
Introduction to Game Development in Flutter with Flame
gdgmontreal
0
7
Leveraging generics to create flexible, type-safe, highly reusable code
gdgmontreal
0
6
Demystifying OWASP Top 10 Mobile Risks
gdgmontreal
0
11
Core concepts of Navigation in Flutter
gdgmontreal
0
13
2024 FlutterMTL January Meetup - Mastering Dart Langchain by Eckarath
gdgmontreal
1
31
2024 FlutterMTL January Meetup - Build Customization by Nicolas Cuillery
gdgmontreal
0
20
FlutterMTL December Meetup 23 - Cache Management In Flutter
gdgmontreal
0
24
FlutterMTL November Meetup - Power of AI in your Flutter app with Vertex AI
gdgmontreal
0
33
FlutterMTL November Meetup - Integrating Dart & Flutter with Google Cloud Document AI
gdgmontreal
0
16
Other Decks in Technology
See All in Technology
Tohoku.Tech #1 「EC-CUBE/AWSの構築をChatGPTに相談してみました」by テンダ
jun2882
0
140
生成AIの不確実性と向き合うためのオブジェクト指向設計
tkikuchi1002
2
660
検証からプロダクトへ: シームレスなLLM開発の ためのしくみ作り
nunukim
1
160
バッチ処理のSLOをどう設計するか
rynsuke
7
560
KTC_DBRE.pdf
_awache
0
290
2023 Japan AWS Jr.Championsに選出されての振り返りとこれから
hiropy877
1
130
関数型DDDの理論と実践:「決定を遅らせる」を先につくり、 ビジネスの機動力と価値をあげる
knih
2
470
Kubeflow Pipelines v2 で変わる機械学習パイプライン開発
asei
4
340
データ品質をコード化! LINEヤフーのMLOpsを最適化する "ACP Data Quality" の紹介
lycorptech_jp
PRO
2
160
どう買う?Azure
kuniteru
1
190
8週連続ウェビナー_イチから学ぶFivetran
cmsuzu
0
160
技術広報として2023年度に頑張ったこと / What we did well in FY2023 as a DevRel
pauli
5
460
Featured
See All Featured
Unsuck your backbone
ammeep
661
56k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
19
1.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
397
65k
Designing with Data
zakiwarfel
94
4.8k
Documentation Writing (for coders)
carmenintech
59
3.8k
Robots, Beer and Maslow
schacon
PRO
154
7.9k
Visualization
eitanlees
135
14k
The MySQL Ecosystem @ GitHub 2015
samlambert
242
12k
Raft: Consensus for Rubyists
vanstee
130
6.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
12
1.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
355
22k
Fantastic passwords and where to find them - at NoRuKo
philnash
35
2.4k
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