Category: Kotlin

  • Diventa un Android Dev

    Dal 1 febbraio 2021, in collaborazione con CGM Consulting, partirà il mio corso di programmazione Android destinato a tutti coloro che si stanno avvicinando al mondo della programmazione mobile: https://bit.ly/corso-android-ivan-morgillo Anche se sei già un dev, c’è sempre la possibilità di aiutare qualche amico o amica interessati ad una carriera come Android Dev 😉 Il…

  • Sealed Classes in Kotlin: How to handle the missing .copy() method (2026 Update)

    Sealed Classes in Kotlin: How to handle the missing .copy() method (2026 Update)

    Sealed classes in Kotlin don’t have a .copy() method like data classes do. Here’s how to update them anyway using Arrow Optics Prisms for clean immutability.

  • How to fix the pain of modifying Kotlin nested data classes

    How to fix the pain of modifying Kotlin nested data classes

    Using Arrow Lenses to simplify deeply nested data class updates in Kotlin, replacing verbose chained .copy() calls.

  • IntelliJ IDEA / Android Studio Tricks: Surround With

    IntelliJ IDEA’s Surround With wraps selected code in try/catch, if/else, or Kotlin-specific snippets — Mac (⌥⌘T) and Windows (Ctrl+Alt+T) shortcuts.

  • IntelliJ IDEA / Android Studio Tricks: Live Templates

    How to use Live Templates in IntelliJ IDEA / Android Studio — the keyboard expansions that turn `foreach` into a full loop and `logd` into Android’s Log.d.

  • My IntelliJ Plugin Collection – Kotlin Fill class

    Kotlin Fill Class is an IntelliJ / Android Studio plugin that auto-fills data class constructor arguments — stop typing the same parameters by hand.

  • Can I loop over a Kotlin Sealed Class?

    As an Android developer, I constantly write API clients: 90% of all mobile apps fetch some JSON, parse it and show it in a list ¯\_(ツ)_/¯ To keep a clear separation between what’s coming from the network and what I want in my domain, I usually have a DTO and a Domain Model. DTO and…

  • Modules, modules everywhere

    I have joined asanarebel.com as Senior Android developer at the beginning of February. Asana Rebel is a health and fitness app with workouts for different body and health goals, but all of them are yoga inspired. When I joined, the plan was to increase the team size and raise the code base overall quality, focusing…

  • Kotlin DSL Gradle files, multiple modules and shared variables

    This doesn’t want to be a real article, but more a crash course about Kotlin DSL for Gradle. The crucial point is the possibility of migrating an existing project to the new Kotlin DSL for Gradle, in an incremental, modularized fashion. Below we have a pretty standard root project build.gradle file: https://gist.github.com/hamen/7fa25a3a7ad8452873051f7782c77db5 The parts that…