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
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
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
5.2k
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
4
680
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
2
280
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
220
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
160
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
180
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.5k
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
1.1k
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
7
4.3k
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
650
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
420
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
5k
Featured
See All Featured
Building AI with AI
inesmontani
PRO
1
620
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
230
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
790
Ruling the World: When Life Gets Gamed
codingconduct
0
120
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Thoughts on Productivity
jonyablonski
74
5k
Ethics towards AI in product and experience design
skipperchong
1
170
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
540
Odyssey Design
rkendrick25
PRO
0
460
Everyday Curiosity
cassininazir
0
120
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
100
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