๐ŸŽ“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
6
Chapters
70
Deep-Dive Topics
50+
Pro Tips
ISBN: 979-8243872744

Loved by engineers from top global tech companies

GoogleMetaSquareGrabKakaoNaverand more

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. 10Properties and Visibility
  11. 11Variables: var vs val
  12. 12๐Ÿ’ก Pro Tips for Mastery: Why is the val variable and property read-only and not immutable?
  13. 13Visibility Modifiers
  14. 14๐Ÿ’ก Pro Tips for Mastery: How internal visibility modifier is compiled to Java Bytecode?
  15. 15The init Block
  16. 16๐Ÿ’ก Pro Tips for Mastery: What are the downsides of init block?
  17. 17๐Ÿ’ก Pro Tips for Mastery: How init block is compiled to Java Bytecode?
  18. 18Backing Fields and Backing Properties
  19. 19Data and Sealed Classes
  20. 20Data Classes
  21. 21๐Ÿ’ก Pro Tips for Mastery: Data class inheritance
  22. 22๐Ÿ’ก Pro Tips for Mastery: The visibility of the copy function of data classes
  23. 23๐Ÿ’ก Pro Tips for Mastery: Unveiling a data class in Java Bytecode
  24. 24Sealed Classes
  25. 25๐Ÿ’ก Pro Tips for Mastery: Sealed class inheritance
  26. 26๐Ÿ’ก Pro Tips for Mastery: What are the differences between sealed classes and sealed interfaces?
  27. 27Enum and Value Classes
  28. 28Enum Classes
  29. 29๐Ÿ’ก Pro Tips for Mastery: Generic values() and valueOf() for enums
  30. 30๐Ÿ’ก Pro Tips for Mastery: Decommission Enum.values() and replace it with Enum.entries
  31. 31๐Ÿ’ก Pro Tips for Mastery: What are the differences between a sealed class and an enum class?
  32. 32Value Classes
  33. 33๐Ÿ’ก Pro Tips for Mastery: What are the differences between value classes and inline classes?
  34. 34๐Ÿ’ก Pro Tips for Mastery: How value class is compiled to Java Bytecode
  35. 35๐Ÿ’ก Pro Tips for Mastery: @JvmExposeBoxed - Bringing Kotlin's value classes for Java
  36. 36Objects and Companions
  37. 37Inner and Nested Classes
  38. 38Object Declarations
  39. 39๐Ÿ’ก Pro Tips for Mastery: Object declarations vs. expressions
  40. 40๐Ÿ’ก Pro Tips for Mastery: What is a data object?
  41. 41๐Ÿ’ก Pro Tips for Mastery: How Kotlin's object is compiled to Java Bytecode
  42. 42Companion Objects
  43. 43Delegation Patterns
  44. 44Delegated Properties
  45. 45๐Ÿ’ก Pro Tips for Mastery: Internal mechanisms of Lazy
  46. 46๐Ÿ’ก Pro Tips for Mastery: How lazy() delegate property is compiled to Java Bytecode?
  47. 47Lazy Initialization vs lateinit
  48. 48๐Ÿ’ก Pro Tips for Mastery: How can you check if a lateinit property has been initialized?
  49. 49๐Ÿ’ก Pro Tips for Mastery: How lateinit is compiled to Java Bytecode
  50. 50Functions and Lambdas
  51. 51Higher-Order Functions
  52. 52๐Ÿ’ก Pro Tips for Mastery: How are higher-order functions compiled into Java bytecode?
  53. 53Lambda Expressions
  54. 54Inline and Reified
  55. 55๐Ÿ’ก Pro Tips for Mastery: What is an inline property?
  56. 56๐Ÿ’ก Pro Tips for Mastery: How do functions like repeat(), map(), and filter() accept suspending functions?
  57. 57The reified Keyword
  58. 58๐Ÿ’ก Pro Tips for Mastery: How inline and reified functions are compiled to Java Bytecode
  59. 59Functional (SAM) Interfaces
  60. 60๐Ÿ’ก Pro Tips for Mastery: A philosophy of SAM conversion
  61. 61Extensions and DSL
  62. 62Extension Functions
  63. 63๐Ÿ’ก Pro Tips for Mastery: How are Kotlin extension functions compiled into Java bytecode?
  64. 64๐Ÿ’ก Pro Tips for Mastery: JvmSynthetic annotation
  65. 65Domain-Specific Languages (DSL)
  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. 13Iterators and Sequences
  14. 14Iterators
  15. 15MutableIterator
  16. 16Sequences
  17. 17Collection Retrieval
  18. 18Retrieving Parts of Collections
  19. 19Ordering and Sorting
  20. 20Scope Functions
  21. 21let, run, with, apply, also
  22. 22Choosing the Right Scope Function
  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. 12Coroutine Builders
  13. 13launch, async, runBlocking, produce, actor
  14. 14๐Ÿ’ก Pro Tips for Mastery: What are the differences between launch and async?
  15. 15๐Ÿ’ก Pro Tips for Mastery: Why should you use runBlocking with caution?
  16. 16๐Ÿ’ก Pro Tips for Mastery: Internal mechanisms of the AbstractCoroutine
  17. 17Coroutine Context and Job
  18. 18Coroutine Context
  19. 19๐Ÿ’ก Pro Tips for Mastery: CoroutineContext interface
  20. 20Job
  21. 21๐Ÿ’ก Pro Tips for Mastery: What's a SupervisorJob?
  22. 22Coroutine Scope
  23. 23GlobalScope, MainScope, viewModelScope, lifecycleScope
  24. 24๐Ÿ’ก Pro Tips for Mastery: Why should you use GlobalScope carefully?
  25. 25๐Ÿ’ก Pro Tips for Mastery: What is the coroutineScope() function?
  26. 26๐Ÿ’ก Pro Tips for Mastery: What is the supervisorScope() function?
  27. 27Dispatchers and Channels
  28. 28CoroutineDispatcher
  29. 29๐Ÿ’ก Pro Tips for Mastery: Differences between CPU-intensive tasks and I/O tasks
  30. 30๐Ÿ’ก Pro Tips for Mastery: Internals of Dispatchers
  31. 31Channels
  32. 32๐Ÿ’ก Pro Tips for Mastery: Internals Mechanisms of Channel
  33. 33Coroutine Control and Exception Handling
  34. 34join() and yield() functions
  35. 35Exception handling in coroutines
  36. 36๐Ÿ’ก Pro Tips for Mastery: The special nature of CancellationException
  37. 37๐Ÿ’ก Pro Tips for Mastery: Handling exception propagation when using async
  38. 38Flow Basics
  39. 39Cold flow vs Hot flow
  40. 40๐Ÿ’ก Pro Tips for Mastery: Internal mechanisms of Flow and AbstractFlow
  41. 41StateFlow and SharedFlow
  42. 42๐Ÿ’ก Pro Tips for Mastery: Internal Mechanisms of StateFlow
  43. 43๐Ÿ’ก Pro Tips for Mastery: Internal Mechanisms of SharedFlow
  44. 44Flow Operators
  45. 45flowOn, buffer operators
  46. 46๐Ÿ’ก Pro Tips for Mastery: Internal Mechanisms of flowOn
  47. 47๐Ÿ’ก Pro Tips for Mastery: Internal Mechanisms of Flow.buffer()
  48. 48FusibleFlow and ChannelFlow optimization
  49. 49Flow Transformations
  50. 50launchIn vs Scope.launch
  51. 51flatMapLatest, flatMapMerge, flatMapConcat
  52. 52callbackFlow and channelFlow
  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
  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
  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

Journey

Timeline & Milestones

Key moments from the book's journey

2026.03.01
Reached 600 copies sold ๐ŸŽ‰
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