Teaches AI agents to write idiomatic Kotlin (data classes, val, scope fns, Kotest) AND to make the right stack choices on JVM: Kotlin 2.3 + JDK 21 + Gradle Kotlin DSL, Ktor for HTTP, kotlinx-coroutines, DJL for ML inference, JavaCV for vision, Koog for AI agent orchestration.
95
95%
Does it follow best practices?
Impact
95%
1.23xAverage score across 10 eval scenarios
Passed
No known issues
org.jetbrains.kotlinx:kotlinx-coroutines-core (current: 1.10.x) for all async / concurrent workThread, ExecutorService, CompletableFuture, RxJava, or callback APIssuspend fun + Flow<T> cover almost everything you'd previously reach for Future or Observable to doDispatchers.IO for I/O-bound work: HTTP calls, file reads, JDBC, gRPC, sleeping for backoffDispatchers.Default for CPU-bound work: encoding, embedding inference (when run in-process), parsing, transformsDispatchers.Main for UI threads only (Android, Compose Desktop, JavaFX with the kotlinx-coroutines-javafx artifact)Default — its thread count is sized for CPU work, you'll starve other CPU tasksCoroutineScope, not GlobalScope — every coroutine must have an owner that cancels it on shutdowncoroutineScope { ... } for parallel children that all need to finish before the parent returnssupervisorScope { ... } when a child failure should NOT cancel siblings (e.g., independent device controllers)Flow<T> for cold streams (camera frames, sensor readings) — emits only when collectedChannel<T> only when you genuinely need fan-out or per-element backpressure semanticsFlow.sample(100.milliseconds) is the idiomatic way to throttle a high-rate producer to a fixed-rate consumerThread { ... }.start() in new Kotlin coderunBlocking { ... } inside library code — only acceptable at main() or test entry pointsGlobalScope.launch { ... } — unowned coroutine that leaks on shutdownDispatchers.Default for HTTP calls (see Dispatcher Choice — the One Rule)CompletableFuture and suspend fun in the same chain when you can pick one