Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

KOTLIN / CATATAN</>
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 menit baca
KOTLIN / CATATAN</>
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 menit baca
KOTLIN / CATATAN</>
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 menit baca
KOTLIN / CATATAN</>
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 menit baca
KOTLIN / CATATAN</>
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 menit baca
KOTLIN / CATATAN</>
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 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

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

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.