Hands-on Kotlin
Hands-on Kotlin
Summary:
Introduction
The book "Hands-on Kotlin" by Anton Naichuk, published in 2019, is a practical guide to the Kotlin programming language. Unlike many academic publications, this book focuses on solving real-world problems and writing code from the very first pages. With a volume of 336 pages, it allows for a fairly deep dive into the topic without overloading the reader with excessive theory. The title fully justifies the content: you will be "working hands-on" — writing, compiling, and debugging programs.
What this book is about
The publication covers key aspects of the Kotlin language, starting from basic syntax and ending with advanced features such as coroutines, functional programming, and Java interoperability. The book is structured on the principle of "from simple to complex": first you get acquainted with the basics — variables, data types, control structures — then move on to object-oriented programming, working with collections, lambda expressions, and null safety. Special attention is paid to practical examples: each chapter contains exercises and mini-projects that you can complete on your own.
Who this book is for
The book is aimed at beginner and intermediate developers who already have basic programming experience (for example, in Java or Python) and want to quickly learn Kotlin. It will also be useful for Android developers looking to switch from Java to Kotlin, and for backend engineers working with the JVM. For complete beginners in programming, the book may seem challenging, as the author does not explain fundamental concepts (loops, functions) from scratch, but rather shows how they are implemented in Kotlin.
What the reader will learn
- Kotlin syntax basics: variables, types, conditional statements, loops, functions.
- Object-oriented programming: classes, interfaces, inheritance, data classes, companion objects.
- Null safety: working with nullable types, the ?. and !! operators.
- Functional programming: lambdas, higher-order functions, collections (map, filter, reduce).
- Coroutines and asynchrony: launching background tasks, working with async/await.
- Java interoperability: calling Java code from Kotlin and vice versa, annotations, compatibility.
- Standard library: working with strings, dates, files, serialization.
Strengths of the book
The first thing that stands out is the practical focus. The author does not burden the reader with abstract concepts but immediately suggests writing code. For example, already in the second chapter, you create a simple console application. The second advantage is the clear structure. Each chapter ends with a summary and a list of exercises, which helps reinforce the material. The third is relevance at the time of release: the book covers Kotlin 1.3, including coroutines, which have become an important part of the language. Finally, the writing style is light and accessible, without excessive academicism.
Who it is recommended for
I recommend this book to anyone who wants to quickly start writing in Kotlin and gain practical skills. It is ideal for self-study: you can read it sequentially or use it as a reference for specific topics. If you are an Android developer, the book will help you learn Kotlin to replace Java in your projects. If you are a backend developer, you will learn how to use Kotlin on the server side (for example, with Ktor or Spring). For programming course instructors, the book can serve as a good foundation for practical classes.
Overall, "Hands-on Kotlin" is a high-quality practical guide that lives up to its name. It does not claim to be encyclopedic, but it gives exactly what a developer needs: u