Nemat
30 Jul
Explains Kotlin's by-keyword delegation for interfaces (auto-generated forwarding methods) and properties (lazy, observable, vetoable, map-backed, and custom getValue/setValue delegates). Connects the pattern to everyday Android usage like viewModels(), navArgs(), and mutableStateOf via remember.
▸ INTERFACE DELEGATION
class UserPrinter(
private val printer: Printer
) : Printer by printer
kotlinkotlin-stdlibcomposeviewmodel
Tech Dynasty
27 Jul
An introductory tour of Kotlin data classes explaining the auto-generated equals(), hashCode(), toString(), copy(), and componentN() functions, with Android examples spanning Retrofit response models, Room entities, and Compose/MVI UI state updated via copy().
▸ COPY UI STATE
data class LoginUiState(
val isLoading: Boolean,
val error: String?,
val userName: String
)
state = state.copy(isLoading = true)
kotlinroomcomposeretrofit
Tech Dynasty
28 Jul
Beginner walkthrough of Kotlin sealed classes and sealed interfaces, showing how to model restricted state hierarchies (Loading/Success/Error) for exhaustive when-expressions instead of enums or raw strings. Covers real Android patterns for ViewModel UI state, API results, navigation destinations, and Compose rendering in MVVM/MVI style.
▸ EXHAUSTIVE WHEN STATE
sealed class LoginState {
object Loading : LoginState()
object Success : LoginState()
data class Error(val message: String) : LoginState()
}
fun handleState(state: LoginState) = when (state) {
is LoginState.Loading -> println("Loading...")
is LoginState.Success -> println("Login Successful")
is LoginState.Error -> println(state.message)
}
sealed-classeskotlinmvvmcompose
Muhamad Syafii
30 Jul
Walks through headline Kotlin 2.4.0 changes: experimental collection literals using bracket syntax, context parameters graduating to stable with explicit-argument disambiguation, new isSorted()-family stdlib checks, and kotlin.uuid.Uuid reaching stable for cross-platform IDs. Framed as comedic dialogue but covers real compiler flags and APIs.
▸ COLLECTION LITERALS
val shapes: MutableList<String> = ["triangle", "square", "circle"]
println(shapes) // [triangle, square, circle]
kotlincontext-receiverskotlin-stdlibkmp
Kotlin Blog
Anastasia Birillo
28 Jul
JetBrains open-sourced KotlinLLM, an IntelliJ plugin letting Kotlin/JVM code call asLlm/mockLlm 'Smart macros' whose generated bodies persist as ordinary, reviewable Kotlin source rather than hitting an LLM every call. Evaluated on Spring Petclinic and a GitHub issue-triage prototype (~89% recall), it aims to make runtime LLM delegation explicit and testable.
▸ SMART MACRO CALL
val issuesApiUrl: String = asLlm(repoInput, hint = "GitHub API URL: get all issues, including closed")
val issues: List<Issue> = asLlm(response, hint = "Return all beginner-friendly issues for this repository")
kotlinjetbrains
Aakash Gavle
1 Aug
Walks through how suspend functions compile into continuation-passing state machines, using decompiled bytecode to show why coroutines are cheaper than OS threads. Covers CoroutineScope, Job vs SupervisorJob, launch vs async/await exception timing, and the four standard Dispatchers.
▸ SUPERVISORJOB SCOPE
val scope = CoroutineScope(SupervisorJob() + Dispatchers.Main)
coroutineskotlinandroid-developers
Dilipchandar
29 Jul
Explains why Kotlin uses Any instead of java.lang.Object as its root type: platform-agnostic design for JVM/JS/Native, dropping JVM-only methods like wait()/notify(), a non-nullable default (Any? for nullable), and compiler mapping of Any to Object in JVM bytecode for zero-overhead Java interop.
kotlinkotlin-stdlibkmp
Rafiul islam
28 Jul
Independent Kotlin/Python project pairing an Android app with a Windows tray tool that converts Banglish (Bengali written in Roman script) to Bengali or English via Groq's free llama-3.3-70b-versatile API. The Android client is plain Kotlin calling the REST endpoint directly through OkHttp.
kotlinandroid-developersokhttp
Marcin Moskala
28 Jul
A Kotlin Academy newsletter issue explaining why GlobalScope causes memory leaks and poor testability compared to structured scopes like viewModelScope, covering ConcurrentHashMap and its unsynchronized extension functions like getOrPut, and clarifying that Compose modifiers act as ordered decorators, not parameters.
coroutinescomposekotlin-stdlib
Tech Dynasty
31 Jul
Walks through Kotlin's four visibility modifiers—public, private, protected, and internal—using a bank-account example, then maps each onto real Android patterns like repositories, singletons, and private constructors paired with companion-object factories.
▸ PRIVATE CONSTRUCTOR FACTORY
class User private constructor() {
companion object {
fun create() = User()
}
}
kotlinclean-architecture
Joseph Sanjaya
28 Jul
A walkthrough of building an MCP server in Kotlin using the stdio transport, warning that any stray println or logging framework output corrupts JSON-RPC framing; the fix captures System.out before Logback initializes and redirects normal output to stderr.
▸ CAPTURE STDOUT FIRST
val mcpOutput = System.out
System.setOut(System.err)
val transport = StdioServerTransport(
input = System.`in`.asSource().buffered(),
output = mcpOutput.asSink().buffered()
)
kotlincoroutineskotlin-backend
Sixtin - Android Developer
29 Jul
🔒 Member-only
▸ CONTEXT PARAMETER DI
context(session: UserSession, logger: Logger)
fun fetchProfile(userId: String): Profile {
logger.debug("Fetching profile for $userId")
return session.api.getProfile(userId)
}
context-receiverskotlin
Mahmoud Ramadan
28 Jul
A guide to Kotlin's coroutine builders (launch, async, runBlocking, withContext, coroutineScope, supervisorScope), covering their return types, start modes (including CoroutineStart.LAZY), and the key difference that launch throws exceptions eagerly while async defers them until await().
▸ ASYNC EXCEPTION TIMING
val deferred = scope.async {
throw IllegalStateException("boom")
}
// nothing thrown yet...
deferred.await() // exception surfaces here
coroutineskotlin
AB nay
29 Jul
🔒 Member-only
▸ VAL VS VAR
val items = mutableListOf(1, 2)
items.add(3)
println(items) // [1, 2, 3]
// items = mutableListOf() -> won't compile
val frozen: List<Int> = listOf(1, 2) // no add() on the interface
kotlinkotlin-stdlib
Tech Dynasty
29 Jul
Beginner guide to Kotlin enum classes covering constructor properties, per-constant method overrides, built-in name/ordinal, the entries iteration API, and valueOf() string parsing. Closes with guidance on choosing enums for fixed constant sets versus sealed classes when states carry different data.
▸ ENUM PER-CONSTANT OVERRIDE
enum class Operation {
ADD { override fun apply(a: Int, b: Int) = a + b },
SUBTRACT { override fun apply(a: Int, b: Int) = a - b };
abstract fun apply(a: Int, b: Int): Int
}
println(Operation.ADD.apply(10, 5)) // 15
kotlinsealed-classes
CodeWall Edu
27 Jul
A short beginner explainer, written in Burmese, on Kotlin's null safety system: nullable type syntax with the question-mark suffix, the compile-time distinction between String and String?, and using the safe call operator to access members of nullable variables.
▸ SAFE CALL OPERATOR
var name: String? = "CodeWall Technologies"
name = null
var number: Int? = null
println(name?.length)
kotlin
Harshit Sinha
28 Jul
Walks through Kotlin's inline, noinline, and crossinline modifiers with bytecode-level before/after comparisons, showing how inlining avoids lambda allocations, enables non-local returns, and pairs with reified type parameters to bypass JVM type erasure.
▸ REIFIED TYPE CHECK
inline fun <reified T> isType(value: Any): Boolean {
return value is T
}
fun main() {
println(isType<String>("hello"))
println(isType<Int>("hello"))
}
kotlin
TheAbbie
31 Jul
An open-source Kotlin live wallpaper that renders a real-time double-pendulum chaos simulation using Hamiltonian dynamics and Runge-Kutta integration instead of looping video effects. Free on Play Store with source on GitHub, no network access or tracking.
kotlin
Tech Dynasty
30 Jul
Explains why Kotlin has no static keyword and how object declarations, companion objects, and the singleton pattern replace it, with Android examples such as a shared Retrofit client, a session manager, factory methods, and companion objects implementing interfaces.
▸ FACTORY COMPANION OBJECT
class User private constructor(val name: String) {
companion object : Factory<User> {
override fun create() = User("Guest")
}
}
val guest = User.create()
kotlin
Abinash Dash
27 Jul
🔒 Member-only
coroutinesandroid-developers
Fachrizal Mursalin
31 Jul
Part 4 of a Kotlin Coroutines series introduces Flow as a cold asynchronous stream, contrasting a suspend function's single return with continuous emission via emit, collect, and operators like filter and map. Also distinguishes hot flows: SharedFlow and StateFlow.
▸ COLD FLOW BUILDER
fun ordersFlow(): Flow<Order> = flow {
while (true) {
val order = takeNextOrder()
emit(order)
delay(1000)
}
}
coroutinesflows
Android Developers Blog
Android Developers
27 Jul
Starting with AGP 9.2.0, R8 rewrites kotlinx.atomicfu's Atomic*FieldUpdater calls into Unsafe-based operations, cutting the reflection overhead that made compareAndSet ~2.7x slower than java.util.concurrent.atomic, yielding up to 2x faster coroutine launch and cancellation on Android.
▸ ATOMICFU BENCHMARK
val atomicReference = java.util.concurrent.atomic.AtomicReference(false)
val atomicRef = kotlinx.atomicfu.atomic<Boolean>(false)
atomicReference.compareAndSet(true, false) // 50.7 ns
atomicRef.compareAndSet(true, false) // 135 ns pre-fix
coroutinesr8-proguardandroid-api
Sunil Kumar
28 Jul
Contrasts coroutineScope, where one child's failure cancels all its siblings, with supervisorScope, where failures stay isolated, using batch-upload versus dashboard-widget examples. Notes both only enforce structured concurrency locally and won't fix leaks if launched from GlobalScope or an unbound scope.
▸ SUPERVISOR SCOPE ISOLATION
suspend fun loadDashboard() = supervisorScope {
launch { loadWeatherWidget() }
launch { loadNewsWidget() } // throws
launch { loadStockWidget() }
}
// weather and stock widgets still complete
coroutines
Harshit Sinha
29 Jul
Explains that Kotlin coroutines are cooperative rather than preemptive: without a suspension point like yield() or delay(), a busy loop can monopolize a dispatcher's worker thread and starve other coroutines. Highlights why explicit suspension is required to avoid CPU starvation and stalled cancellation.
▸ EXPLICIT YIELD POINT
launch {
while (true) {
doSomeWork()
yield()
}
}
coroutines
Nemat
1 Aug
Explains Kotlin's CoroutineContext: how Job, Dispatcher, CoroutineName, and CoroutineExceptionHandler combine via the + operator, how child coroutines inherit and override parent context, and how withContext temporarily swaps dispatchers. A practical reference for reasoning about coroutine execution and cancellation.
▸ COMBINE COROUTINE CONTEXT
launch(
Dispatchers.IO +
CoroutineName("API") +
handler
) {
// work
}
coroutines
Kamaldeep Kakkar
1 Aug
🔒 Member-only
▸ SUBLIST WINDOW VIEW
val actions = listOf("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L")
val row = actions.subList(8, 12)
kotlin-stdlib