{"@attributes":{"version":"2.0"},"channel":{"title":"Shreyansh Lodha on StaticVar | Shreyansh Lodha","link":"https:\/\/staticvar.dev\/","description":"Recent content in Shreyansh Lodha on StaticVar | Shreyansh Lodha","generator":"Hugo","language":"en-US","item":[{"title":"Experience","link":"https:\/\/staticvar.dev\/about\/content\/experience\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/staticvar.dev\/about\/content\/experience\/","description":"<ul>\n<li><a href=\"https:\/\/mutualmobile.com\/\" title=\"MutualMobile\">Mutual Mobile | A Grid Dynamics Company<\/a> - <strong>Staff Engineer<\/strong> <em>(October 2025 \u2013 Present)<\/em><\/li>\n<li><a href=\"https:\/\/mutualmobile.com\/\" title=\"MutualMobile\">Mutual Mobile | A Grid Dynamics Company<\/a> - <strong>Senior Android Engineer I<\/strong> <em>(September 2022 \u2013 October 2025)<\/em><\/li>\n<li><a href=\"https:\/\/www.navana.ai\/\">Navana Tech<\/a> - <strong>Android Developer<\/strong> <em>(Feb 2021 \u2013 September 2023)<\/em><\/li>\n<li><a href=\"https:\/\/in.linkedin.com\/company\/openappliances\">OpenApp Private Limited<\/a> - <strong>Android Developer<\/strong> <em>(June 2019 \u2013 February 2021)<\/em><\/li>\n<\/ul>"},{"title":"Kotlin Coroutines Under the Hood - Dispatchers, Thread Pools, and Work Stealing","link":"https:\/\/staticvar.dev\/post\/kotlin-coroutines-under-the-hood\/","pubDate":"Sat, 21 Feb 2026 00:00:00 +0530","guid":"https:\/\/staticvar.dev\/post\/kotlin-coroutines-under-the-hood\/","description":"<h2 id=\"prerequisites-and-assumptions\">Prerequisites and assumptions<\/h2>\n<blockquote>\n<p><strong>Note:<\/strong> This article reflects how the kotlinx.coroutines scheduler works as of February 2026. Internal implementation details can change between releases.<\/p>\n<\/blockquote>\n<p>You have written Kotlin coroutines before. You know what <code>launch<\/code>, <code>async<\/code>, <code>withContext<\/code>, and <code>suspend<\/code> do at a basic level. You&rsquo;ve used <code>Dispatchers.Default<\/code>, <code>Dispatchers.IO<\/code>, and <code>Dispatchers.Main<\/code> in at least one project. This article is about the machinery underneath those abstractions.<\/p>"},{"title":"Agentic AI in 2026 - A Thinking Engineer's Field Guide","link":"https:\/\/staticvar.dev\/post\/agentic-ai-coding-2026\/","pubDate":"Sun, 11 Jan 2026 00:00:00 +0530","guid":"https:\/\/staticvar.dev\/post\/agentic-ai-coding-2026\/","description":"<h2 id=\"the-paradigm-shift-in-programming\">The paradigm shift in programming<\/h2>\n<p>We&rsquo;re living through one of the most significant transformations in how software gets written. The rise of <a href=\"#agentic-ai\">Agentic AI<\/a> has changed everything about the engineer&rsquo;s experience. Gone are the days when AI assistance meant autocomplete suggestions or simple code snippets. Today&rsquo;s AI agents can reason about codebases, execute multi-step tasks, browse documentation, and iterate on solutions autonomously.<\/p>"},{"title":"Kotlin's Plugin Discovery - Service Provider Interface Explained","link":"https:\/\/staticvar.dev\/post\/jvm-spi-plug-and-play\/","pubDate":"Sun, 05 Oct 2025 10:00:00 +0530","guid":"https:\/\/staticvar.dev\/post\/jvm-spi-plug-and-play\/","description":"<h2 id=\"prerequisites-and-assumptions\">Prerequisites and assumptions<\/h2>\n<p>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.<\/p>\n<p>Good reads and references<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/21\/docs\/api\/java.base\/java\/util\/ServiceLoader.html\">Official Java ServiceLoader documentation<\/a><\/li>\n<li><a href=\"https:\/\/ktor.io\/docs\/http-client-engines.html\">Ktor HTTP client engines<\/a> - real world SPI usage<\/li>\n<li><a href=\"https:\/\/www.slf4j.org\/manual.html#swapping\">SLF4J service provider<\/a> - logging backend discovery<\/li>\n<li>Source code: <code>java.util.ServiceLoader<\/code> in the JDK<\/li>\n<\/ul>\n<hr>\n<h2 id=\"what-you-get-with-spi\">What you get with SPI<\/h2>\n<p>The <a href=\"#service-provider-interface-spi\">Service Provider Interface<\/a> is a built-in JVM mechanism introduced in Java 6 for discovering and loading implementations at runtime. It&rsquo;s a registry where libraries announce &ldquo;I provide an implementation of X&rdquo; and applications ask &ldquo;give me all implementations of X&rdquo; without either side knowing concrete class names at compile time.<\/p>"},{"title":"Four Doors, One Party - K\/N, JNI, JNA & FFM","link":"https:\/\/staticvar.dev\/post\/kn-jni-jna-ffm\/","pubDate":"Sat, 13 Sep 2025 17:00:00 +0530","guid":"https:\/\/staticvar.dev\/post\/kn-jni-jna-ffm\/","description":"<blockquote>\n<p>Think of native power as a party. Kotlin can show up through four different doors: <a href=\"#kotlin-native\">Kotlin\/Native (K\/N)<\/a>, <a href=\"#java-native-interface\">JNI<\/a>, <a href=\"#java-native-access\">JNA<\/a> and <a href=\"#foreign-function-and-memory-api\">FFM<\/a>. Same venue, different guest lists. This guide explains which door to use, when and why.<\/p>\n<\/blockquote>\n<h2 id=\"good-reads\">Good reads<\/h2>\n<ul>\n<li><a href=\"https:\/\/kotlinlang.org\/docs\/native-overview.html\">Kotlin Native overview<\/a><\/li>\n<li><a href=\"https:\/\/kotlinlang.org\/docs\/native-c-interop.html\">Kotlin Native C interop guide <\/a><\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/technotes\/guides\/jni\/\">JNI specification and tutorial<\/a> (click on the JNI &lt;x.x&gt; Specification link)<\/li>\n<li><a href=\"https:\/\/github.com\/java-native-access\/jna\">JNA project and usage examples<\/a><\/li>\n<li>Foreign Function and Memory API (aka Project Panama)\n<a href=\"https:\/\/openjdk.org\/jeps\/442\">JEP 442 overview<\/a>, <a href=\"https:\/\/github.com\/openjdk\/jextract\">jextract tool<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/ndk\/guides\">Android NDK guides<\/a><\/li>\n<\/ul>\n<hr>\n<h2 id=\"party-floorplan-30-second-tour\">Party Floorplan (30 second tour)<\/h2>\n<pre tabindex=\"0\"><code class=\"language-mermaid\" data-lang=\"mermaid\">flowchart LR\n A[Kotlin code]\n KN[&#34;Kotlin Native&lt;br\/&gt;(AOT native binary)&#34;]\n JNI[&#34;JNI&lt;br\/&gt;(manual C\/C++ glue)&#34;]\n JNA[&#34;JNA&lt;br\/&gt;(no C glue, higher overhead)&#34;]\n FFM[&#34;FFM API&lt;br\/&gt;(Java 21+, safe and fast)&#34;]\n R((Native code or OS APIs))\n\n A --&gt;|Door 1| KN\n A --&gt;|Door 2| JNI\n A --&gt;|Door 3| JNA\n A --&gt;|Door 4| FFM\n KN --&gt; R\n JNI --&gt; R\n JNA --&gt; R\n FFM --&gt; R\n<\/code><\/pre><p><strong>What changes by door?<\/strong> Mostly the runtime you stand in, call overhead, memory rules, tooling and portability.<\/p>"},{"title":"From Source to Sorcery - Kotlin Native's Interop Magic","link":"https:\/\/staticvar.dev\/post\/kotlin-native-c-interop\/","pubDate":"Fri, 05 Sep 2025 16:05:00 +0530","guid":"https:\/\/staticvar.dev\/post\/kotlin-native-c-interop\/","description":"<h2 id=\"prerequisites-and-assumptions\">Prerequisites and assumptions<\/h2>\n<p>You are using the Kotlin Gradle DSL and the Kotlin Multiplatform plugin. You have a working C <a href=\"#toolchain\">toolchain<\/a> per OS. On macOS install Xcode command line tools or Homebrew. On Linux install <a href=\"#gcc\">GCC<\/a> or <a href=\"#clang\">Clang<\/a> and the development headers for the libraries you plan to use. On Windows install <a href=\"#msys2\">MSYS2<\/a> with <a href=\"#mingw\">MinGW<\/a> and ensure gcc and pkg config are in PATH.<\/p>"},{"title":"Detekt Convention Plugin","link":"https:\/\/staticvar.dev\/post\/detekt-convention-plugin\/","pubDate":"Sun, 01 Oct 2023 18:30:00 +0000","guid":"https:\/\/staticvar.dev\/post\/detekt-convention-plugin\/","description":"<h3 id=\"presumption-prerequisite-and-good-reads-\">Presumption, prerequisite and good reads \ud83d\udcd6<\/h3>\n<ul>\n<li>The code snippets shared here use <a href=\"https:\/\/docs.gradle.org\/current\/userguide\/platforms.html\" title=\"Gradle Version Catalog\">Gradle Version Catalog<\/a> and <a href=\"https:\/\/docs.gradle.org\/current\/userguide\/kotlin_dsl.html\" title=\"Kotlin Gradle DSL Primer\">Kotlin Gradle DSL<\/a><\/li>\n<li>Gradle <a href=\"https:\/\/docs.gradle.org\/current\/samples\/sample_convention_plugins.html\" title=\"Gradle Convention Plugin\">Convention Plugin<\/a><\/li>\n<li>Moving from <code>buildSrc<\/code> to <code>build-logic<\/code> <a href=\"https:\/\/developer.squareup.com\/blog\/herding-elephants\/\" title=\"Herding Elephants\">Herding Elephants - Square Developers<\/a><\/li>\n<li><a href=\"https:\/\/detekt.dev\/\">Detekt documentation<\/a><\/li>\n<\/ul>\n<h2 id=\"detekt-\">Detekt \ud83d\udd0d<\/h2>\n<p>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 <a href=\"https:\/\/github.com\/pinterest\/ktlint\" title=\"ktlint - An anti-bikeshedding Kotlin linter with built-in formatter\">ktlint<\/a>).\nIt&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.<\/p>"},{"title":"My Technology Stack","link":"https:\/\/staticvar.dev\/post\/technologies-stack\/","pubDate":"Fri, 29 Sep 2023 12:00:00 +0530","guid":"https:\/\/staticvar.dev\/post\/technologies-stack\/","description":"<h1 id=\"my-technology-stack\">My Technology Stack<\/h1>\n<p>Over the years as an Android developer, I&rsquo;ve worked with various technologies, frameworks, and architectural patterns. Here&rsquo;s an overview of my current technology stack and the tools I use in my day-to-day development.<\/p>\n<h2 id=\"programming-languages\">Programming Languages<\/h2>\n<h3 id=\"kotlin\">Kotlin<\/h3>\n<p>My primary language for Android development. Kotlin&rsquo;s concise syntax, null safety, and interoperability with Java make it an excellent choice for modern Android applications.<\/p>"},{"title":"Cleaning up the Navigation (Jetpack Compose)","link":"https:\/\/staticvar.dev\/post\/cleaner-navigation-using-jetpack-compose\/","pubDate":"Sat, 05 Jun 2021 18:30:00 +0000","guid":"https:\/\/staticvar.dev\/post\/cleaner-navigation-using-jetpack-compose\/","description":"<p>Prerequisite<\/p>\n<ul>\n<li>Basic understanding of Jetpack compose<\/li>\n<li>Familiarity with the navigation system of compose<\/li>\n<\/ul>\n<p>Suggested reads<\/p>\n<ul>\n<li><a href=\"https:\/\/developer.android.com\/jetpack\/compose\/navigation\" title=\"Navigating with compose\">Navigating with Compose<\/a><\/li>\n<li><a href=\"https:\/\/jossiwolf.medium.com\/navigating-in-jetpack-compose-78c78d365c6a\" title=\"Navigating in Jetpack Compose\">Navigating in Jetpack Compose<\/a><\/li>\n<\/ul>\n<p>Jetpack compose has been out for a while now and so is the navigation system, it&rsquo;s simple and direct.<\/p>\n<p>A simple implementation of navigation would look something like<\/p>"},{"title":"AlarmManager for Android Oreo and above","link":"https:\/\/staticvar.dev\/post\/alarm-manager-oreo-above\/","pubDate":"Tue, 05 Jan 2021 18:30:00 +0000","guid":"https:\/\/staticvar.dev\/post\/alarm-manager-oreo-above\/","description":"<p>Android is getting mature with every major release and we are heading towards more user-centric and privacy first Operating System.<\/p>\n<p>Android Oreo was released back in 2018, one of the major changes were related to <a href=\"https:\/\/developer.android.com\/about\/versions\/oreo\/background\" title=\"Android Oreo background limitations\">background limitations<\/a> 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.<\/p>"}]}}