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

How do I implement the singleton pattern idiomatically using Kotlin’s object declaration?

In Kotlin, the idiomatic way to implement the Singleton pattern is to use an object declaration. object AppConfig { val appName = "MyApp" fun printConfig() { println("App name: $appName") } } You use it directly by its name: fun main() { AppConfig.printConfig() println(AppConfig.appName) } Kotlin guarantees that an object declaration: has exactly one instance is […]

Wayan · 1 menit baca
KOTLIN / CATATAN</>
Kotlin21 Jun 2026

How do I mix OOP with functional programming using Kotlin’s design patterns?

You can mix OOP and functional programming in Kotlin by using objects/classes to model state, identity, boundaries, and domain concepts, while using functions/lambdas to model behavior, transformation, policies, and workflows. Kotlin is especially good at this because it supports: Classes, interfaces, inheritance, encapsulation Data classes and sealed classes Lambdas and higher-order functions Immutability with val […]

Wayan · 8 menit baca
KOTLIN / CATATAN</>
Kotlin21 Jun 2026

How do I use delegation by `by` keyword to implement interfaces or properties in Kotlin?

In Kotlin, the by keyword is used for delegation. It lets one object delegate behavior to another object instead of implementing everything manually. There are two common forms: Interface/class delegation Property delegation 1. Interface delegation If a class implements an interface, it can delegate the implementation of that interface to another object using by. Example […]

Wayan · 6 menit baca
KOTLIN / CATATAN</>
Kotlin21 Jun 2026

How do I write custom getters and setters in Kotlin properties?

In Kotlin, properties can have custom getters and setters by defining get() and/or set(value) directly under the property. var propertyName: Type = initialValue get() { return field } set(value) { field = value } field is the backing field automatically generated by Kotlin when needed. Custom getter class Person( val firstName: String, val lastName: String […]

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