AAndroid Expert·2d agoOne Pipe, Three Faucets: How Flow Operator Fusion Collapses buffer(), conflate() and flowOn() Into…How Kotlin Flow operator fusion merges buffer, conflate and flowOn, and the silent bugs it causes in real Android apps11 min read·android-expert.hashnode.dev
AAndroid Expert·2d agoThe Scope Is Cancelled, the Work Isn’t: Four Quiet Escapes from viewModelScopeNonCancellable, callbackFlow, GlobalScope, and stateIn(Eagerly) all outlive onCleared(). Four TestScope tests prove it, then fix it.17 min read·android-expert.hashnode.dev
AAndroid Expert·2d agoThe Catch That Never Fires: Three Ways Exceptions Slip Past try/catch in Kotlin CoroutinesDecompile a suspend function, then see where exceptions escape: child coroutines, async, and swallowed CancellationException.11 min read·android-expert.hashnode.dev
AAndroid Expert·Nov 2Why Your Flow Refuses to Hop Threads: Context Preservation, flowOn, and channelFlow in KotlinWhy withContext breaks flow { } in Kotlin. Learn context preservation, when to use flowOn or channelFlow, and the Android failures that crash apps.11 min read·android-expert.hashnode.dev1
AAndroid Expert·Nov 2Dropped on the Floor: Conflation in Kotlin Flows and the UI Events You Never SawLearn how Kotlin Flow conflation drops events in StateFlow, SharedFlow, and collectLatest, and fix it with Channels, buffers, and tested patterns.11 min read·android-expert.hashnode.dev
MManuel Alejandro Hermoso·Oct 13An AI agent that asks before it pays: human approval for tool calls in KotlinBuild a Kotlin AI agent that pauses before a tool call and waits for a person to approve it. The pause survives a restart, and the tests need no model9 min read·deeptelar.hashnode.dev
GGanesh Rama Hegde·Feb 23Chapter 1 : UseCase01 - Coroutine Builders and Execution Semantics Mental Model: What Is a Coroutine? A coroutine is a suspendable computation, represented as a state machine, executed under a Job, scheduled by a dispatcher and resumed via a continuation. It is not a13 min read·kotlindeepdive.hashnode.dev
GGanesh Rama Hegde·Feb 21Chapter 30 : UseCase27 - Flow Cancellation & Cooperative Cancellation Flow cancellation is not an optional feature. It is a core part of how coroutines are designed to behave. When a collector stops collecting, the entire upstream flow is cancelled automatically. This i6 min read·kotlinflow.hashnode.dev
GGanesh Rama Hegde·Feb 20Chapter 27 : UseCase24 - StateFlow (State Holder Semantics)What is StateFlow? StateFlow is a special type of SharedFlow that: Always holds a current value Requires an initial value Replays the latest value to new collectors Conflates updates automatically3 min read·kotlinflow.hashnode.dev
GGanesh Rama Hegde·Feb 20Chapter 28 : UseCase25 - Hot vs Cold Flow comparisonIn this use case we will do an architectural level comparison of hot versus cold flow. CODE IMPLEMENTATION package org.kotlinflowlearner.stockflow.usecases.uc25 import kotlinx.coroutines.flow.* impor4 min read·kotlinflow.hashnode.dev