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</>
Kotlin28 Jun 2026

How do I chain multiple scope functions together in Kotlin?

In Kotlin, scope functions can be chained because each one returns either: the receiver object: also, apply the lambda result: let, run, with The key is understanding what each function returns. Common chaining pattern val result = User("Alice") .also { println("Created user: $it") } .apply { name = name.uppercase() } .let { "User name is […]

Wayan · 2 menit baca
KOTLIN / CATATAN</>
Kotlin28 Jun 2026

How do I use run, apply, also, and with for cleaner Kotlin code?

In Kotlin, run, apply, also, and with are scope functions. They help make code cleaner by giving you a temporary scope around an object. The main differences are: Function Object reference Returns Best used for apply this The original object Configuring an object also it The original object Side effects, logging, validation run this Lambda […]

Wayan · 4 menit baca
KOTLIN / CATATAN</>
Kotlin26 Jun 2026

How do I throw an exception when a value is null using ?: throw in Kotlin?

Use Kotlin’s Elvis operator ?: with throw on the right-hand side: val value: String? = getNullableValue() val nonNullValue: String = value ?: throw IllegalArgumentException("value must not be null") Because throw is an expression in Kotlin, it can be used after ?:. Example fun printLength(text: String?) { val nonNullText = text ?: throw IllegalArgumentException("text must not […]

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