When Kotlin arrived a few years ago one of the selling points was immutability: In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created. https://en.wikipedia.org/wiki/Immutable_object This is very cool! Value objects are such a huge help when it comes to reasoning about code, safety and avoiding weird subtle misbehaviours due to “things…
IntelliJ IDEA / Android Studio Tricks: Surround With
In one of my previous posts I wrote about one of my favorite features of IntelliJ IDEA/AS: Live Templates. “Surround With” is a sort of LT’s cousin. When you want to wrap a piece of code with a specific snippet, you select the code and hit the “Surround With” shortcut. On Mac you can access…
IntelliJ IDEA / Android Studio Tricks: Live Templates
One of my favorite features of IDEA are Live Templates. To give you a bit of context, Live Templates are those things you see appearing when you start typing in IDEA 😂 OK OK, let’s be a bit more precise. If you are writing some Java code and you type foreach and then press TAB,…
My IntelliJ Plugin Collection – Kotlin Fill class
I spend on average 8 hours a day using Intellij and, over the years I created quite a collection of useful plugins. This is the first article of a series where I will present all the plugins I use every day 😄 Kotlin Fill Class One of the Kotlin tools I use every day are…
Go to first unread message on Telegram Web
As for millions of users, Telegram is part of my communication toolkit: family, friends, community and some pet projects are connected through this fascinating chat system. When it comes to desktop experience, Telegram offers a couple of options: native app or web app. I’m not a big fan of native apps: things like Slack sucking…
Install and run an Android app on every connected device
I usually have only one device connected when I develop non-UI related parts of the app, but when it comes to UI, I tend to try out the app on as many devices as possible. There was a time when I actually had physical devices connected all the time (https://ivanmorgillo.com/2016/01/05/first-hardware-project-of-2016-device-holder/), but lately I have been…
Uninstall and Run in one shot in Android Studio
As an Android developer, I live my life one repetitive task after another: Clean, Run Uninstall, Run Restart Clean, Restart Restart with Debugger Click here, click there. Tap on the phone. Open menu. Tap menu. It never ends. Plug-in to the rescue To ease up the pain, we developers tend to create tools and one…
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…