Jetpack Compose Tutorial #15: Animations — Make Your UI Feel Alive

Your app works. But it feels flat. Buttons appear instantly. Screens switch without transition. Content pops in and out like a slideshow from 2005. Animations fix that. They make your app feel smooth, polished, and alive — like a well-made product instead of a homework assignment. The good news: Compose makes animations surprisingly easy. You can add most animations with a single line of code. The Animation API at a Glance Compose has several animation APIs, each for a different use case: ...

March 24, 2026 · 9 min

Jetpack Compose Tutorial #14: Dependency Injection with Hilt

In the previous tutorials, we created databases and ViewModels manually. We wrote DatabaseProvider singletons. We passed dependencies by hand. It worked — but it doesn’t scale. When your app has 10 ViewModels, 5 repositories, 3 data sources, and a database — wiring everything manually becomes a nightmare. One missing connection and your app crashes. Hilt fixes this. You add annotations to your classes, and Hilt connects everything automatically. What is Dependency Injection? Dependency injection (DI) means: instead of a class creating its own dependencies, someone else provides them. ...

March 23, 2026 · 7 min

Jetpack Compose Tutorial #13: Room Database — Saving Data Locally

Your app loads data from an API. But what happens when the user has no internet? The screen goes blank. Room database fixes this. It saves data on the device so your app works offline. And it integrates perfectly with Compose — when data changes in the database, the UI updates automatically. What is Room? Room is Google’s database library for Android. It sits on top of SQLite and gives you a clean Kotlin API instead of raw SQL. ...

March 23, 2026 · 7 min

Jetpack Compose Tutorial #12: Retrofit — Loading Data from APIs

Every real app needs data from the internet. A weather app calls a weather API. A social app loads posts from a server. A store app fetches products from a backend. Retrofit is the most popular library for making HTTP requests in Android. In this tutorial, you will learn how to use it with Compose to build a screen that loads, displays, and handles errors from a real API. What is Retrofit? Retrofit is an HTTP client library by Square. It turns your API into a Kotlin interface: ...

March 23, 2026 · 7 min

Jetpack Compose Tutorial #11: Side Effects — LaunchedEffect and Friends

Compose has one rule: Composable functions should be pure. They take state in and produce UI out. No database calls. No API requests. No timers. No logging. But real apps need those things. You need to start a timer when a screen opens. You need to load data when an ID changes. You need to clean up a listener when a screen closes. That is what side effects are for. They let you safely run “impure” code inside Compose. ...

March 23, 2026 · 9 min

Kotlin Tutorial #25: Testing in Kotlin — JUnit 5, MockK, and Best Practices

In the previous tutorial, you built a REST API with Ktor. Now let’s learn about testing. Good tests make your code reliable and give you confidence to refactor. In this tutorial, you will learn how to write tests in Kotlin using JUnit 5 and MockK. In this tutorial, you will learn: JUnit 5 basics (@Test, @BeforeEach, @Nested) Assertions (assertEquals, assertTrue, assertThrows) Parameterized tests (@ParameterizedTest, @ValueSource, @CsvSource) MockK (mock, every, verify) Argument capture and verification order Testing coroutines with runTest Test organization and best practices Setting Up Add MockK and coroutines-test to your build.gradle.kts: ...

March 22, 2026 · 8 min

Kotlin Tutorial #24: Build a REST API with Ktor

In the previous tutorial, you built a CLI tool. Now let’s build a REST API. Ktor is Kotlin’s official framework for building asynchronous servers and clients. It is lightweight, flexible, and uses Kotlin coroutines. In this tutorial, you will learn: Setting up Ktor Routing (GET, POST, PUT, DELETE) JSON serialization with Content Negotiation In-memory storage Path parameters and query parameters Error handling with StatusPages Testing with ktor-server-test-host What We’re Building A Notes API with CRUD operations: ...

March 22, 2026 · 9 min

Kotlin Tutorial #23: Build a CLI Tool with Kotlin

In the previous tutorial, you learned about Kotlin Serialization. Now let’s build something real. In this tutorial, you will build a complete CLI (Command-Line Interface) tool: a text analyzer that counts words, finds patterns, and shows statistics. In this tutorial, you will learn: Reading command-line arguments File I/O (reading files) Text analysis (word count, frequency) Colored terminal output with ANSI codes Argument parsing Error handling Structuring a real project What We’re Building A text analysis tool called TextAnalyzer with these commands: ...

March 22, 2026 · 8 min

Kotlin Tutorial #22: Kotlin Serialization and Working with JSON

In the previous tutorial, you learned about Kotlin DSLs. Now let’s learn about Kotlin Serialization. Serialization is the process of converting objects to a format like JSON, and deserialization is the reverse. Kotlin Serialization is the official library for this. In this tutorial, you will learn: Setting up Kotlin Serialization @Serializable and basic encoding/decoding Default values and optional fields @Transient for ignoring fields @SerialName for custom field names Nested objects and collections Enum serialization Json configuration options Polymorphic serialization JsonElement API for raw JSON Practical examples Setting Up Add the serialization plugin and dependency to your build.gradle.kts: ...

March 22, 2026 · 8 min

Kotlin Tutorial #21: Kotlin DSLs — Writing Expressive APIs

In the previous tutorial, you learned about inline functions and reified types. Now let’s learn about DSLs. A DSL (Domain-Specific Language) is a small language designed for a specific task. Kotlin makes it easy to create DSLs using lambdas with receivers. In this tutorial, you will learn: Lambdas with receiver Building a config DSL Nested DSL builders @DslMarker annotation HTML builder DSL Route DSL Query builder DSL Gradle-style DSL What is a DSL? A DSL is a language designed for a specific domain. You already use Kotlin DSLs every day: ...

March 22, 2026 · 9 min