Kotlin under the hood: How inline functions work | by Max Sidorov | Nov, 2023
I conduct a lot of technical interviews and see that many developers do not understand the benefits of using inline functions . Why is crossinline needed and how reified works. Part of the source of common misconceptions about inline functions is that there used to…
Law of Demeter with examples in Kotlin | by Fabrizio Di Napoli | Nov, 2023
Not Demeter but I liked the pic! Photo by Nils on Unsplash First of all, what is Law of Demeter? It’s also called Demeter’s law or LoD or Principle of Least Knowledge or “don’t talk to strangers”. It was discovered in 1987 in Northeastern University,…
Dive into Kotlin Coroutines.. In this article, I’ll give some basic… | by Anatolii Frolov | Nov, 2023
First, we’ll remove all the auxiliary code to measure the execution time of the code and output the log. We don’t need this anymore. Now our coroutine will look like the example below. Let me remind you that the receiveData() function is suspended and will…
Elegant Event Handling in Kotlin — A Refactoring Walkthrough | by Sven Nähler | Nov, 2023
Unlock peak performance in Kotlin code with these expert refactoring tips. In the world of software development, code refactoring is the hero that rescues us from tangled and inefficient code. In this article, we’ll embark on an adventure to revamp Kotlin code handling diverse events….
Version Catalog, Backward Compatibility, Kotlin Multiplatform, Context Concept, Migration, and more! | by Shahla Aliyeva | Nov, 2023
Just as always, we are reachable via editors@proandroiddev.com. We look forward to reading your feedback, article submissions, and partnership ideas. Follow us on Facebook and Twitter, and see you soon! Cheers, ProAndroidDev Team Sergii Zhuk . Greg Fawson . Andy Dyer . Brian Gardner ….
Getting Started with Kotlin Multiplatform[2/n]: Moko Shared View Model & Koin DI | by Debanshu Datta | Nov, 2023
After successfully implementing the basic Kotlin multiplatform app in our last blog, we will now focus on following a simple architecture with use cases, dependency injection, Shared View Model etc. We will build on what we built in the first part of the blog. We…
Kotlin / Native —How to use C in Kotlin [Part 1] | by Debanshu Datta | Sep, 2023
Kotlin has the same compiler frontend and several backends; there is a backend for JavaScript and one for native, which produces standalone binaries. For those who may not be familiar, LLVM is a set of compiler tools that have been around for nearly two decades…
Kotlin/Native — Use Kotlin In C and Apple Framework [Part 2] | by Debanshu Datta | Sep, 2023
In the previous article, we embarked on a journey into the world of Kotlin/Native, uncovering its capabilities in compiling Kotlin code to native binaries, free from the constraints of virtual machines. We explored the architecture of Kotlin/Native, delving into its LLVM-based backend and the crucial…
Sequence optimizations: how my code got into kotlin | by Max Sidorov | Nov, 2023
I noticed that the implementation of the distinct function is algorithmically very similar to the filter function. However, the distinct function has a significant performance loss compared to regular collections (-15%), while the filter function outperforms collections by about 3%-5%. Measurement results — distinct Measurement…
Evolving with Kotlin — Advanced Functional Programming Techniques | by Nirbhay Pherwani | Oct, 2023
Kotlin offers a rich set of functions to operate on collections. Beyond the basics, understanding the intricacies of these functions can dramatically improve code clarity and efficiency. Photo by Karoline Stk on Unsplash 1. Transformations with map and flatMap Basic Syntax — The map function…