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

How do I declare nullable variables using `?` in Kotlin?

In Kotlin, you declare a nullable variable by adding ? after the type. var name: String? = null This means name can hold either a String value or null. Examples: var age: Int? = null age = 25 val email: String? = "user@example.com" val phone: String? = null Without ?, Kotlin does not allow null: […]

Wayan · 1 min read
KOTLIN / NOTES</>↗
Kotlin26 Jun 2026

How do I handle null values safely in Kotlin?

Kotlin handles null safety through its type system: a normal type like String cannot be null, while a nullable type like String? can be null. 1. Use nullable types when a value may be null val name: String = "Alice" // Cannot be null val nickname: String? = null // Can be null If a […]

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

How do I use inline functions and reified types in collection processing?

In Kotlin, inline functions and reified type parameters are especially useful in collection processing when you want to write generic, type-safe utilities that still need access to the actual runtime type. Normally, generic type information is erased at runtime, but reified type parameters in inline functions let you do checks like is T, as T, […]

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

How do I write domain-specific extensions for collections in Kotlin?

Domain-specific collection extensions in Kotlin are usually extension functions or extension properties on Iterable<T>, List<T>, Set<T>, Map<K, V>, or more specific collection types that encode concepts from your domain. They let you write expressive code like: val overdueInvoices = invoices.overdue() val activeUsers = users.active() val totalRevenue = orders.totalRevenue() instead of repeatedly writing filtering, grouping, or […]

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

How do I implement tail-recursive algorithms with collections in Kotlin?

To implement tail-recursive algorithms with collections in Kotlin, structure your function so that: The recursive call is the last operation Any intermediate result is carried in an accumulator The collection is processed by index, iterator-like state, or remaining sublist You mark the function with tailrec Basic pattern tailrec fun process( items: List<Int>, index: Int = […]

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