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</>↗
Kotlin25 Jun 2026

How do I use lazy evaluation and avoid unnecessary computation in Kotlin?

In Kotlin, you can use lazy evaluation mainly with: lazy { … } for lazily initialized properties Sequence for lazy collection-style pipelines Short-circuiting operators/functions like &&, ||, any, first, take Lambdas to defer expensive work until needed 1. Lazy property initialization with lazy Use lazy when a value is expensive to create and may not […]

Wayan · 4 min read
KOTLIN / NOTES</>↗
Kotlin25 Jun 2026

How do I build custom collection transformations using higher-order functions in Kotlin?

In Kotlin, custom collection transformations are often built with higher-order functions: functions that take other functions as parameters (lambdas) or return functions. Kotlin’s standard library already has transformations like map, filter, flatMap, groupBy, and fold, but you can build your own reusable transformations when your logic becomes domain-specific. 1. Basic higher-order transformation A simple custom […]

Wayan · 6 min read
KOTLIN / NOTES</>↗
Kotlin25 Jun 2026

How do I use sequences to optimize performance with large Kotlin collections?

In Kotlin, sequences let you process large collections lazily, which can reduce temporary allocations and improve performance for chained operations. The problem with regular collections Collection operations like map, filter, and flatMap are usually eager: val result = users .filter { it.isActive } .map { it.email } .take(10) With a List, Kotlin typically creates intermediate […]

Wayan · 2 min read
KOTLIN / NOTES</>↗
Kotlin24 Jun 2026

How do I use immutability and copy-on-write with Kotlin collections?

In Kotlin, read-only collection interfaces plus copy-on-write updates are a common way to model immutable-style data. Kotlin has two main collection interface families: Mutable Read-only MutableList<T> List<T> MutableSet<T> Set<T> MutableMap<K, V> Map<K, V> Read-only interfaces prevent mutation through that reference, while copy-on-write means you create a new collection when you need a changed version. Use […]

Wayan · 4 min read
KOTLIN / NOTES</>↗
Kotlin24 Jun 2026

How do I use destructuring with maps and pairs in Kotlin?

In Kotlin, destructuring lets you unpack values from an object into separate variables. It is commonly used with: Pair Map.Entry loops over maps lambda parameters Destructuring a Pair A Pair<A, B> contains two values: first and second. val pair = "Alice" to 25 val (name, age) = pair println(name) // Alice println(age) // 25 This […]

Wayan · 3 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.