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
170
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
42
Al and Security: A double edge sword? by Stacy Véronneau and Yan Bellerose
gdgmontreal
0
69
Scaling AI on a Budget: A Startup's GPU Optimization Journey by Shannon Lal
gdgmontreal
0
49
Build Your Own Secured AI Platform with Google Cloud Vertex AI by unleashing the Power of Multi-LLM by Eckarath Khounsombath
gdgmontreal
0
76
FlutterMTL_-_Flutter_Next_24.pdf
gdgmontreal
0
57
Developing Flutter Applications in Dev Container Environments - Ali Yazdi
gdgmontreal
0
250
Building an ML powered Android Livestreaming App by Etienne Caron
gdgmontreal
1
83
Boosting Your Mobile App: Small Details, Big Impact by Mathieu Fillion
gdgmontreal
0
35
The Hitchhiker's Guide to MLOps by David Cardozo
gdgmontreal
0
37
Other Decks in Technology
See All in Technology
職種の壁を溶かして開発サイクルを高速に回す~情報透明性と職種越境から考えるAIフレンドリーな職種間連携~
daitasu
0
170
自作JSエンジンに推しプロポーザルを実装したい!
sajikix
1
180
要件定義・デザインフェーズでもAIを活用して、コミュニケーションの密度を高める
kazukihayase
0
110
Autonomous Database - Dedicated 技術詳細 / adb-d_technical_detail_jp
oracle4engineer
PRO
4
10k
allow_retry と Arel.sql / allow_retry and Arel.sql
euglena1215
1
170
Aurora DSQLはサーバーレスアーキテクチャの常識を変えるのか
iwatatomoya
1
990
これでもう迷わない!Jetpack Composeの書き方実践ガイド
zozotech
PRO
0
860
AI時代を生き抜くエンジニアキャリアの築き方 (AI-Native 時代、エンジニアという道は 「最大の挑戦の場」となる) / Building an Engineering Career to Thrive in the Age of AI (In the AI-Native Era, the Path of Engineering Becomes the Ultimate Arena of Challenge)
jeongjaesoon
0
140
S3アクセス制御の設計ポイント
tommy0124
3
200
Generative AI Japan 第一回生成AI実践研究会「AI駆動開発の現在地──ブレイクスルーの鍵を握るのはデータ領域」
shisyu_gaku
0
270
機械学習を扱うプラットフォーム開発と運用事例
lycorptech_jp
PRO
0
250
[ JAWS-UG 東京 CommunityBuilders Night #2 ]SlackとAmazon Q Developerで 運用効率化を模索する
sh_fk2
3
430
Featured
See All Featured
It's Worth the Effort
3n
187
28k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
Fireside Chat
paigeccino
39
3.6k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
How STYLIGHT went responsive
nonsquared
100
5.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
A Tale of Four Properties
chriscoyier
160
23k
Balancing Empowerment & Direction
lara
3
620
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