marcinmoskala.bsky.social @marcinmoskala.bsky.social · 25/09/2025With @preussler.berlin 👍 at #dcbln25 Thank you @droidcon.bsky.social for inviting me another time to this event! 051
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 18/09/2025🚀 Want to dive deeper into performance and Kotlin best practices? Join me for the upcoming open workshop – Kotlin Mastery, October 23–24, where we’ll explore performance optimization and much more! 010
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 18/09/2025 On Android the modern standard for testing is Macrobenchmark and Microbenchmark frameworks. They can measure startup times, performance of all kinds of UI operations, and much more. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 18/09/2025In backend, we often choose something in-between, like when we connect to a real application, but some of its repositories are faked. That is often simpler to setup. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 18/09/2025The problem is that such a test is harder to profile, harder to setup, and gives less predictable outcomes, but it better shows us how our application behaves under certain stress. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 18/09/2025On the other hand, you can write a local E2E performance test. On backend it means starting application locally, local database, and local fake services it uses. Such a test measures much more, including database use, serialization/deserialization, etc. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 18/09/2025During execution we can profile execution time and memory use to know what to optimise. For more precise measurements, we can use a framework like JMH, but that limits our profiling capabilities. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 18/09/2025Let’s start with the simplest approach: Testing an element in separation. A class often needs some fake dependencies, and we fill them with fake data, to simulate a specific scenarios. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 18/09/2025To optimise, you must measure. To choose the right approach for performance measurement, you must answer the most important question: What do you want to measure? 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 25/08/2025 🤔 And what about memory usage when you run millions of concurrent tasks? 🤔 If any of these questions keep you up at night, join my upcoming webinar—I’ll walk you through the answers. webinar.kt.academy/kotlin-corou... 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 25/08/2025Which one really scales better for high-concurrency workloads? 🤔 Are there reliable benchmarks comparing coroutine performance with Loom’s virtual threads? 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 25/08/2025Only 7 days left to buy Coroutines Mastery at a better price! 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 22/08/2025Want to see how Loom really compares against Kotlin Coroutines? On Sept 1, I’ll be live comparing them side-by-side — strengths, weaknesses, and when to use each. Two time slots, free to join. Reserve your seat → webinar.kt.academy/kotlin-corou... 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 22/08/2025Boost 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/disp... 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 22/08/2025Curious about Rich Errors in Kotlin? Here is the first KEEP document, explaining their motivation and implementation: github.com/Kotlin/KEEP/...github.comKEEP/proposals/KEEP-0441-rich-errors-motivation.md at main · Kotlin/KEEPKotlin Evolution and Enhancement Process. Contribute to Kotlin/KEEP development by creating an account on GitHub. 010
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 21/08/2025🥵 Are your frustred by mistakes like these? That’s just one of many subtle pitfalls we tackle in Coroutines Mastery. If you want to master Kotlin’s concurrency tools — and avoid the mistakes that slow teams down — join our course. coroutinesmastery.com?utm_source=l... 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 21/08/2025Updates to MutableStateFlow should be made using the update function; otherwise, conflicts might cause some updates to be lost. 120
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 15/08/2025I will be speaking at #JDDKrakow on October 21-22, 2025! Let's meet in Krakow, Poland - join the conference at: jdd.org.pl #JavaDevelopment #JavaConference #SoftwareEngineering #TechConference #Krakow 020
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 15/08/2025A lightweight wrappers over arrays, providing efficient collection processing functions, immutability, equality, and proper type hierarchy. Those are arrays done well, I love it! github.com/daniel-rusu/... #Kotlin #ImmutableCollections #FunctionalProgramming #SoftwareEngineering #DeveloperTips 120
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 14/08/2025Ready and excited for today's sessions! Can't wait to share this content with you all. See you all very soon! webinar.kt.academy/why-you-shou... #Kotlin #KotlinCoroutines #Concurrency #AsyncProgramming #DeveloperCommunity 010
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 13/08/2025Still debating whether you should introduce coroutines—or where to even begin? Skip the internal tug-of-war and bring your toughest questions to my live Q&A TOMORROW! I’ll be dedicating extra time to answer everything you throw. Last chance to sign up: webinar.kt.academy/why-you-shou... 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 12/08/2025Starting from square one? Come hang out at my live session “Why You Should Use Kotlin Coroutines.” this Thursday. We’ll unpack why they’re worth the learning and how to do it painless. 👇 webinar.kt.academy/why-you-shou... #KotlinCoroutines #KotlinFlow #SoftwareEngineering #DeveloperTips 010
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 12/08/2025Coroutines power-user? Grab my brand-new Flow Cheat-Sheet—operators, builders, the whole buffet. 👇 cheat-sheet.kt.academy/flowcheat-sheet.kt.academyFLOW IN KOTLIN COROUTINESNeed a no-fluff guide to Kotlin Flow? Sign up and grab the Flow in Kotlin Coroutines Cheat Sheet—a concise, high-impact PDF that turns complex async concepts into copy-paste-ready code examples. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 11/08/2025Many ask me how to stay in touch with what's happening in Kotlin. My answer is simple: Kotlin Weekly! kotlinweekly.net 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 11/08/2025In 3 days, we go live! ⏳ Seats are filling up! 👉 webinar.kt.academy/why-you-shou... #KotlinCoroutines #StructuredConcurrency #ReactiveProgramming #SoftwareEngineering #KtAcademy 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 08/08/2025Cancellation is just one example of how Kotlin Coroutines improve real-world code. If you'd like to explore more such concepts, I invite you to my free webinar: webinar.kt.academy/why-you-shou... 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 08/08/2025Kotlin Coroutines cancellation is not perfect, but still, it is the best solution I know, and I am very happy to have it in Kotlin. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 08/08/2025Exceptions happen, and connections get lost. Now you can calculate how many resources that can help us save if cancellation lets us close a connection with another service earlier, or not make a request at all, or not calculate something, or release a thread previously blocked. 110
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 08/08/2025Also when you define a backend application in a framework like Ktor, that is coroutines-first, if an HTTP connection is lost, call gets immediately cancelled, the same if WebSocket or RSocket connection is lost. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 08/08/2025But cancellation mechanisms are also a great benefit for backend developers. If you make async calls and one of them fails, others are cancelled by default. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 08/08/2025Thanks to structured concurrency, cancellation propagates from child to parent. That is a game-changer for Android developers, where each scope is associated with a view, so if the view gets destroyed, all its processes get cancelled. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 08/08/2025Most people do not even think about cancellation, but it is extremely important, and both Android and backend developers benefit from Kotlin Coroutines cancellation mechanisms. Let me give you some examples. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 06/08/2025Curious about the real payoff of coroutines? Save a spot at my upcoming webinar — details & sign-up: webinar.kt.academy/why-you-shou... 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 06/08/2025It’s an extended version of the same topic, filled with real-world examples and practical tips you can apply right away to write better coroutine-based code. Hope it helps you write safer, more predictable, and more maintainable Kotlin applications! 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 06/08/2025It clearly resonated with many of you, so I want to keep the conversation going. If you'd like to dive deeper into this topic, I highly recommend watching my talk from Droidcon London 2024. 🎥 www.youtube.com/watch?v=WKrt... 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 06/08/2025Coroutines are incredibly powerful, but their hidden complexities can trip up even experienced developers. While this topic is not new, my recent webinar on "Mistakes You Make Using Kotlin Coroutines" was packed — and for good reason! 120
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 05/08/2025Teaching Flow for years has taught me one thing: developers, including myself, love quick references. So here’s mine—totally free. Join the list, grab the PDF, and tell me what you think! 👉 cheat-sheet.kt.academy/flow 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 04/08/2025Who should join my free webinar, “Why You Should Use Kotlin Coroutines”? Anyone who wants to START USING COROUTINES CORRECTLY in real projects. 👨💻 Developers 🧑💼 Team Leads & Tech Managers 📊 Project Managers (with a technical background) Reserve your spot: webinar.kt.academy/why-you-shou... 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025Kotlin Coroutines power structured concurrency, clean async design, and safer cancellation—features beyond simple threading. Want to master their proper use and avoid common pitfalls? Join the free webinar: webinar.kt.academy/why-you-shou... 000
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025Kotlin, on the other hand, sets new boundaries. Kotlin Coroutines is revolutionary, and it is now an inspiration for many other languages. Its multiplatform capabilities or compiler plugins might be even grater revolution. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025It is very unlikely Java will ever change its type-system, they also do not plan to introduce extension functions, DSL capabilities or opertator overloading. Java might change here and there, but it is still an old language constrainded by its legacy. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025Once Java started changing again, it concentrated on low-hanging fruits (records, improved switch-case) and features they already had in development (virtual threads, type inference), but the most important things are hard or impossible to reach. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025There is much more than that, Kotlin has amazing stdlib, well-organized type system, variance modifiers, interface and property delegation, object declarations, better default modifiers, KSP, compiler plugins, and much more. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025𝗞𝗼𝘁𝗹𝗶𝗻 𝗖𝗼𝗿𝗼𝘂𝘁𝗶𝗻𝗲𝘀 hold many adventages over what Java offers, even with Loom. I wrote a separate post about it, but Kotlin Coroutines are much better features and modern, offer powerful testability, effortless structured concurrency, powerful cancellation and synchronization. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025𝗠𝘂𝗹𝘁𝗶𝗽𝗹𝗮𝘁𝗳𝗼𝗿𝗺 𝗰𝗮𝗽𝗮𝗯𝗶𝗹𝗶𝘁𝗶𝗲𝘀 of Kotlin allows us to reuse code written once in multiple platforms. We can finally stop writing the same in multiple languages, we can have shared Android, iOS and web part, or a library that is compiled to JVM, JS, WASM and any native platform. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025𝗗𝗦𝗟 𝗰𝗮𝗽𝗮𝗯𝗶𝗹𝗶𝘁𝗶𝗲𝘀 opened doors for defining complex configurations conveniently (Gradle, Ktor), for defining UI in code (Jetpack Compose), and is used by many libraries to provide expressive, type-safe API. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025𝗜𝗻𝗹𝗶𝗻𝗲 𝗳𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 𝗮𝗻𝗱 𝗰𝗹𝗮𝘀𝘀𝗲𝘀 that seemingly small feature opens doors for better efficiency of higher-order functions, cheap wrapper classes that help us improve safery, and reified types, that are useful for many libraries. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿 𝗼𝘃𝗲𝗿𝗹𝗼𝗮𝗱𝗶𝗻𝗴 is a nice adventage. You can add collections, make mathematical operations on BigDecimal, compare any comparable values. That is not a big thing, but makes Kotlin more readable, consistant and pleasant. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025𝗖𝗼𝗻𝘁𝗿𝗼𝗹 𝗼𝘃𝗲𝗿 𝗺𝘂𝘁𝗮𝗯𝗶𝗹𝗶𝘁𝘆 in Kotlin is amazing. Simple val are used nearly everywhere, and basic types representing collections are read-only (List, Map, Set). Also copy method in data class, and read-only interfaces for many popular data holders make Kotlin easy to limit mutability and keep safer. 100
marcinmoskala.bsky.social @marcinmoskala.bsky.social · 01/08/2025𝗘𝘅𝘁𝗲𝗻𝘀𝗶𝗼𝗻 𝗳𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀, as I posted recently, revolutionized Kotlin development and are one of the most beloved Kotlin features, but Java creators made it clear they do not want to introduce extension functions to Java. 100