SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

KOTLIN / NOTES</>↗
Kotlin03 Jul 2026

How do I run coroutines in parallel using async and await in Kotlin?

In Kotlin, use async to start concurrent work inside a coroutine scope, then call await() to get each result. Basic example: import kotlinx.coroutines.* suspend fun fetchUser(): String { delay(1000) return "User" } suspend fun fetchPosts(): List<String> { delay(1000) return listOf("Post 1", "Post 2") } fun main() = runBlocking { val userDeferred = async { fetchUser() […]

Wayan · 2 min read
KOTLIN / NOTES</>↗
Kotlin03 Jul 2026

How do I write a suspend function in Kotlin?

In Kotlin, a suspend function is declared with the suspend modifier. suspend fun fetchUser(): User { // Can call other suspend functions here return api.getUser() } A suspend function can pause without blocking the thread and later resume. It is commonly used with coroutines for asynchronous work. Example: import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking suspend fun greetAfterDelay() […]

Wayan · 1 min read
KOTLIN / NOTES</>↗
Kotlin03 Jul 2026

How do I use delay instead of Thread.sleep in Kotlin coroutines?

Use kotlinx.coroutines.delay(…) inside a coroutine instead of Thread.sleep(…). Thread.sleep blocks the current thread. delay suspends the coroutine without blocking the thread, so other coroutines can keep running. import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking fun main() = runBlocking { println("Before delay") delay(1_000) // suspends for 1 second, does not block the thread println("After delay") } If you currently […]

Wayan · 1 min read
KOTLIN / NOTES</>↗
Kotlin03 Jul 2026

How do I launch a coroutine in Kotlin using launch and runBlocking?

In Kotlin, you can use runBlocking to start a coroutine scope that blocks the current thread until its coroutines finish, and launch to start a new coroutine inside that scope. import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking fun main() = runBlocking { launch { println("Coroutine is running") } println("Main coroutine continues") } Output may look like: Main coroutine […]

Wayan · 1 min read
SPRING / NOTES</>↗
Spring02 Jul 2026

How do I use external configuration with Spring?

External configuration means keeping settings such as application names, URLs, ports, feature flags, credentials, or environment-specific values outside your Java code. Spring supports this mainly through: application.properties application.yml environment variables command-line arguments external property files @Value @ConfigurationProperties 1. Using application.properties In a Spring or Spring Boot application, you can place configuration in: src/main/resources/application...

Wayan · 5 min read
SPRING / NOTES</>↗
Spring02 Jul 2026

How do I manage bean scope in Spring?

In Spring, bean scope controls how many instances of a bean Spring creates and how long those instances live. By default, Spring beans are singleton scoped, meaning Spring creates one shared instance per ApplicationContext. Common Spring Bean Scopes Scope Meaning singleton One shared instance per Spring container prototype A new instance every time the bean […]

Wayan · 6 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.