remember vs rememberSaveable vs ViewModel: which state survives what
Dev.to Kotlin作者:Charles Hartmann發布:10-14 14:02
remember vs rememberSaveable vs ViewModel: what each state survives
The article explains two common Compose bugs: the UI not updating, and state resetting, by separating observability from lifetime.
重點摘要
Use an observable State holder so Compose can recompose when values change.
remember survives recomposition, but not rotation, dark mode, or process death.
rememberSaveable, ViewModel, Room, and DataStore each cover different persistence lifetimes.
展開詳細摘要
This article explains why Jetpack Compose state problems usually reduce to two questions: whether Compose can observe the change, and how long the value must live. It shows that you need both an observable State holder and remember to avoid reset-on-recomposition bugs, then compares remember, rememberSaveable, ViewModel, Room, and DataStore by what they survive. rememberSaveable handles configuration changes and process death for Bundle-compatible values, while ViewModel survives configuration changes but not process death. Anything that must remain after the app is closed belongs in Room or DataStore. The article also warns against mutating lists in place, and recommends treating UI state as values.
My AI Agent Said “Done” 220 Times. A Shell Script Said No to 95 of Them.
Medium Kotlin作者:Raphael Pantaleão發布:10-14 11:18
My AI Agent Said “Done” 220 Times. A Shell Script Said No to 95 of Them.
Harness engineering on a Kotlin microservices monorepo: three gates, a hook that refuses to let the agent finish, and ten days of real work.
重點摘要
A Kotlin microservices monorepo was used as the testbed.
The setup included three gates and a hook that blocked premature completion.
Over ten days, the shell script rejected 95 of 220 “done” claims.
展開詳細摘要
This article describes harness engineering for a Kotlin microservices monorepo, built around three gates and a hook designed to stop an AI agent from declaring success too early. The setup was used over ten days of real work, with a shell script acting as a guardrail against premature “done” messages. According to the article’s premise, the script rejected 95 out of 220 completion claims, showing how automation can enforce stricter completion criteria during agent-assisted development.
Meu agente de IA disse “pronto” 220 vezes. Um script shell disse não a 95 delas.
Medium Kotlin作者:Raphael Pantaleão發布:10-14 11:20
My AI agent said “done” 220 times. A shell script said no to 95 of them.
Harness engineering in a Kotlin microservices monorepo: three gates, a hook that refuses to let the agent finish, and ten days of work.
重點摘要
Three gates were used to control the agent’s output.
A shell hook blocked the agent from finishing prematurely.
The setup was built in a Kotlin microservices monorepo over ten days.
展開詳細摘要
The article describes harness engineering in a Kotlin microservices monorepo, where the author added three gates and a shell hook designed to stop an AI agent from finishing too early. The setup reportedly rejected many of the agent’s attempts to declare success, with the hook saying no 95 times. The piece focuses on the workflow and controls around the agent, rather than on new Kotlin features or performance claims, and frames the effort as about managing behavior over ten days of work.
I Planted 3,380 Bugs in My Own Codebase. The Tests Missed 273.
Medium Kotlin作者:Raphael Pantaleão發布:10-14 11:24
I Planted 3,380 Bugs in My Own Codebase. The Tests Missed 273.
Mutation testing as the merge criterion: why this repository bans coverage, how the gate reads every changed line, and what the survivors reveal.
重點摘要
Uses mutation testing as the merge gate
Bans coverage as the primary quality signal
Examines missed mutants and changed lines
展開詳細摘要
The article argues for using mutation testing as the merge criterion instead of relying on code coverage. It describes a repository policy that bans coverage as the main signal, then explains how the gate inspects every changed line and evaluates surviving mutants to assess test strength. The piece centers on what the remaining failures reveal about gaps in the test suite and why mutation testing can expose weaknesses that coverage alone may miss.
Daily Kotlin: Inheritance, Abstract Classes, and Interfaces
Medium Kotlin作者:Jason Kwon發布:10-14 11:40
Daily Kotlin: Inheritance, Abstract Classes, and Interfaces
Mastering open classes, polymorphic contracts, and default interface implementations across Kotlin Multiplatform.
重點摘要
Covers inheritance, abstract classes, and interfaces in Kotlin.
Focuses on open classes and polymorphic contracts.
Mentions default interface implementations across Kotlin Multiplatform.
展開詳細摘要
This article introduces key object-oriented building blocks in Kotlin: inheritance, abstract classes, and interfaces. It highlights open classes as the basis for extensibility, explains polymorphic contracts, and notes how default interface implementations work across Kotlin Multiplatform. The piece appears to be an overview of these language features rather than a deep dive, aiming to help readers understand how Kotlin models shared behavior and reuse.
Daily Kotlin:继承、抽象类与接口
掌握 open class、多态契约,以及 Kotlin Multiplatform 中的接口默认实现。
重點摘要
介绍 Kotlin 的继承、抽象类与接口。
聚焦 open class 和多态契约。
提到 Kotlin Multiplatform 的接口默认实现。
展開詳細摘要
本文介绍 Kotlin 中几个核心的面向对象概念:继承、抽象类与接口。内容强调 open class 作为可扩展性的基础,说明多态契约的概念,并提到 Kotlin Multiplatform 中的接口默认实现。整体来看,这是一篇用于认识这些语言特性的概览,而不是深入实现细节的文章。
Daily Kotlin:繼承、抽象類別與介面
掌握 open class、多型契約,以及 Kotlin Multiplatform 中的介面預設實作。
重點摘要
介紹 Kotlin 的繼承、抽象類別與介面。
聚焦於 open class 與多型契約。
提到 Kotlin Multiplatform 的介面預設實作。
展開詳細摘要
本文介紹 Kotlin 中幾個核心的物件導向概念:繼承、抽象類別與介面。內容強調 open class 作為可延伸性的基礎,說明多型契約的概念,並提及 Kotlin Multiplatform 中的介面預設實作。整體看來,這是一篇用來認識這些語言特性的概覽,而非深入實作細節的文章。
My own audit said to cut one analytics field from two apps. It has shipped in 14 releases since
Medium Kotlin作者:Muhammad Azhar發布:10-14 12:43
My audit said to remove one analytics field from two apps. It has shipped in 14 releases since
Secure Folder and Mock Location still send part of the raw Play install referrer to GA4, and the audit got two other things wrong.
重點摘要
Secure Folder and Mock Location still send part of the raw Play install referrer to GA4.
The audit identified one analytics field to cut from two apps.
Two other findings in the audit were also incorrect.
展開詳細摘要
The article says that Secure Folder and Mock Location still send part of the raw Play install referrer to GA4, which means the earlier audit was not entirely correct. It also notes that the audit recommended removing one analytics field from two apps, but that recommendation has already shipped in 14 releases since then. In addition, the author says the audit got two other things wrong, though the excerpt does not provide further detail.
Using the system palette in Compose, Android Views, and XML, with an explicit fallback for older devices.
重點摘要
Applies Android dynamic colors to a custom design system
Works across Compose, Android Views, and XML
Includes an explicit fallback for older devices
展開詳細摘要
This article explains how to adopt Android system dynamic colors while keeping your own design system intact. It covers usage in Compose, Android Views, and XML, and emphasizes that older devices need an explicit fallback. The piece focuses on integrating the system palette into app-specific theming rather than replacing the design system, helping developers apply dynamic colors consistently across different UI stacks while preserving compatibility.
为你自己的设计系统引入 Android 动态颜色
在 Compose、Android Views 和 XML 中使用系统调色板,并为较旧设备提供明确的 fallback。
Kotlin 2.4: 10 Features You Should Start Using Today
Medium Kotlin作者:AndroidLab by Andre發布:10-14 13:30
Kotlin 2.4: 10 Features You Should Start Using Today
Stable context parameters, cleaner ViewModels, and a few experiments worth trying before everyone else does.
重點摘要
Stable context parameters
Cleaner ViewModels
A few experimental features worth trying
展開詳細摘要
This article highlights Kotlin 2.4 features that developers can begin using now, with a focus on stable context parameters, cleaner ViewModels, and several experimental capabilities that may be worth exploring early. The piece frames these updates as practical additions for Kotlin engineers who want to stay current with the language ecosystem, while keeping in mind which items are stable and which remain experimental.
Skip the keynote recap. Here’s what the jump from API 36 to API 37 means for your codebase.
重點摘要
Focuses on the practical impact of moving from API 36 to API 37
Skips the keynote recap and centers on codebase changes
Frames the discussion around what actually changed
展開詳細摘要
This article says to skip the keynote recap and concentrate on the practical implications of moving from API 36 to API 37. Rather than retelling the announcement, it points readers toward the changes that matter for a codebase. The piece positions the comparison as a developer-focused look at what the version jump means in practice, without claiming support details or features beyond that framing.
Android 16 与 Android 17:到底改了什么
先跳过 keynote 回顾。API 36 升到 API 37 对你的 codebase 意味着什么,才是重点。
重點摘要
聚焦 API 36 到 API 37 的实际影响
不重复 keynote 内容,直接看 codebase 变化
核心是梳理“到底改了什么”
展開詳細摘要
这篇文章先说明可以跳过 keynote 回顾,直接关注从 API 36 升到 API 37 对 codebase 的实际影响。它不是重述发布会内容,而是把重点放在开发者真正需要关心的变化上。整体视角偏工程实践,旨在说明版本跃迁在代码层面意味着什么,但没有额外声称具体新特性或支持状态。
Android 16 與 Android 17:實際改了什麼
先跳過 keynote 回顧。這次從 API 36 升到 API 37,對你的 codebase 代表什麼才是重點。
重點摘要
聚焦 API 36 到 API 37 的實際影響
不重述 keynote,而是看 codebase 變化
主題是「實際改了什麼」
展開詳細摘要
本文先表示可略過 keynote 回顧,直接看 API 36 升到 API 37 對 codebase 的實際影響。內容重點不是重複發表會資訊,而是把焦點放在開發者真正需要關心的變更上。整體來說,文章以工程實務角度切入,說明版本跳升在程式碼層面代表什麼,但沒有額外宣稱具體新功能或支援狀態。
AppArmorX: Android Security Through a Single Gradle Plugin
Medium Kotlin作者:Shushant Tiwari發布:10-14 13:53
AppArmorX: Android Security Through a Single Gradle Plugin
Building a Gradle-delivered Android security engine, testing it against real attacks, and documenting the limits alongside the results.
重點摘要
AppArmorX is delivered as a single Gradle plugin for Android security.
The project is tested against real attacks to evaluate its behavior.
The article also documents the limits of the approach.
展開詳細摘要
This article introduces AppArmorX, an Android security engine delivered through a single Gradle plugin. It focuses on building the plugin, evaluating it against real attacks, and presenting the results together with its limitations. Rather than claiming universal protection, the post emphasizes what the approach can and cannot do, making the scope of the proposal clear for Android developers.
Dependency Inversion Principle (DIP) in Android — Depend on Abstractions, Not Concrete Classes
Medium Kotlin作者:Mahesh Jadhav發布:10-14 14:40
Dependency Inversion Principle (DIP) in Android: Depend on Abstractions, Not Concrete Classes
Your class should depend on what something can do, not on one specific implementation of how it does it.
重點摘要
Depend on abstractions rather than concrete implementations.
Make classes rely on capabilities, not specific details.
The article only presents this core DIP idea.
展開詳細摘要
This short article introduces the Dependency Inversion Principle (DIP) for Android development. Its main message is that a class should depend on what something can do, rather than on one specific implementation of how it works. The excerpt does not go into examples or implementation details; it simply states the principle and points readers to continue on Medium.
Android 中的依赖反转原则(DIP):依赖抽象,而非具体类
你的类应该依赖某个东西能做什么,而不是依赖它如何做的某一种具体实现。
重點摘要
依赖抽象,不要依赖具体实现。
类应聚焦能力,而非具体细节。
本文摘录只传达 DIP 的核心观点。
展開詳細摘要
这篇文章简要介绍了 Android 中的依赖反转原则(DIP)。核心含义是:类应该依赖某个东西能做什么,而不是依赖它如何做的某一种具体实现。正文摘录没有给出示例或实现细节,只陈述了这一原则,并提示读者继续前往 Medium 阅读。
Android 中的依賴反轉原則(DIP):依賴抽象,而非具體類別
你的類別應該依賴某個東西能做什麼,而不是依賴它如何做的某個特定實作。
重點摘要
依賴抽象,不要依賴具體實作。
類別應聚焦於能力,而非細節。
本文摘錄僅傳達 DIP 的核心觀念。
展開詳細摘要
這篇文章簡要介紹 Android 中的依賴反轉原則(DIP)。核心意思是:類別應該依賴某個事物能做什麼,而不是依賴它如何做的單一具體實作。內文摘錄沒有提供範例或實作細節,只提出這項原則,並引導讀者到 Medium 繼續閱讀。
KotlinConf Recap: Lessons from Verifone’s Architect on Kotlin in Mission-Critical Payments
Kotlin Blog作者:Alina Dolgikh發布:10-14 11:03
KotlinConf Recap: Lessons from Verifone’s Architect on Kotlin in Mission-Critical Payments
Write code in the literal words of the specification and let the compiler enforce them.
重點摘要
Model payment domain nouns with value classes to prevent mix-ups.
Use exhaustive sealed types, null-safety, and named state transitions to block invalid flows.
Apply structured concurrency, domain timeouts, and readable Kotlin DSL tests to match the spec.
展開詳細摘要
Yuri Geronimus argues that payment systems should be written in the exact words of the specification and left to the compiler to enforce. In his KotlinConf 2026 talk, he showed how Verifone uses value classes, sealed results, null-safety, immutable state models, exhaustive when expressions, and structured concurrency to prevent whole classes of payment bugs before production. He also covered modeling timeouts as domain outcomes, masking sensitive data by default, and turning certification tests into Kotlin DSL that regulators can read. For legacy systems, he advised incremental migration rather than rewrites: optimize the existing codebase, move to acceptance-test-driven development, add fitness functions, and migrate step by step with Java interop.
The Lookup That Lies: Why Your Agent’s Retry Logic Has a Hidden Race Condition
Dev.to Kotlin作者:StareBrain發布:10-14 04:00
The Lookup That Lies: Why Your Agent’s Retry Logic Has a Hidden Race Condition
A lookup inside the provider’s replication window can return “not found” even when the action succeeded.
重點摘要
Immediate lookups can confuse replication lag with real failure.
Add a minimum-age gate before reconciliation runs.
Use a named consistency window and check delivery state at dispatch time.
展開詳細摘要
This article explains how a retry system can create duplicates when it treats an immediate “not found” lookup as proof that an action failed. In eventually consistent providers, a successful write may not be visible on the read replica for seconds, so reconciliation must wait for a documented consistency window. The proposed fix is to gate PENDING records until they are eligible for reconciliation, then treat “not found” as failure only outside that window. It also covers late confirmations: if a record was already marked FAILED, a later provider confirmation must cancel any queued replacement before updating state. The broader point is that verification needs two clocks in mind: the UI or dispatch event, and the provider’s propagation time.
Why HTTPS Won’t Save Your Checkout Flow: Building Zero-Trust State Machines in Kotlin Multiplatform
Dev.to Kotlin作者:numq發布:10-14 06:26
Why HTTPS Won’t Save Your Checkout Flow: Building Zero-Trust State Machines in Kotlin Multiplatform
HTTPS only encrypts the pipe. JWTs only verify who is holding the token.
重點摘要
TrustChain models app navigation as a hash-linked state machine.
It blocks step-skipping, tampered deltas, and replay attacks with cryptographic checks.
A strictMode flag keeps previews flexible while preserving the same reducer API.
展開詳細摘要
The article argues that HTTPS and JWTs do not guarantee a client followed the correct sequence of UI or workflow steps. To address step-skipping, state tampering, and replay attacks, the author introduces TrustChain, a pure functional, cryptographically verifiable state machine ledger for Kotlin Multiplatform. Each block carries a hash and previousHash, while partial updates arrive as signed DeltaBlock mutations. If a step is skipped or a delta is forged, the chain fails immediately with a typed error. The design emphasizes zero runtime dependencies, immutable reduction, and a strictMode switch that relaxes checks for previews and prototyping without changing the API.
Kempo: Real-Time Audio Time-Stretching, Pitch-Shifting, and Formant Control in Pure Kotlin Multiplatform
Dev.to Kotlin作者:numq發布:10-14 07:00
Kempo: Real-Time Audio Time-Stretching, Pitch-Shifting, and Formant Control in Pure Kotlin Multiplatform
Zero-allocation streaming, phase-locked clarity, and multichannel spatial coherence across JVM, Android, iOS, and WebAssembly.
重點摘要
Independent control of time, pitch, and formants
Zero-allocation real-time streaming for audio callbacks
Multichannel coherence with offline exact rendering
展開詳細摘要
Kempo is an open-source, pure Kotlin Multiplatform DSP library for real-time audio time-stretching, pitch-shifting, and formant control across JVM, Android, iOS, and WebAssembly. It is designed for studio-grade transparency and zero-allocation streaming, so audio threads can process in place without heap churn. The article explains how Kempo reduces transient smearing with vertical phase-locking, separates pitch from vocal timbre to avoid chipmunk artifacts, and preserves stereo and 5.1 spatial coherence. It also covers offline exact rendering, custom frequency mapping, and practical usage examples for both background processing and live audio callbacks.
Covers Kotlin, Jetpack Compose, and Firebase Authentication
Only tags and a Medium continuation link are provided in the source
展開詳細摘要
This source provides only the article title and tags for a post about implementing Google Sign-In on Android using Kotlin, Jetpack Compose, and Firebase Authentication. No technical walkthrough, code sample, or implementation details are included in the provided text. Based on the available information, the article appears to be an Android-focused tutorial centered on authentication with Google sign-in in a modern Kotlin/Compose stack, but no further claims can be made from the excerpt.
Stop Loading 10,000 Items at Once: Mastering Android Pagination
Medium Kotlin作者:Anand Gaur發布:10-14 03:31
Stop Loading 10,000 Items at Once: Mastering Android Pagination
Open Instagram. Scroll. Keep scrolling. The posts never end.
重點摘要
Focuses on Android pagination.
Uses Instagram’s endless feed as an example.
The provided excerpt contains only a brief teaser, not the full article.
展開詳細摘要
This article introduces Android pagination through the familiar experience of scrolling an endless Instagram feed. From the provided excerpt, the piece appears to frame pagination as a way to avoid loading huge datasets all at once and instead load content progressively as the user scrolls. However, only a short teaser is available here, so the excerpt does not include implementation details, APIs, or deeper technical guidance. The visible text mainly signals the article’s topic and sets up the motivation for mastering pagination in Android.
Learning MVP and Understanding the Next Step in Android Architecture Design Patterns
Medium Kotlin作者:Aayush Puranik發布:10-14 04:31
Learning MVP and Understanding the Next Step in Android Architecture Design Patterns
Understanding how MVP works and implemented in legacy systems.
重點摘要
Explains how MVP works in Android architecture.
Looks at how MVP is implemented in legacy systems.
Covers the benefits and problems associated with MVP.
展開詳細摘要
This article introduces the MVP architectural pattern in Android and explains how it works in legacy systems. It also touches on the main benefits and the problems associated with MVP. As provided in the source text, the piece appears to be an overview rather than a deep technical walkthrough, focused on helping readers understand MVP and the role it has played before newer architecture approaches.
Stop step-skipping, state tampering, and replay attacks in your multi-step KMP workflows.
Medium Kotlin作者:numq發布:10-14 06:20
Stop Step-Skipping, State Tampering, and Replay Attacks in Your Multi-Step KMP Workflows
Protect multi-step flows, fintech funnels, and Server-Driven UI from step-skipping and tampering — with zero runtime dependencies.
重點摘要
Defends multi-step KMP workflows against step-skipping and tampering
Targets fintech funnels and Server-Driven UI use cases
Claims zero runtime dependencies
展開詳細摘要
This article focuses on securing multi-step KMP workflows against step-skipping, state tampering, and replay-style attacks. It frames the problem in contexts such as fintech funnels and Server-Driven UI, where workflow integrity matters and clients should not be able to jump ahead or modify state in unsafe ways. The piece also emphasizes that the approach is designed with zero runtime dependencies.
Kempo: Real-Time Audio Time-Stretching, Pitch-Shifting, and Formant Control in Pure Kotlin…
Medium Kotlin作者:numq發布:10-14 06:56
Kempo: Real-Time Audio Time-Stretching, Pitch-Shifting, and Formant Control in Pure Kotlin
Zero-allocation streaming, phase-locked clarity, and multichannel spatial coherence across JVM, Android, iOS, and WebAssembly.
重點摘要
Real-time audio processing in pure Kotlin
Supports time-stretching, pitch-shifting, and formant control
Targets JVM, Android, iOS, and WebAssembly
展開詳細摘要
Kempo is presented as a pure Kotlin solution for real-time audio time-stretching, pitch-shifting, and formant control. The article emphasizes zero-allocation streaming, phase-locked clarity, and multichannel spatial coherence, and notes that the project runs across JVM, Android, iOS, and WebAssembly. The provided excerpt is brief and only states these capabilities without additional implementation details or performance claims.