Skip to main content
PCSalt logo
YouTube GitHub

# kotlin

49 posts

Spring Boot Profiles Done Right — Config, Activation & Secrets

Master Spring Boot profiles — profile-specific configuration files, conditional beans, type-safe @ConfigurationProperties, and secrets management across environments.

Spring Boot 2 min read

Gradle Kotlin DSL Tips — Version Catalogs, Convention Plugins & Build Optimization

Go beyond basics with Gradle Kotlin DSL — advanced version catalog features, convention plugin patterns, custom tasks, and build performance optimization.

Android 2 min read

Migrating a Spring Boot Service from Java to Kotlin — A Practical Guide

A step-by-step guide to migrating a Spring Boot application from Java to Kotlin — migration order, build setup, interop gotchas, JPA concerns, and testing with MockK.

Kotlin 3 min read

Spring Boot 4 + MongoDB — Aggregations, Schema Evolution & Repository Patterns

Build a Spring Boot 4 application with MongoDB — document modeling in Kotlin, Spring Data repositories, MongoTemplate queries, aggregation pipelines, and schema evolution strategies.

Spring Boot 2 min read

Android Project Setup in 2026 — Version Catalogs, KSP, Compose & CI

Set up a modern Android project with Kotlin 2.x, Compose, KSP, version catalogs, convention plugins, and GitHub Actions CI — a complete 2026 baseline.

Android 2 min read

Modern RecyclerView — ListAdapter, DiffUtil & ViewBinding in Kotlin

Build efficient RecyclerView lists with ListAdapter, DiffUtil.ItemCallback, and ViewBinding in Kotlin — with click handling, ViewModel integration, and common pitfalls.

Android 2 min read

Multi-Module Spring Boot Project with Gradle Version Catalog

Structure a multi-module Spring Boot project with Gradle — shared dependencies via version catalogs (libs.versions.toml), module boundaries, and build optimization.

Spring Boot 2 min read

Automating Android Repo Maintenance with Reusable GitHub Actions

How I modernized 8 Android repos in one session — reusable CI workflows, batch build system updates, and a pattern for maintaining multiple projects at scale.

Android 3 min read

Rate Limiting & Circuit Breakers with Resilience4j

Add resilience to Spring Boot 4 services with Resilience4j — circuit breakers, retries, rate limiters, bulkheads, and how to configure them for production.

Spring Boot 3 min read

SharedPreferences in Android — The Complete Guide

Everything you need to know about SharedPreferences in Android — when to use it, how to save, read, remove, and list all stored values. All examples in Kotlin.

Android 1 min read

AlertDialog in Android — The Complete Guide

Everything you need to know about AlertDialog in Android — basic usage, selection dialogs, custom layouts, and button customization. All in Kotlin.

Android 2 min read

Spring Boot Actuator & OpenTelemetry — Production Monitoring

Set up Spring Boot Actuator for health checks and metrics, integrate OpenTelemetry for distributed tracing, and export to Prometheus and Grafana.

Spring Boot 2 min read

Spring Boot + Kafka — Producer, Consumer & Dead Letter Topics

Integrate Apache Kafka with Spring Boot 4 — producer configuration, consumer groups, error handling, dead letter topics, and JSON serialization.

Spring Boot 2 min read

Testing Spring Boot — Unit, Integration & Testcontainers

A practical guide to testing Spring Boot 4 applications — unit tests, MockMvc, @DataJpaTest, Testcontainers for PostgreSQL, and @ServiceConnection.

Spring Boot 2 min read

Spring Security — JWT Authentication from Scratch

Implement JWT authentication in Spring Boot 4 with Spring Security 7 — login endpoint, token generation, validation, refresh tokens, and protected routes.

Spring Boot 1 min read

Spring Data JPA with PostgreSQL — Repository Pattern Done Right

Set up Spring Data JPA with PostgreSQL in Spring Boot 4 — entities, repositories, custom queries, pagination, and database migrations with Flyway.

Spring Boot 2 min read

REST API Design in Spring Boot 4 — Validation, Error Handling & DTOs

Design production-ready REST APIs in Spring Boot 4 — request validation with Bean Validation, structured error responses, DTO patterns, and API best practices.

Spring Boot 1 min read

Spring Boot 4 Starter — Project Setup, Structure & First API

Set up a Spring Boot 4 project from scratch — project structure, REST controller, configuration, profiles, and your first working API endpoint.

Spring Boot 1 min read

Kotlin 2.x — What Changed and How to Migrate

Everything you need to know about migrating to Kotlin 2.x — the K2 compiler, breaking changes, new features, Compose compiler integration, and step-by-step migration guide.

Kotlin 3 min read

Kotlin Testing with Kotest & MockK — Beyond JUnit

Level up your Kotlin testing — Kotest for expressive test styles and assertions, MockK for idiomatic mocking. A practical guide with real-world examples.

Kotlin 2 min read

Kotlin Value Classes & Inline Functions — Zero-Cost Abstractions

Learn how Kotlin value classes and inline functions give you type safety and abstraction without runtime overhead — wrapping primitives, type-safe IDs, and performance patterns.

Kotlin 3 min read

Kotlin + Arrow — Functional Error Handling (Either, Raise)

Learn functional error handling in Kotlin with Arrow — Either, Raise, typed errors, and how to replace try-catch with composable error handling.

Kotlin 3 min read

CQRS with Spring Boot, Kafka & MongoDB — Part 5: Putting It All Together

Docker Compose setup, end-to-end flow walkthrough, integration tests with Testcontainers, and a production readiness checklist for the complete CQRS system.

Architecture 7 min read

CQRS with Spring Boot, Kafka & MongoDB — Part 4: The Hard Parts

Eventual consistency, idempotent consumers, schema evolution, the outbox problem — the real-world challenges that make CQRS hard and how to handle them.

Architecture 9 min read

CQRS with Spring Boot, Kafka & MongoDB — Part 3: Query Side — Reads at Scale

Building the query service — consuming Kafka events, building read-optimized projections, and serving fast queries from MongoDB.

Architecture 6 min read

Kotlin Context Receivers & Scope Functions Deep Dive

Master Kotlin's scope functions (let, run, with, apply, also) and understand context receivers — when to use each, common patterns, and real-world examples.

Kotlin 3 min read

CQRS with Spring Boot, Kafka & MongoDB — Part 2: Command Side — Writes Done Right

Building the command service — accepting orders, validating business rules, persisting to MongoDB, and publishing domain events to Kafka.

Architecture 6 min read

CQRS with Spring Boot, Kafka & MongoDB — Part 1: What is CQRS and why you need it

Understanding Command Query Responsibility Segregation, when it makes sense, and how Spring Boot, Kafka, and MongoDB fit together in a CQRS architecture.

Architecture 5 min read

Kotlin + Ktor — Building a REST API Without Spring

Build a REST API with Ktor 3 and Kotlin — routing, serialization, authentication, database access, and testing. A lightweight alternative to Spring Boot.

Kotlin 2 min read

Kotlin Multiplatform — Share Code Between Android & Backend

A practical guide to Kotlin Multiplatform (KMP) — share business logic, models, and validation between your Android app and Spring Boot backend without duplicating code.

Kotlin 3 min read

Kotlin DSL — Build Your Own Type-Safe Builder

Learn how to create type-safe DSLs in Kotlin using lambdas with receivers, extension functions, and builder patterns. Build a real HTML DSL and a config DSL from scratch.

Kotlin 3 min read

Kotlin Sealed Classes & When Expressions — Modeling State

Learn how Kotlin sealed classes and when expressions work together to model state, handle API responses, and eliminate impossible states in your code.

Kotlin 3 min read

Kotlin Flows — Cold Flows, Hot Flows & StateFlow Explained

Understand Kotlin Flow from the ground up — cold vs hot flows, Flow builders, operators, StateFlow, SharedFlow, and when to use each in Android and backend projects.

Kotlin 5 min read

5 Kotlin Extension Functions You'll Use in Every Android Project

Practical Kotlin extension functions for Android — view visibility, toasts, keyboard handling, dp conversion, and intent helpers. Copy, paste, use.

Kotlin 2 min read

Kotlin Coroutines — Part 3: Real-World Patterns

Flows, StateFlow, coroutines in Android and Spring Boot, Retrofit, Room, and testing — practical patterns you'll use every day.

Kotlin 6 min read

Kotlin Coroutines — Part 2: Structured Concurrency

How structured concurrency keeps your coroutines under control — scopes, cancellation, exception handling, and the parent-child relationship that prevents orphan coroutines.

Kotlin 6 min read

Kotlin Coroutines — Part 1: The Basics

A practical introduction to Kotlin coroutines — why they exist, how to launch them, suspend functions, dispatchers, and concurrent execution patterns.

Kotlin 5 min read

JSON Parsing in Kotlin — Parsing with Kotlin Serialization

Parse a complex JSON response using Kotlin Serialization — the Kotlin-native, compile-time safe approach with no reflection.

Kotlin 3 min read

CI/CD for Android with GitHub Actions

Set up automated builds, tests, signing, and Play Store deployment for your Android project using GitHub Actions.

Android 3 min read

XML Parsing in Kotlin — XmlPullParser and Retrofit

Parse XML in Kotlin using Android's built-in XmlPullParser and Retrofit with SimpleXML converter. Manual vs automatic — when to use what.

Kotlin 3 min read

JSON Parsing in Kotlin — Which Library Should You Use?

A side-by-side comparison of org.json, Gson, Moshi, Kotlin Serialization, and Jackson for JSON parsing in Kotlin.

Kotlin 3 min read

JSON Parsing in Kotlin — Parsing with Jackson

Parse a complex JSON response using Jackson with the Kotlin module — the server-side powerhouse that's also the default in Spring Boot.

Kotlin 3 min read

JSON Parsing in Kotlin — Parsing with Moshi

Parse a complex JSON response using Moshi with Kotlin data classes, codegen, and proper null safety. The recommended JSON library for modern Android.

Kotlin 3 min read

JSON Parsing in Kotlin — Parsing with Gson

Parse a complex JSON response using Gson with Kotlin data classes. Automatic mapping, @SerializedName, nullable types, and a custom TypeAdapter for Instant.

Kotlin 3 min read

JSON Parsing in Kotlin — Manual Parsing with org.json

Parse a complex, real-world JSON response manually using org.json in Kotlin. Extension functions help, but the verbosity is still real.

Kotlin 3 min read

Add Badge Count to Navigation Drawer Hamburger Icon

NavigationDrawer provides easy access to menu functions. Sometimes the menu items have some actionable content available. To notify user that...

Android 1 min read

Migrate to Android Room with Date Column

Migrating our apps to Android Room from conventional SQLite Database was flawless except when we encountered issue with Date column...

Android 3 min read

Find and Delete Duplicate Files — Kotlin CLI Tool

A command-line utility in Kotlin that scans directories for duplicate files using MD5 hashing and lets you review and delete them safely.

Kotlin 2 min read

Copy to Clipboard Programmatically

Copy text to clipboard and paste from clipboard programmatically in Android using ClipboardManager and ClipData.

Android 1 min read