Рассуждения на тему, где и в какой момент лучше загружать данные: LaunchedEffect или ViewModel.init()
#android #kotlin #compose #architecture
https://proandroiddev.com/loading-initial-data-in-launchedeffect-vs-viewmodel-f1747c20ce62
#android #kotlin #compose #architecture
https://proandroiddev.com/loading-initial-data-in-launchedeffect-vs-viewmodel-f1747c20ce62
Разработчик из команды Compose рассказывает, как они оптимизировали свой Kotlin код.
#android #compose #kotlin #performance
https://www.youtube.com/watch?v=WAbaEE8qRdw
#android #compose #kotlin #performance
https://www.youtube.com/watch?v=WAbaEE8qRdw
YouTube
Going fast with Kotlin | Andrei Shikov
Recording brought to you by American Express. https://americanexpress.io/kotlin-jobs
Kotlin is leaning on JVM a lot, making most Java features accessible and easy to use. Sometimes, however, this results in curiously unexpected results during execution if…
Kotlin is leaning on JVM a lot, making most Java features accessible and easy to use. Sometimes, however, this results in curiously unexpected results during execution if…
Romain Guy рассказывает (часто переходя на байткод), как удается оптимизировать Compose.
#android #kotlin #compose #bytecode
https://www.youtube.com/watch?v=5cxw_fdpnoA
#android #kotlin #compose #bytecode
https://www.youtube.com/watch?v=5cxw_fdpnoA
YouTube
Practical Optimizations
In this session we will look at a series of optimizations that were done in Jetpack Compose to learn about how different types of optimizations can affect performance, including code flow/algorithms, new data structures, low-level bytecode optimizations,…
Вышла новая версия Ktor, альтернативы OkHttp от Jetbrains
Что нового в версии 3:
- Migrating to kotlinx-io
- Support for server-sent events
- Serving static resources from ZIP archives
- Support for CSRF
#kotlin #network #ktor
https://blog.jetbrains.com/kotlin/2024/10/ktor-3-0/
Что нового в версии 3:
- Migrating to kotlinx-io
- Support for server-sent events
- Serving static resources from ZIP archives
- Support for CSRF
#kotlin #network #ktor
https://blog.jetbrains.com/kotlin/2024/10/ktor-3-0/
The JetBrains Blog
Ktor 3.0 Is Now Available With New Features and Improved Performance | The Kotlin Blog
Ktor 3.0 is faster, better integrated with Kotlin tools, and offers more options for client-server apps. Find more details in the blog post.
Dos and Don’ts для ViewModel, часть 5:
- Avoid hardcoding Coroutine Dispatchers.
- Unit test your ViewModels.
- Avoid exposing suspended functions.
#kotlin #android #viewmodel #bestpractise
https://proandroiddev.com/mastering-android-viewmodels-essential-dos-and-donts-part-5-%EF%B8%8F5%EF%B8%8F%E2%83%A3-14d04ec2426a
- Avoid hardcoding Coroutine Dispatchers.
- Unit test your ViewModels.
- Avoid exposing suspended functions.
#kotlin #android #viewmodel #bestpractise
https://proandroiddev.com/mastering-android-viewmodels-essential-dos-and-donts-part-5-%EF%B8%8F5%EF%B8%8F%E2%83%A3-14d04ec2426a
Medium
Mastering Android ViewModels: Essential Dos and Don’ts Part 5 🛠️5️⃣
keep these in mind for better code quality when doing ViewModels!
Релизнулся Kotlin 2.1.0
What's new:
New language features in preview: Guard conditions in when with a subject, non-local break and continue, and multi-dollar string interpolation.
K2 compiler updates: More flexibility around compiler checks and improvements to the kapt implementation.
Kotlin Multiplatform: Stable Gradle DSL for compiler options and many other improvements.
Kotlin/Native: Improved support for iosArm64 and other updates.
Kotlin/Wasm: Multiple updates, including support for incremental compilation.
Gradle support: Improved compatibility with newer versions of Gradle and the Android Gradle plugin, along with updates to the Kotlin Gradle plugin API.
#kotlin #release
https://blog.jetbrains.com/kotlin/2024/11/kotlin-2-1-0-released/
What's new:
New language features in preview: Guard conditions in when with a subject, non-local break and continue, and multi-dollar string interpolation.
K2 compiler updates: More flexibility around compiler checks and improvements to the kapt implementation.
Kotlin Multiplatform: Stable Gradle DSL for compiler options and many other improvements.
Kotlin/Native: Improved support for iosArm64 and other updates.
Kotlin/Wasm: Multiple updates, including support for incremental compilation.
Gradle support: Improved compatibility with newer versions of Gradle and the Android Gradle plugin, along with updates to the Kotlin Gradle plugin API.
#kotlin #release
https://blog.jetbrains.com/kotlin/2024/11/kotlin-2-1-0-released/
The JetBrains Blog
Kotlin 2.1.0 Released | The Kotlin Blog
The Kotlin 2.1.0 release is out! This version introduces new language features, tooling updates, performance improvements, and important fixes. Learn more!
Статья про ядра, процессы и IO/Default диспетчеры
#kotlin #coroutines #dispatcher
https://proandroiddev.com/exploring-the-secrets-of-dispatchers-default-and-io-in-kotlin-coroutines-31d703c29ee2
#kotlin #coroutines #dispatcher
https://proandroiddev.com/exploring-the-secrets-of-dispatchers-default-and-io-in-kotlin-coroutines-31d703c29ee2
Medium
👋🏻 Exploring the Secrets of Dispatchers Default and IO in Kotlin Coroutines
Understanding the architecture of CPU cores and threads can be a game-changer when writing optimized code. In this guide, we will explore…
Исключения в Kotlin не стоит описывать как object, иначе можем получить некорректный stacktrace
#kotlin #exception #stacktrace #singleton
https://medium.com/@michalankiersztajn/why-exceptions-shouldnt-be-objects-in-kotlin-ad73429cc226
#kotlin #exception #stacktrace #singleton
https://medium.com/@michalankiersztajn/why-exceptions-shouldnt-be-objects-in-kotlin-ad73429cc226
Medium
Why Exceptions shouldn’t be objects in Kotlin
Learn why Exception shouldn’t be an object. What can happen and why? Deep dive into the internals of object and Exception!
Romain Guy рассказывает, как имя переменной может повлиять на производительность
#kotlin #performance
https://www.romainguy.dev/posts/2024/naming-is-hard/
#kotlin #performance
https://www.romainguy.dev/posts/2024/naming-is-hard/
Romain Guy
Naming is Hard
Before we dive into today’s topic, I would like to make it clear that what follows is specific to how Android, and more precisely the Android RunTime (ART), works. Some of what follows applies to other environments as well, but the main twist is about Android.…
Сравнение различных AI моделей, какие из них лучше работают с Kotlin кодом
#kotlin #ai
https://blog.jetbrains.com/kotlin/2025/02/openai-vs-deepseek-which-ai-understands-kotlin-better/
#kotlin #ai
https://blog.jetbrains.com/kotlin/2025/02/openai-vs-deepseek-which-ai-understands-kotlin-better/
The JetBrains Blog
OpenAI vs. DeepSeek: Which AI Understands Kotlin Better? | The Kotlin Blog
Which AI model understands Kotlin best? We tested DeepSeek-R1, several OpenAI models, and more using Kotlin-specific benchmarks. See how they compare in our analysis.
Несколько дней назад релизнулся Kotlin 2.1.20
Список изменений:
- K2 compiler updates: New default kapt compiler plugin.
- Kotlin Multiplatform: A new DSL to replace Gradle’s Application plugin in multiplatform projects.
- Kotlin/Native: Inlining optimization to improve runtime performance.
- Kotlin/Wasm: Custom formatters are now enabled by default in development builds.
- Gradle support: Support for adding custom publication variants in multiplatform and JVM projects.
- Standard library: Introduction of common atomic types, improved UUID support, and a new time-tracking functionality.
- Compose compiler: Now includes source information by default across all platforms.
#kotlin #release
https://blog.jetbrains.com/kotlin/2025/03/kotlin-2-1-20-released-2/
Список изменений:
- K2 compiler updates: New default kapt compiler plugin.
- Kotlin Multiplatform: A new DSL to replace Gradle’s Application plugin in multiplatform projects.
- Kotlin/Native: Inlining optimization to improve runtime performance.
- Kotlin/Wasm: Custom formatters are now enabled by default in development builds.
- Gradle support: Support for adding custom publication variants in multiplatform and JVM projects.
- Standard library: Introduction of common atomic types, improved UUID support, and a new time-tracking functionality.
- Compose compiler: Now includes source information by default across all platforms.
#kotlin #release
https://blog.jetbrains.com/kotlin/2025/03/kotlin-2-1-20-released-2/
Автор рассказывает почему в Dagger/Hilt аннотация @Binds эффективнее, чем @Provides
#kotlin #di #dagger #hilt #performance
https://medium.com/@m.rzna/why-binds-is-faster-than-provides-annotation-in-dagger-hilt-7d0f89af6542
#kotlin #di #dagger #hilt #performance
https://medium.com/@m.rzna/why-binds-is-faster-than-provides-annotation-in-dagger-hilt-7d0f89af6542
Medium
Why @Binds is faster than @Provides annotation in Dagger/Hilt?
I’ve seen Android projects heavily using Dagger/Hilt for Dependency Injection purposes, along with Kapt or nowadays, KSP to improve the…
Сравнение TopLevel и Companion констант с точки зрения генерируемого кода
#kotlin #contstant #performance
https://proandroiddev.com/top-level-constants-vs-companion-enclosed-constants-using-kotlin-in-android-cbb067732428
#kotlin #contstant #performance
https://proandroiddev.com/top-level-constants-vs-companion-enclosed-constants-using-kotlin-in-android-cbb067732428
Medium
Kotlin Constants in Android: Top-level vs. Companion-enclosed
Does the choice between the two affect performance, APK size, or memory usage? Let’s break it down by diving into the bytecode.
Context parameters релизнуты в Beta статусе в Kotlin 2.2.0
Миграция на них с текущих context receivers крайне рекомендуется, т.к. context receivers будут в дальнейшем удалены
#kotlin #contextreceivers #contextparameters
https://blog.jetbrains.com/kotlin/2025/04/update-on-context-parameters/
Миграция на них с текущих context receivers крайне рекомендуется, т.к. context receivers будут в дальнейшем удалены
#kotlin #contextreceivers #contextparameters
https://blog.jetbrains.com/kotlin/2025/04/update-on-context-parameters/
The JetBrains Blog
Update on Context Parameters | The Kotlin Blog
Context parameters will be replacing context receivers in Kotlin, with version 2.2.0 featuring them as Beta. We are committed to providing an easy migration between both features, including dedicated compiler and IntelliJ IDEA support.
K2 mode будет включен по умолчанию начиная с IntelliJ IDEA 2025.1. Он улучшит производительность и позволит использовать некоторые новые фичи Kotlin
#android #kotlin #compiler
https://blog.jetbrains.com/idea/2025/04/k2-mode-in-intellij-idea-2025-1-current-state-and-faq/
#android #kotlin #compiler
https://blog.jetbrains.com/idea/2025/04/k2-mode-in-intellij-idea-2025-1-current-state-and-faq/
The JetBrains Blog
K2 Mode in IntelliJ IDEA 2025.1: Current State and FAQ | The IntelliJ IDEA Blog
Starting with IntelliJ IDEA 2025.1, K2 mode, a new implementation of Kotlin support, will be enabled by default. This change is an important step in the ongoing effort to improve Kotlin support in the
Автор призывает быть внимательнее при использовании массивов в Data классах из-за их реализации equals()
#kotlin #dataclass #array
https://proandroiddev.com/avoid-using-array-in-the-data-class-constructor-in-kotlin-ebc308e46a95
#kotlin #dataclass #array
https://proandroiddev.com/avoid-using-array-in-the-data-class-constructor-in-kotlin-ebc308e46a95
Medium
Avoid using Array in the data class constructor in Kotlin
Understand the hidden risks of using Array inside Kotlin data classes — and a better alternative.
Последние новости из мира Kotlin
- Kotlin 2.2 and language evolution
- K2 compiler: Now the default in IntelliJ IDEA 2025.1
- New language features on the way
- Kotlin build tool innovation – Amper
- Growth of the Kotlin Foundation and reopening of the Grants Program
- Introducing Koog: A framework for building AI agents in Kotlin (now open source)
- Kotlin Multiplatform: New KMP plugin in IntelliJ IDEA + Android Studio and Compose Multiplatform Updates
- Compose Multiplatform for iOS is Stable
- Kotlin/Wasm and Compose for web progress
- Kotlin for server side: Growing adoption and Spring partnership
- Backend ecosystem: Ktor 3 and revamped Exposed
- Official Kotlin LSP in development
#kotlin #kmp #amper #multiplatform
https://blog.jetbrains.com/kotlin/2025/05/kotlinconf-2025-language-features-ai-powered-development-and-kotlin-multiplatform/
- Kotlin 2.2 and language evolution
- K2 compiler: Now the default in IntelliJ IDEA 2025.1
- New language features on the way
- Kotlin build tool innovation – Amper
- Growth of the Kotlin Foundation and reopening of the Grants Program
- Introducing Koog: A framework for building AI agents in Kotlin (now open source)
- Kotlin Multiplatform: New KMP plugin in IntelliJ IDEA + Android Studio and Compose Multiplatform Updates
- Compose Multiplatform for iOS is Stable
- Kotlin/Wasm and Compose for web progress
- Kotlin for server side: Growing adoption and Spring partnership
- Backend ecosystem: Ktor 3 and revamped Exposed
- Official Kotlin LSP in development
#kotlin #kmp #amper #multiplatform
https://blog.jetbrains.com/kotlin/2025/05/kotlinconf-2025-language-features-ai-powered-development-and-kotlin-multiplatform/
The JetBrains Blog
KotlinConf 2025 Unpacked: Upcoming Language Features, AI-Powered Development, and Kotlin Multiplatform Upgrades | The Kotlin Blog
KotlinConf 2025 unveiled major updates that set the tone for the year ahead: new features, AI tools, KMP milestones, and a partnership for the backend.
Несколько дней назад вышел Kotlin 2.2.0
What's new
Language: new language features in preview, including context parameters. Several previously experimental features are now Stable, such as guard conditions, non-local break and continue, and multi-dollar interpolation.
Kotlin compiler: unified management of compiler warnings.
Kotlin/JVM: changes to default method generation for interface functions.
Kotlin/Native: LLVM 19 and new features for tracking and adjusting memory consumption.
Kotlin/Wasm: separated Wasm target and the ability to configure Binaryen per project.
Kotlin/JS: fix for the copy() method generated for @JsPlainObject interfaces.
Gradle: binary compatibility validation in the Kotlin Gradle plugin.
Standard library: stable Base64 and HexFormat APIs.
Documentation: our documentation survey is open, and notable improvements have been made to the Kotlin documentation.
#kotlin #release
https://kotlinlang.org/docs/whatsnew22.html
What's new
Language: new language features in preview, including context parameters. Several previously experimental features are now Stable, such as guard conditions, non-local break and continue, and multi-dollar interpolation.
Kotlin compiler: unified management of compiler warnings.
Kotlin/JVM: changes to default method generation for interface functions.
Kotlin/Native: LLVM 19 and new features for tracking and adjusting memory consumption.
Kotlin/Wasm: separated Wasm target and the ability to configure Binaryen per project.
Kotlin/JS: fix for the copy() method generated for @JsPlainObject interfaces.
Gradle: binary compatibility validation in the Kotlin Gradle plugin.
Standard library: stable Base64 and HexFormat APIs.
Documentation: our documentation survey is open, and notable improvements have been made to the Kotlin documentation.
#kotlin #release
https://kotlinlang.org/docs/whatsnew22.html
Kotlin Help
What's new in Kotlin 2.2.0 | Kotlin