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,…