<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Shreyansh Lodha on StaticVar | Shreyansh Lodha</title><link>https://staticvar.dev/</link><description>Recent content in Shreyansh Lodha on StaticVar | Shreyansh Lodha</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://staticvar.dev/index.xml" rel="self" type="application/rss+xml"/><item><title>Experience</title><link>https://staticvar.dev/about/content/experience/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staticvar.dev/about/content/experience/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="https://mutualmobile.com/" title="MutualMobile"&gt;Mutual Mobile | A Grid Dynamics Company&lt;/a&gt; - &lt;strong&gt;Staff Engineer&lt;/strong&gt; &lt;em&gt;(October 2025 – Present)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mutualmobile.com/" title="MutualMobile"&gt;Mutual Mobile | A Grid Dynamics Company&lt;/a&gt; - &lt;strong&gt;Senior Android Engineer I&lt;/strong&gt; &lt;em&gt;(September 2022 – October 2025)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.navana.ai/"&gt;Navana Tech&lt;/a&gt; - &lt;strong&gt;Android Developer&lt;/strong&gt; &lt;em&gt;(Feb 2021 – September 2023)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://in.linkedin.com/company/openappliances"&gt;OpenApp Private Limited&lt;/a&gt; - &lt;strong&gt;Android Developer&lt;/strong&gt; &lt;em&gt;(June 2019 – February 2021)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Kotlin Coroutines Under the Hood - Dispatchers, Thread Pools, and Work Stealing</title><link>https://staticvar.dev/post/kotlin-coroutines-under-the-hood/</link><pubDate>Sat, 21 Feb 2026 00:00:00 +0530</pubDate><guid>https://staticvar.dev/post/kotlin-coroutines-under-the-hood/</guid><description>&lt;h2 id="prerequisites-and-assumptions"&gt;Prerequisites and assumptions&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This article reflects how the kotlinx.coroutines scheduler works as of February 2026. Internal implementation details can change between releases.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You have written Kotlin coroutines before. You know what &lt;code&gt;launch&lt;/code&gt;, &lt;code&gt;async&lt;/code&gt;, &lt;code&gt;withContext&lt;/code&gt;, and &lt;code&gt;suspend&lt;/code&gt; do at a basic level. You&amp;rsquo;ve used &lt;code&gt;Dispatchers.Default&lt;/code&gt;, &lt;code&gt;Dispatchers.IO&lt;/code&gt;, and &lt;code&gt;Dispatchers.Main&lt;/code&gt; in at least one project. This article is about the machinery underneath those abstractions.&lt;/p&gt;</description></item><item><title>Agentic AI in 2026 - A Thinking Engineer's Field Guide</title><link>https://staticvar.dev/post/agentic-ai-coding-2026/</link><pubDate>Sun, 11 Jan 2026 00:00:00 +0530</pubDate><guid>https://staticvar.dev/post/agentic-ai-coding-2026/</guid><description>&lt;h2 id="the-paradigm-shift-in-programming"&gt;The paradigm shift in programming&lt;/h2&gt;
&lt;p&gt;We&amp;rsquo;re living through one of the most significant transformations in how software gets written. The rise of &lt;a href="#agentic-ai"&gt;Agentic AI&lt;/a&gt; has changed everything about the engineer&amp;rsquo;s experience. Gone are the days when AI assistance meant autocomplete suggestions or simple code snippets. Today&amp;rsquo;s AI agents can reason about codebases, execute multi-step tasks, browse documentation, and iterate on solutions autonomously.&lt;/p&gt;</description></item><item><title>Kotlin's Plugin Discovery - Service Provider Interface Explained</title><link>https://staticvar.dev/post/jvm-spi-plug-and-play/</link><pubDate>Sun, 05 Oct 2025 10:00:00 +0530</pubDate><guid>https://staticvar.dev/post/jvm-spi-plug-and-play/</guid><description>&lt;h2 id="prerequisites-and-assumptions"&gt;Prerequisites and assumptions&lt;/h2&gt;
&lt;p&gt;You are working with Kotlin on the JVM or Kotlin Multiplatform. You understand basic interfaces and classloading concepts. You have encountered scenarios where you want pluggable implementations without hardcoding dependencies.&lt;/p&gt;
&lt;p&gt;Good reads and references&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/ServiceLoader.html"&gt;Official Java ServiceLoader documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ktor.io/docs/http-client-engines.html"&gt;Ktor HTTP client engines&lt;/a&gt; - real world SPI usage&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.slf4j.org/manual.html#swapping"&gt;SLF4J service provider&lt;/a&gt; - logging backend discovery&lt;/li&gt;
&lt;li&gt;Source code: &lt;code&gt;java.util.ServiceLoader&lt;/code&gt; in the JDK&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="what-you-get-with-spi"&gt;What you get with SPI&lt;/h2&gt;
&lt;p&gt;The &lt;a href="#service-provider-interface-spi"&gt;Service Provider Interface&lt;/a&gt; is a built-in JVM mechanism introduced in Java 6 for discovering and loading implementations at runtime. It&amp;rsquo;s a registry where libraries announce &amp;ldquo;I provide an implementation of X&amp;rdquo; and applications ask &amp;ldquo;give me all implementations of X&amp;rdquo; without either side knowing concrete class names at compile time.&lt;/p&gt;</description></item><item><title>Four Doors, One Party - K/N, JNI, JNA &amp; FFM</title><link>https://staticvar.dev/post/kn-jni-jna-ffm/</link><pubDate>Sat, 13 Sep 2025 17:00:00 +0530</pubDate><guid>https://staticvar.dev/post/kn-jni-jna-ffm/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Think of native power as a party. Kotlin can show up through four different doors: &lt;a href="#kotlin-native"&gt;Kotlin/Native (K/N)&lt;/a&gt;, &lt;a href="#java-native-interface"&gt;JNI&lt;/a&gt;, &lt;a href="#java-native-access"&gt;JNA&lt;/a&gt; and &lt;a href="#foreign-function-and-memory-api"&gt;FFM&lt;/a&gt;. Same venue, different guest lists. This guide explains which door to use, when and why.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="good-reads"&gt;Good reads&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://kotlinlang.org/docs/native-overview.html"&gt;Kotlin Native overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kotlinlang.org/docs/native-c-interop.html"&gt;Kotlin Native C interop guide &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jni/"&gt;JNI specification and tutorial&lt;/a&gt; (click on the JNI &amp;lt;x.x&amp;gt; Specification link)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/java-native-access/jna"&gt;JNA project and usage examples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Foreign Function and Memory API (aka Project Panama)
&lt;a href="https://openjdk.org/jeps/442"&gt;JEP 442 overview&lt;/a&gt;, &lt;a href="https://github.com/openjdk/jextract"&gt;jextract tool&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.android.com/ndk/guides"&gt;Android NDK guides&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="party-floorplan-30-second-tour"&gt;Party Floorplan (30 second tour)&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-mermaid" data-lang="mermaid"&gt;flowchart LR
 A[Kotlin code]
 KN[&amp;#34;Kotlin Native&amp;lt;br/&amp;gt;(AOT native binary)&amp;#34;]
 JNI[&amp;#34;JNI&amp;lt;br/&amp;gt;(manual C/C++ glue)&amp;#34;]
 JNA[&amp;#34;JNA&amp;lt;br/&amp;gt;(no C glue, higher overhead)&amp;#34;]
 FFM[&amp;#34;FFM API&amp;lt;br/&amp;gt;(Java 21+, safe and fast)&amp;#34;]
 R((Native code or OS APIs))

 A --&amp;gt;|Door 1| KN
 A --&amp;gt;|Door 2| JNI
 A --&amp;gt;|Door 3| JNA
 A --&amp;gt;|Door 4| FFM
 KN --&amp;gt; R
 JNI --&amp;gt; R
 JNA --&amp;gt; R
 FFM --&amp;gt; R
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;What changes by door?&lt;/strong&gt; Mostly the runtime you stand in, call overhead, memory rules, tooling and portability.&lt;/p&gt;</description></item><item><title>From Source to Sorcery - Kotlin Native's Interop Magic</title><link>https://staticvar.dev/post/kotlin-native-c-interop/</link><pubDate>Fri, 05 Sep 2025 16:05:00 +0530</pubDate><guid>https://staticvar.dev/post/kotlin-native-c-interop/</guid><description>&lt;h2 id="prerequisites-and-assumptions"&gt;Prerequisites and assumptions&lt;/h2&gt;
&lt;p&gt;You are using the Kotlin Gradle DSL and the Kotlin Multiplatform plugin. You have a working C &lt;a href="#toolchain"&gt;toolchain&lt;/a&gt; per OS. On macOS install Xcode command line tools or Homebrew. On Linux install &lt;a href="#gcc"&gt;GCC&lt;/a&gt; or &lt;a href="#clang"&gt;Clang&lt;/a&gt; and the development headers for the libraries you plan to use. On Windows install &lt;a href="#msys2"&gt;MSYS2&lt;/a&gt; with &lt;a href="#mingw"&gt;MinGW&lt;/a&gt; and ensure gcc and pkg config are in PATH.&lt;/p&gt;</description></item><item><title>Detekt Convention Plugin</title><link>https://staticvar.dev/post/detekt-convention-plugin/</link><pubDate>Sun, 01 Oct 2023 18:30:00 +0000</pubDate><guid>https://staticvar.dev/post/detekt-convention-plugin/</guid><description>&lt;h3 id="presumption-prerequisite-and-good-reads-"&gt;Presumption, prerequisite and good reads 📖&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The code snippets shared here use &lt;a href="https://docs.gradle.org/current/userguide/platforms.html" title="Gradle Version Catalog"&gt;Gradle Version Catalog&lt;/a&gt; and &lt;a href="https://docs.gradle.org/current/userguide/kotlin_dsl.html" title="Kotlin Gradle DSL Primer"&gt;Kotlin Gradle DSL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Gradle &lt;a href="https://docs.gradle.org/current/samples/sample_convention_plugins.html" title="Gradle Convention Plugin"&gt;Convention Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Moving from &lt;code&gt;buildSrc&lt;/code&gt; to &lt;code&gt;build-logic&lt;/code&gt; &lt;a href="https://developer.squareup.com/blog/herding-elephants/" title="Herding Elephants"&gt;Herding Elephants - Square Developers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://detekt.dev/"&gt;Detekt documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="detekt-"&gt;Detekt 🔍&lt;/h2&gt;
&lt;p&gt;Detekt is a static code analysis tool, but it does a lot more than that, from being able to add your own custom rule to formatting your code (internally uses &lt;a href="https://github.com/pinterest/ktlint" title="ktlint - An anti-bikeshedding Kotlin linter with built-in formatter"&gt;ktlint&lt;/a&gt;).
It&amp;rsquo;s especially useful tool for when you are working on a large project or with a team and you need to ensure uniformity across code development setup.&lt;/p&gt;</description></item><item><title>My Technology Stack</title><link>https://staticvar.dev/post/technologies-stack/</link><pubDate>Fri, 29 Sep 2023 12:00:00 +0530</pubDate><guid>https://staticvar.dev/post/technologies-stack/</guid><description>&lt;h1 id="my-technology-stack"&gt;My Technology Stack&lt;/h1&gt;
&lt;p&gt;Over the years as an Android developer, I&amp;rsquo;ve worked with various technologies, frameworks, and architectural patterns. Here&amp;rsquo;s an overview of my current technology stack and the tools I use in my day-to-day development.&lt;/p&gt;
&lt;h2 id="programming-languages"&gt;Programming Languages&lt;/h2&gt;
&lt;h3 id="kotlin"&gt;Kotlin&lt;/h3&gt;
&lt;p&gt;My primary language for Android development. Kotlin&amp;rsquo;s concise syntax, null safety, and interoperability with Java make it an excellent choice for modern Android applications.&lt;/p&gt;</description></item><item><title>Cleaning up the Navigation (Jetpack Compose)</title><link>https://staticvar.dev/post/cleaner-navigation-using-jetpack-compose/</link><pubDate>Sat, 05 Jun 2021 18:30:00 +0000</pubDate><guid>https://staticvar.dev/post/cleaner-navigation-using-jetpack-compose/</guid><description>&lt;p&gt;Prerequisite&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Basic understanding of Jetpack compose&lt;/li&gt;
&lt;li&gt;Familiarity with the navigation system of compose&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Suggested reads&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.android.com/jetpack/compose/navigation" title="Navigating with compose"&gt;Navigating with Compose&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jossiwolf.medium.com/navigating-in-jetpack-compose-78c78d365c6a" title="Navigating in Jetpack Compose"&gt;Navigating in Jetpack Compose&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Jetpack compose has been out for a while now and so is the navigation system, it&amp;rsquo;s simple and direct.&lt;/p&gt;
&lt;p&gt;A simple implementation of navigation would look something like&lt;/p&gt;</description></item><item><title>AlarmManager for Android Oreo and above</title><link>https://staticvar.dev/post/alarm-manager-oreo-above/</link><pubDate>Tue, 05 Jan 2021 18:30:00 +0000</pubDate><guid>https://staticvar.dev/post/alarm-manager-oreo-above/</guid><description>&lt;p&gt;Android is getting mature with every major release and we are heading towards more user-centric and privacy first Operating System.&lt;/p&gt;
&lt;p&gt;Android Oreo was released back in 2018, one of the major changes were related to &lt;a href="https://developer.android.com/about/versions/oreo/background" title="Android Oreo background limitations"&gt;background limitations&lt;/a&gt; which changed the way most apps would function. It was one of the turning points for android, as a lot of apps were running in the background even without users knowing about it and this also drained a lot of battery, to prevent that from happening to a certain extent the android team came up with this major change.&lt;/p&gt;</description></item></channel></rss>