๐ŸŽ“New! Kotlin Deep Dive Course โ€” 26 Code Playgrounds & 158 interactive assessmentsโ†’

Practical Kotlin Deep Dive

Unpacks the "how" and "why" behind Kotlin from core language fundamentals and internal mechanisms to API design. Covers Kotlin fundamentals, standard library, coroutines, kotlinx libraries, compiler internals, and Kotlin Multiplatform.

This book goes beyond the API surface and dives into Kotlin under the hood: walks through real implementations of Kotlin functions, demystifies the generated bytecode, and explains how the Kotlin compiler interprets the language.

492
PDF Pages
5
Chapters
70
Deep-Dive Topics
50+
Pro Tips
ISBN: 979-8243872744

About the Author

Jaewoong Eum (skydoves)

Jaewoong Eum (skydoves)

Google Developer Expert (Android & Firebase)

I am Jaewoong Eum (also known as skydoves), a Google Developer Expert (GDE) for Android and Firebase, previously Kotlin GDE. I have created over 80 open-source libraries and projects, downloaded more than 15 million times annually by developers worldwide.

This is my second book, following Manifest Android Interview, which has been very successful and well-received by the Android developer community worldwide.

I'm also the founder of Dove Letter, a subscription-based knowledge base where we share, explore, and discuss topics related to Android, Jetpack Compose, and Kotlin.

I hope this book helps you gain new perspectives, sharpen your problem-solving skills, and build a comprehensive understanding of Kotlin โ€” from language fundamentals to advanced topics like coroutines, compilers, and multiplatform development.

Everything You Need to Master Kotlin

What Sets This Book Apart

From in-depth explanations to practical code references

๐Ÿ“–In-Depth Explanations

Each topic provides detailed explanations that go beyond surface-level knowledge, exploring not just how Kotlin features work but why they were designed that way.

๐Ÿ’กPro Tips for Mastery

The Pro Tips sections dive deeper into advanced topics, uncovering internal structures of Kotlin fundamentals, and offering expert insights for immediate application.

๐Ÿ”References to Source Code

Find references to KEEP proposals, JetBrains YouTrack discussions, and compiler source code, giving direct insight into design decisions.

๐Ÿ“šComprehensive Coverage

From Language Fundamentals to Standard Library, Coroutines, Compiler and Plugins, and Kotlin Multiplatform โ€” practical knowledge that makes a real difference.

Content Structure

What's Inside This Book

Six comprehensive chapters covering every aspect of Kotlin development

Chapter 024 topics

Kotlin Language

Covers Kotlin's foundational building blocks, from null safety and type system design to advanced features like sealed classes, inline functions, and delegation.

Chapter 17 topics

Kotlin Standard Library

Deep exploration of Kotlin's rich standard library, including collections, sequences, scope functions, and utilities that make Kotlin code expressive and concise.

Chapter 219 topics

Coroutines

Comprehensive exploration of Kotlin's approach to asynchronous programming. From suspending functions and coroutine builders to structured concurrency, Flow, and exception handling.

Chapter 34 topics

KotlinX Libraries

Explore official Kotlin libraries developed by JetBrains that extend the language with additional functionality including serialization, date/time, and immutable collections.

Chapter 47 topics

Kotlin Compiler & Plugins

Takes you under the hood of how Kotlin code transforms into executable programs. Learn compiler architecture, K2 compiler, FIR, IR, and how to create compiler plugins.

Chapter 59 topics

Kotlin Multiplatform

Explore Kotlin's cross-platform capabilities, covering project structure, source set hierarchy, platform interoperability, and Compose Multiplatform for shared UI development.

Testimonials

What Developers Say

Hear from industry experts and GDEs who have read the book

โ€œSince Kotlin was designated as the official language for Android development, it has been loved by many developers and has grown beyond the Android platform. This book is written precisely for these developers. It dives deep into the core principles and internal mechanisms of Kotlin. If you're a Kotlin developer who truly wants to understand the language and elevate your skills to the next level, I highly recommend reading this book.โ€
Sungyong An
Sungyong An
Senior Android Engineer @ Naver Webtoon
Google Developer Expert for Android
โ€œPractical Kotlin Deep Dive is an exceptionally comprehensive guide that goes beyond syntax to explore the internal mechanisms and design philosophy of the Kotlin language. What makes it stand out is Jaewoong's unique perspective as both a GDE and a prolific open-source contributor โ€” he brings battle-tested, practical advice that bridges theory and real-world application.โ€
John O'Reilly
John O'Reilly
Staff Software Engineer @ Kraken Technologies
Google Developer Expert for Android
โ€œExceptionally well written, breaking down complex concepts into clear and understandable explanations. In an era where AI tools are readily available, this book stands out and is worth every cent. It offers a depth and clarity that you won't easily find elsewhere.โ€
Madona S. Wambua
Madona S. Wambua
Engineering Leader & Author
Google Developer Expert for Android
โ€œKotlin has evolved from a simple programming language into the core of multiplatform development. This book goes far beyond basic usage to dive deep into the design philosophy and internal mechanisms of Kotlin. It is a must-read for any engineer who wants to truly grasp the core of Kotlin.โ€
SeongUg (Steve) Jung
SeongUg (Steve) Jung
Principal Software Engineer @ Grab
Ex-Google Developer Expert for Android

Reviews

Community Feedback

See what the Kotlin community is saying about the book

Preview

Book Preview

Take a look at the content before you buy

Book previewPreview the Book

Like what you see? You can read more here:

Now Available in Print

Hardcover & Paperback Edition

Premium quality print with a beautiful dust jacket design

Get on Amazon

Practical Kotlin Deep Dive

Master Kotlin with Kotlin Deep Dive Course

An online course unpacking the fundamentals and internal mechanisms of Kotlin programming with coding exercises and quizzes to reinforce concepts.

Kotlin Deep Dive Course
๐Ÿ“158 Interactive Assessments
๐Ÿ†Certificate of Completion
๐Ÿ’ป26 Hands-on Code Playgrounds
๐ŸŽฏKey Objectives & Recaps

Table of Contents

70 Deep-Dive Topics

Six comprehensive chapters covering every aspect of Kotlin development

  1. 1Chapter Overview
  2. 2The Type System
  3. 3Null Safety in Kotlin
  4. 4The Core Principle: A Tale of Two Types
  5. 5Safely Working with Nullable Types
  6. 6Interoperability with Java and Platform Types
  7. 7The Any, Unit, and Nothing Types
  8. 8Structural and Referential Equality
  9. 9๐Ÿ’ก Pro Tips for Mastery: How does structural equality (==) work internally?
  10. 10Code Playground
  11. 11Properties and Visibility
  12. 12Variables: var vs val
  13. 13๐Ÿ’ก Pro Tips for Mastery: Why is the val variable and property read-only and not immutable?
  14. 14Visibility Modifiers
  15. 15๐Ÿ’ก Pro Tips for Mastery: How internal visibility modifier is compiled to Java Bytecode?
  16. 16The init Block
  17. 17๐Ÿ’ก Pro Tips for Mastery: What are the downsides of init block?
  18. 18๐Ÿ’ก Pro Tips for Mastery: How init block is compiled to Java Bytecode?
  19. 19Backing Fields and Backing Properties
  20. 20Code Playground
  21. 21Data and Sealed Classes
  22. 22Data Classes
  23. 23๐Ÿ’ก Pro Tips for Mastery: Data class inheritance
  24. 24๐Ÿ’ก Pro Tips for Mastery: The visibility of the copy function of data classes
  25. 25๐Ÿ’ก Pro Tips for Mastery: Unveiling a data class in Java Bytecode
  26. 26Sealed Classes
  27. 27๐Ÿ’ก Pro Tips for Mastery: Sealed class inheritance
  28. 28๐Ÿ’ก Pro Tips for Mastery: What are the differences between sealed classes and sealed interfaces?
  29. 29Code Playground
  30. 30Enum and Value Classes
  31. 31Enum Classes
  32. 32๐Ÿ’ก Pro Tips for Mastery: Generic values() and valueOf() for enums
  33. 33๐Ÿ’ก Pro Tips for Mastery: Decommission Enum.values() and replace it with Enum.entries
  34. 34๐Ÿ’ก Pro Tips for Mastery: What are the differences between a sealed class and an enum class?
  35. 35Value Classes
  36. 36๐Ÿ’ก Pro Tips for Mastery: What are the differences between value classes and inline classes?
  37. 37๐Ÿ’ก Pro Tips for Mastery: How value class is compiled to Java Bytecode
  38. 38๐Ÿ’ก Pro Tips for Mastery: @JvmExposeBoxed - Bringing Kotlin's value classes for Java
  39. 39Code Playground
  40. 40Objects and Companions
  41. 41Inner and Nested Classes
  42. 42Object Declarations
  43. 43๐Ÿ’ก Pro Tips for Mastery: Object declarations vs. expressions
  44. 44๐Ÿ’ก Pro Tips for Mastery: What is a data object?
  45. 45๐Ÿ’ก Pro Tips for Mastery: How Kotlin's object is compiled to Java Bytecode
  46. 46Companion Objects
  47. 47Code Playground
  48. 48Delegation Patterns
  49. 49Delegated Properties
  50. 50๐Ÿ’ก Pro Tips for Mastery: Internal mechanisms of Lazy
  51. 51๐Ÿ’ก Pro Tips for Mastery: How lazy() delegate property is compiled to Java Bytecode?
  52. 52Lazy Initialization vs lateinit
  53. 53๐Ÿ’ก Pro Tips for Mastery: How can you check if a lateinit property has been initialized?
  54. 54๐Ÿ’ก Pro Tips for Mastery: How lateinit is compiled to Java Bytecode
  55. 55Code Playground
  56. 56Functions and Lambdas
  57. 57Higher-Order Functions
  58. 58๐Ÿ’ก Pro Tips for Mastery: How are higher-order functions compiled into Java bytecode?
  59. 59Lambda Expressions
  60. 60Code Playground
  61. 61Inline and Reified
  62. 62๐Ÿ’ก Pro Tips for Mastery: What is an inline property?
  63. 63๐Ÿ’ก Pro Tips for Mastery: How do functions like repeat(), map(), and filter() accept suspending functions?
  64. 64The reified Keyword
  65. 65๐Ÿ’ก Pro Tips for Mastery: How inline and reified functions are compiled to Java Bytecode
  66. 66Functional (SAM) Interfaces
  67. 67๐Ÿ’ก Pro Tips for Mastery: A philosophy of SAM conversion
  68. 68Code Playground
  69. 69Extensions and DSL
  70. 70Extension Functions
  71. 71๐Ÿ’ก Pro Tips for Mastery: How are Kotlin extension functions compiled into Java bytecode?
  72. 72๐Ÿ’ก Pro Tips for Mastery: JvmSynthetic annotation
  73. 73Domain-Specific Languages (DSL)
  74. 74Code Playground
  75. 75Chapter 0 Recap
  76. 76[Quiz] Kotlin Language
  77. 77[Advanced Quiz] Kotlin Language
  1. 1Chapter Overview
  2. 2Collections and Transformations
  3. 3Collection Types
  4. 4Read-Only Collection Types
  5. 5Mutable Collection Types
  6. 6๐Ÿ’ก Pro Tips for Mastery: What are the differences between listOf() and emptyList()?
  7. 7Transformation Operators
  8. 8map and mapIndexed
  9. 9flatMap and flatten
  10. 10groupBy and associateBy
  11. 11zip and unzip
  12. 12filter, filterNot, and filterIndexed
  13. 13Code Playground
  14. 14Iterators and Sequences
  15. 15Iterators
  16. 16MutableIterator
  17. 17Sequences
  18. 18Code Playground
  19. 19Collection Retrieval
  20. 20Retrieving Parts of Collections
  21. 21Code Playground
  22. 22Ordering and Sorting
  23. 23Code Playground
  24. 24Scope Functions
  25. 25let, run, with, apply, also
  26. 26Choosing the Right Scope Function
  27. 27Code Playground
  28. 28Chapter 1 Recap
  29. 29[Quiz] Standard Library
  30. 30[Advanced Quiz] Standard Library
  1. 1Chapter Overview
  2. 2Coroutines Basics
  3. 3How Coroutines Work
  4. 4Launching Coroutines
  5. 5Suspending Functions
  6. 6๐Ÿ’ก Pro Tips for Mastery: Coroutines Terminology
  7. 7Continuation
  8. 8How Kotlin Compiler Transforms Suspend Functions
  9. 9Coroutines vs Threads
  10. 10๐Ÿ’ก Pro Tips for Mastery: What are the differences between multi-threading and multi-processing?
  11. 11๐Ÿ’ก Pro Tips for Mastery: Coroutine Execution and Mutable State Management
  12. 12Code Playground
  13. 13Coroutine Builders
  14. 14launch, async, runBlocking, produce, actor
  15. 15๐Ÿ’ก Pro Tips for Mastery: What are the differences between launch and async?
  16. 16๐Ÿ’ก Pro Tips for Mastery: Why should you use runBlocking with caution?
  17. 17๐Ÿ’ก Pro Tips for Mastery: Internal mechanisms of the AbstractCoroutine
  18. 18Code Playground
  19. 19Coroutine Context and Job
  20. 20Coroutine Context
  21. 21๐Ÿ’ก Pro Tips for Mastery: CoroutineContext interface
  22. 22Job
  23. 23๐Ÿ’ก Pro Tips for Mastery: What's a SupervisorJob?
  24. 24Code Playground
  25. 25Coroutine Scope
  26. 26GlobalScope, MainScope, viewModelScope, lifecycleScope
  27. 27๐Ÿ’ก Pro Tips for Mastery: Why should you use GlobalScope carefully?
  28. 28๐Ÿ’ก Pro Tips for Mastery: What is the coroutineScope() function?
  29. 29๐Ÿ’ก Pro Tips for Mastery: What is the supervisorScope() function?
  30. 30Code Playground
  31. 31Dispatchers and Channels
  32. 32CoroutineDispatcher
  33. 33๐Ÿ’ก Pro Tips for Mastery: Differences between CPU-intensive tasks and I/O tasks
  34. 34๐Ÿ’ก Pro Tips for Mastery: Internals of Dispatchers
  35. 35Channels
  36. 36๐Ÿ’ก Pro Tips for Mastery: Internals Mechanisms of Channel
  37. 37Code Playground
  38. 38Coroutine Control and Exception Handling
  39. 39join() and yield() functions
  40. 40Exception handling in coroutines
  41. 41๐Ÿ’ก Pro Tips for Mastery: The special nature of CancellationException
  42. 42๐Ÿ’ก Pro Tips for Mastery: Handling exception propagation when using async
  43. 43Code Playground
  44. 44Flow Basics
  45. 45Cold flow vs Hot flow
  46. 46๐Ÿ’ก Pro Tips for Mastery: Internal mechanisms of Flow and AbstractFlow
  47. 47StateFlow and SharedFlow
  48. 48๐Ÿ’ก Pro Tips for Mastery: Internal Mechanisms of StateFlow
  49. 49๐Ÿ’ก Pro Tips for Mastery: Internal Mechanisms of SharedFlow
  50. 50Code Playground
  51. 51Flow Operators
  52. 52flowOn, buffer operators
  53. 53๐Ÿ’ก Pro Tips for Mastery: Internal Mechanisms of flowOn
  54. 54๐Ÿ’ก Pro Tips for Mastery: Internal Mechanisms of Flow.buffer()
  55. 55FusibleFlow and ChannelFlow optimization
  56. 56Code Playground
  57. 57Flow Transformations
  58. 58launchIn vs Scope.launch
  59. 59flatMapLatest, flatMapMerge, flatMapConcat
  60. 60callbackFlow and channelFlow
  61. 61Code Playground
  62. 62Chapter 2 Recap
  63. 63[Quiz] Coroutines
  64. 64[Advanced Quiz] Coroutines
  1. 1Chapter Overview
  2. 2KotlinX Essentials
  3. 3Kotlinx Serialization
  4. 4How Serialization Works
  5. 5Customizing Serialization
  6. 6JSON Configuration
  7. 7Polymorphic Serialization
  8. 8Multiplatform Support
  9. 9Kotlinx Datetime
  10. 10Working with Time Zones
  11. 11Date Arithmetic
  12. 12Duration and Period
  13. 13Parsing and Formatting
  14. 14Kotlinx Collections Immutable
  15. 15Truly Immutable Collections
  16. 16Persistent Collections
  17. 17Builders for Efficient Bulk Operations
  18. 18Other Notable KotlinX Libraries
  19. 19kotlinx-atomicfu
  20. 20kotlinx-io
  21. 21kotlinx-benchmark
  22. 22Dokka
  23. 23kotlinx-rpc
  24. 24Kover
  25. 25Code Playground
  26. 26Chapter 3 Recap
  27. 27[Quiz] KotlinX Libraries
  28. 28[Advanced Quiz] KotlinX Libraries
  1. 1Chapter Overview
  2. 2Annotation Processing
  3. 3Annotation Processors, KAPT, and KSP
  4. 4Performance Comparison
  5. 5Migration from KAPT to KSP
  6. 6Kotlin Compiler Architecture
  7. 7Structure of the Kotlin Compiler
  8. 8High-Level Architecture
  9. 9Frontend and Backend
  10. 10The Role of IR
  11. 11The K2 Compiler
  12. 12Why K2?
  13. 13Key Improvements
  14. 14FIR Compilation Phases
  15. 15K2 for Plugin Authors
  16. 16Migration to K2
  17. 17Frontend Intermediate Representation (FIR)
  18. 18FIR in the K2 Compiler
  19. 19FIR Element Hierarchy
  20. 20FIR Resolution Phases
  21. 21Working with FIR: Symbols and Providers
  22. 22ConeKotlinType: The Type System
  23. 23Intermediate Representation and Backends
  24. 24IR and the Kotlin Backend
  25. 25IR Tree Structure
  26. 26Key IR Element Types
  27. 27IR Lowering: High-Level to Low-Level
  28. 28Platform-Specific Backends
  29. 29Writing Kotlin Compiler Plugins
  30. 30Plugin Architecture Overview
  31. 31Step-by-step: Define Annotation, Command Line Processor, Component Registrar
  32. 32Implement K2 FIR Extension
  33. 33Implement IR Generation Extension
  34. 34Create Gradle Plugin
  35. 35Real-World Compiler Plugin Examples
  36. 36Kotlinx Serialization Plugin
  37. 37Jetpack Compose Plugin
  38. 38Parcelize Plugin
  39. 39All-Open and No-Arg Plugins
  40. 40Chapter 4 Recap
  41. 41[Quiz] Compiler Plugins
  42. 42[Advanced Quiz] Compiler Plugins
  1. 1Chapter Overview
  2. 2KMP Fundamentals
  3. 3Kotlin Multiplatform Overview
  4. 4Key Features and Advantages
  5. 5Kotlin Multiplatform Architecture
  6. 6Expect and Actual Declarations
  7. 7What Can Be Expected/Actual
  8. 8Default Implementations
  9. 9Compiler Guarantees
  10. 10Concurrency and Asynchronous Programming
  11. 11Kotlin Coroutines: The Primary Solution
  12. 12Platform-Specific Dispatchers
  13. 13Structured Concurrency in Multiplatform
  14. 14HTTP Network Communication
  15. 15Ktor Client
  16. 16Platform-Specific Engines
  17. 17Ktorfit
  18. 18Compose Multiplatform
  19. 19How Compose Multiplatform Works
  20. 20Writing Shared UI
  21. 21Supported Platforms and Stability
  22. 22Resources and Platform Integration
  23. 23Navigation and Architecture
  24. 24Source Set Structure
  25. 25Source Sets in Kotlin Multiplatform
  26. 26Default Source Set Hierarchy
  27. 27Intermediate Source Sets
  28. 28Dependencies Per Source Set
  29. 29Kotlin/Native
  30. 30Memory Management
  31. 31Interoperability with Objective-C and Swift
  32. 32Coroutines and Swift Async/Await
  33. 33Performance Considerations
  34. 34Testing Strategies
  35. 35Common Test Structure
  36. 36Testing Coroutines
  37. 37Platform-Specific Tests
  38. 38Integration Testing
  39. 39Dependency Injection Strategies
  40. 40Metro: Compile-Time DI
  41. 41Koin: KSP-Based Compile-Time DI
  42. 42Kodein-DI: Flexible Runtime Container
  43. 43Manual Dependency Injection
  44. 44Chapter 5 Recap
  45. 45[Quiz] Kotlin Multiplatform
  46. 46[Advanced Quiz] Kotlin Multiplatform

Journey

Timeline & Milestones

Key moments from the book's journey

2026.01.31
Reached 400 copies sold ๐ŸŽ‰
2026.01.28
Hardcover and paperback edition published on Amazon ๐Ÿ“š
2026.01.15
Published Japanese edition ๐Ÿ‡ฏ๐Ÿ‡ต
2026.01.13
Published Hindi edition ๐Ÿ‡ฎ๐Ÿ‡ณ
2026.01.12
Reached 200 copies sold ๐ŸŽ‰
2026.01.11
Published Indonesian edition ๐Ÿ‡ฎ๐Ÿ‡ฉ
2026.01.11
Published Chinese edition ๐Ÿ‡จ๐Ÿ‡ณ
2026.01.06
Reached 100 copies sold ๐ŸŽ‰
2026.01.03
First edition published