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
Kotlin puzzler
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Gorita
March 17, 2019
Programming
0
92
Kotlin puzzler
interesting kotlin language quiz.
Gorita
March 17, 2019
Tweet
Share
More Decks by Gorita
See All by Gorita
Advanced MVP(refactoring MVP)
gorita
0
260
Other Decks in Programming
See All in Programming
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
CSC307 Lecture 01
javiergs
PRO
0
690
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
7.1k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
260
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
270
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
190
CSC307 Lecture 04
javiergs
PRO
0
660
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
610
Featured
See All Featured
WCS-LA-2024
lcolladotor
0
450
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
200
sira's awesome portfolio website redesign presentation
elsirapls
0
150
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
The SEO Collaboration Effect
kristinabergwall1
0
350
Faster Mobile Websites
deanohume
310
31k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
Making Projects Easy
brettharned
120
6.6k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Ethics towards AI in product and experience design
skipperchong
2
190
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Practical Orchestrator
shlominoach
191
11k
Transcript
Kotlin Puzzler to help your “Huh?” situations PARK MIREUK
This session is 7 puzzles 01 1min ~ 1.5min to
solve 02 interpretation 03 https://goo.gl/ejrMtw
Purpose -Not a test -Save your debugging time -To understand
kotlin language -For fun (remember easily) Before.. https://goo.gl/ejrMtw
My BankAccount 01
result: 1. a and b is equal:true 2. a and
b is equal:false https://goo.gl/ejrMtw
result: 1. a and b is equal:true 2. a and
b is equal:false https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
The compiler automatically derives the following members from all properties
declared in the primary constructor: - equals(), hashCode(), toString(), componentN(), copy() https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
Engineer’s lover 02
result: 1. There is no lover. 2. Soo:null 3. nothing
https://goo.gl/ejrMtw
result: 1. There is no lover. 2. Soo:null 3. nothing
https://goo.gl/ejrMtw
“I don’t know…maybe ?.let doing something..” Why?? https://goo.gl/ejrMtw
Let’s talk about ?.let Use ‘?.let’ for null check? •
Yes, you can. https://goo.gl/ejrMtw
Let’s talk about ?.let Use ‘?.let’ for null check? •
Yes, you can. • But, checking null works with safe call ?. not related with let https://goo.gl/ejrMtw
Let’s talk about ?.let let, run, also, apply . •
Expression • Scope https://goo.gl/ejrMtw
Let’s talk about ?.let let, run, also, apply . •
Expression • Opposite of Statement • Has returns • Scope https://goo.gl/ejrMtw
Let’s talk about ?.let let, run, also, apply . •
Expression • Opposite of Statement • Has returns • Scope https://goo.gl/ejrMtw
result: 1. There is no lover. 2. Soo:null 3. nothing
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
If the expression to the left of ?: is not
null, the elvis operator returns it, otherwise it returns the expression to the right. Execute expression to the left of ?: is null, Not ‘james.lover’ is null https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
Execute expression to the left of ?: is null https://goo.gl/ejrMtw
Easy Book 03
result: 1. hasAuthorName:true 2. hasAuthorName:false https://goo.gl/ejrMtw
result: 1. hasAuthorName:true 2. hasAuthorName:false https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
Need to check operator != first. Left expression of !=
and right expression of !=. https://goo.gl/ejrMtw
No account, No password 04
result: account is 1. empty. 2. . 3. null. password
is 1. empty. 2. . 3. null. https://goo.gl/ejrMtw
result: account is 1. empty. 2. . 3. null. password
is 1. empty. 2. . 3. null. https://goo.gl/ejrMtw
result: account is 1. empty. 2. . 3. null. password
is 1. empty. 2. . 3. null. https://goo.gl/ejrMtw
result: account is 1. empty. 2. . 3. null. password
is 1. empty. 2. . 3. null. https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
null “null” https://goo.gl/ejrMtw
result: account is 1. empty. 2. . 3. null. password
is 1. empty. 2. . 3. null. https://goo.gl/ejrMtw
My name is 05
result: 1. Hello, my name is james 2. Hello, my
name is 3. nothing https://goo.gl/ejrMtw
result: 1. Hello, my name is james 2. Hello, my
name is 3. nothing https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
Compile error https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
Memo 06
result: 1. pass 2. fail https://goo.gl/ejrMtw
result: 1. pass 2. fail https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
junit assert kotlin assert$ https://goo.gl/ejrMtw
% “write failing test first” remember https://goo.gl/ejrMtw
Be our guest 07
result: https://goo.gl/ejrMtw
result: 1:6, 2:6 3:6, 4:7, 5:7 6:6, 7:8, 9:7
https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
1. Same as java final https://goo.gl/ejrMtw
https://goo.gl/ejrMtw
2. Hire at least two.. https://goo.gl/ejrMtw
Thank You
Thank You