
Profile of the Effective Kotlin book by @marcinmoskala
Joined July 2018
- Tweets1.1K
- Following7
- Followers1.8K
- Likes1.1K
Effective Kotlin retweeted
Reflection is a powerful tool that allows us to inspect classes and use their methods. To transform an object into a string, we can use reflection to get all properties and their values.
Effective Kotlin retweeted
Jetpack Compose Preview is an ultimate game-changer for Android development! Clean preview, starting specific components, easy way to provide values for preview, all that makes working with Compose a true pleasure!
Effective Kotlin retweeted
In Compose, parameter providers not only help us preview a component with different values, but also allow switching between those values when we run the preview!
Defining a parameter provider is simple. You need a class that implements PreviewParameterProvider<T>, which should specify the values property with different values. Once defined, you can use it in preview with @PreviewParameter(YouProviderClass::class). The biggest limitation is that you can define only one parameter provider per preview.
Effective Kotlin retweeted
I am especially proud of this final project. I am sure it already offered a lot of value to the author, and it is likely it will offer great value to our community. kmp-resilient by Santiago Mattiauda is a complete solution for setting up resilience patterns in Kotlin Multiplatform (KMM), coroutines-native and with solid tests. It also offers a really nice DSL-based idiomatic API. Congratulations!
Code 👉 github.com/santimattius/kmp-…
#coroutinesmasteryproject Thread 👇
Effective Kotlin retweeted
Do you lack default error handler in viewModelScope? This library by Luka Velimirovic might be what you look for! It offers configurable multiplatform vmScope, as a replacement for viewModelScope. This library was made as a final project on Coroutines Mastery, great congratulations to Luka for creating it ❤
Code 👉 github.com/VelkosX/vmscope
#coroutinesmasteryproject
Effective Kotlin retweeted
Today I am proud to present this Weather application made by Piotr Kanarek as a final project on Coroutines Mastery. It is a nice showcase of how to correctly design an Android application. It implements search with multiple triggers, error handling, uiState pattern, simple yet correct architecture. Kudos for Piotr!
👉 github.com/piotrkanarek-emr/…
#coroutinesmasteryproject
Useful topic? We go much deeper in our cohort course. Coroutines Mastery: coroutinesmastery.com
Effective Kotlin retweeted
Time for another amazing final project from Coroutines Mastery 2025: StrayCat is a beautiful Android application for location simulation and GPS tracking. Perfect for testing location-based features and route simulations. Created by Marko Lainovic from TomTom.
Code 👉 github.com/lainovic/StrayCat…
#coroutinesmasteryproject Thread 👇
Effective Kotlin retweeted
Have you ever wondered how libraries like Arrow Lenses actually work? The answer is quite simple, just follow me.
Effective Kotlin retweeted
1️⃣ The first one relates to memory consumption. In early days of programming, we much more respected our memory, and wherever possible we used as small number types as possible. So we used short or byte if that was enough, and we used unsigned type if we needed no negative numbers. We still do that in some applications, but in the past it was an industry standard, because memory was much more expensive. Getting back to indexes, since we have no way to represent positive numbers without 0, starting from 1 would mean wasting one possible value. For instance, if you use unsigned byte and start indexing from 0, you have 256 possible indices, but if you started from 1 you had only 255, which can make a difference.
Effective Kotlin retweeted
padding, background, border, clip, offset, align…
Most Compose developers know these modifiers individually.
The hard part is understanding how they behave when combined.
That is why I made a Modifier Guessing Game:
you read the chain, predict the UI, and verify whether your mental model is correct.
A fun way to sharpen Compose intuition.
Play here: game.kt.academy/?game=modifi…
Effective Kotlin retweeted
What is the best way to turn suspending function into Flow, or Fliw into a suspending function? Learn about it in this new article by Marcin Moskała.
kt.academy/article/interop-s…
Effective Kotlin retweeted
One of the biggest differences between “I know Flow” and “I use Flow well” is this:
Can you predict the result before running the code?
This Flow game will help you practice that skill.
A short challenge, but a very practical one.
Play here: game.kt.academy/?game=flow&u…
Effective Kotlin retweeted
One of the most important decisions you need to make when defining custom composables is wrather you want to store mutable state locally or hoist it.
When state is local:
👉 Logic can be reused.
👉 Component has simpler API.
When we hoist it:
😨 There are more (or more complex) parameters.
👉 Logic can be more easily customised.
👉 Caller can decide how state is stored and how persistent is it.
👍 We can easily preview all different states.
I would say, that local state is more React-like, but hoisting this state it much more Compose-like. It is a popular approach hoist all state up to view models.
Effective Kotlin retweeted
Being a youngster programmer, I was always told that reflection is slow and should be avoided, but I just couldn't observe this slowness in any real measures. That is why I decided to make some benchmarks to see how reflection really performs and write it all down in this article
Effective Kotlin retweeted
Remember to always preview your Compose components in your application theme. Without it, it will look different because it will use default values such as colors, fonts, sizes, etc. If you have multiple theme variants, it is best to preview each universal component in each of them. I wish we had a simpler way to automatically apply the application theme to all our previews, or, even better, to all defined themes.
Effective Kotlin retweeted
Boost your Kotlin performance with Project Loom's virtual threads!
Say goodbye to Dispatchers.IO and run blocking code like it's non-blocking. Faster, simpler, smarter. ⚡
🔗 Dive in now: kt.academy/article/dispatche…
Effective Kotlin retweeted
Did you know that Compose provides out-of-the-box class for providing Lorem ipsum 🤯 It can also be used as a parameter provides. It is super useful for making previews❗
Effective Kotlin retweeted
A good Compose foundation starts with understanding the essentials well.
Our free Compose Essentials Cheat Sheet made by Marcin Moskala and Jov Mit is a compact reference covering core concepts like state hoisting, side effects, layouts, and common UI components.
Register with your email, and we’ll send it your way. 👇
cheat-sheet.kt.academy/compo…





















