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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
CSC307 Lecture 03
javiergs
PRO
1
490
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.2k
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
CSC307 Lecture 08
javiergs
PRO
0
670
CSC307 Lecture 06
javiergs
PRO
0
680
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.8k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
Patterns of Patterns
denyspoltorak
0
1.4k
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
910
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
KATA
mclloyd
PRO
34
15k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The SEO identity crisis: Don't let AI make you average
varn
0
67
How to build a perfect <img>
jonoalderson
1
4.9k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
The browser strikes back
jonoalderson
0
360
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