<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://harsha-kadekar.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://harsha-kadekar.github.io/" rel="alternate" type="text/html" /><updated>2026-08-15T22:42:44+00:00</updated><id>https://harsha-kadekar.github.io/feed.xml</id><title type="html">Smṛti</title><subtitle>That which is remembered. Generated from thoughts &amp; memory.
</subtitle><author><name>Harsha Kadekar</name></author><entry><title type="html">Book-Summary - Anything You Want</title><link href="https://harsha-kadekar.github.io/book-summary-anything-you-want.html" rel="alternate" type="text/html" title="Book-Summary - Anything You Want" /><published>2026-08-15T00:00:00+00:00</published><updated>2026-08-15T00:00:00+00:00</updated><id>https://harsha-kadekar.github.io/book-summary---anything-you-want</id><content type="html" xml:base="https://harsha-kadekar.github.io/book-summary-anything-you-want.html"><![CDATA[<ul>
  <li>Author: <strong>Derek Sivers</strong></li>
  <li>GoodReads: <a href="https://www.goodreads.com/book/show/11878168-anything-you-want">Anything You Want</a></li>
</ul>

<p>I follow Derek Sivers. I got introduced to him via his blog (I do not remember how I got his blog reference though - maybe via DHH blogs). I like many of his blog posts. They are short posts, simple in the content and profound in its teaching. This book follows a similar pattern. This is targeted at entrepreneurs. It has around 40 chapters based on his experience of running the CD Baby company.</p>

<p>The thing that stood out was that many of the decisions taken by him are grounded in very simple desires. Based on these simple desires, the company was run in a unique way, much different from what I expected from a technology startup. There is this belief that as a startup, you need to think big and constantly expand. As you expand, your needs change, you need to evolve, and to a certain extent even the customers change. But for CD Baby, that wasn’t the case. The company’s growth was very natural: based on the problem faced, a solution was invented, and that itself became a monetization channel for the company (example - building the servers and renting them out). He actively wanted a small company so that he could cater to those customers who could not be served by distributors. He loved writing code even when he was running a company of 75-80 employees.</p>

<p>With all these crazy startup stories in the current age about various technologies and the need to grow fast or think big, Anything You Want is an antidote for that. It helps bring our minds back to thinking of customers first, solving the simplest problems customers are in pain over, and remembering that, at the end of the day, it is your world you are creating and hence you should enjoy what you like. I also feel the book itself projects that journey as too simplistic, but I believe there were a lot of challenges (example — coming to the selling decision, hiring and letting go, the tussle with Apple).</p>

<p>I strongly recommend reading this book for anyone who is an entrepreneur or wants to become one.</p>

<p>My <a href="https://www.harsha-kadekar.blog/my-personal-book-read-tracking-system.html">personal rating of this book</a> is:</p>
<ul>
  <li>Category: Entrepreneurship</li>
  <li>Rating: 5/5</li>
</ul>

<hr />
<p>I have used an LLM to review the write-up, fix grammatical errors, and iron out any awkward sentences.</p>]]></content><author><name>Harsha Kadekar</name></author><category term="Book-Summary" /><summary type="html"><![CDATA[Author: Derek Sivers GoodReads: Anything You Want]]></summary></entry><entry><title type="html">My Personal Book Read Tracking System</title><link href="https://harsha-kadekar.github.io/my-personal-book-read-tracking-system.html" rel="alternate" type="text/html" title="My Personal Book Read Tracking System" /><published>2026-08-15T00:00:00+00:00</published><updated>2026-08-15T00:00:00+00:00</updated><id>https://harsha-kadekar.github.io/my-personal-book-read-tracking-system</id><content type="html" xml:base="https://harsha-kadekar.github.io/my-personal-book-read-tracking-system.html"><![CDATA[<p>I like to read books. The usual rate of my book reading is 1 book per month. As of now, I use Zoho Sheets to keep track of all the books I want to read, already read and currently reading. 
The tracking sheet has following information of the books I am tracking</p>
<ul>
  <li>Title
    <ul>
      <li>Title Of the Book</li>
    </ul>
  </li>
  <li>Authors
    <ul>
      <li>Authors of the Book</li>
    </ul>
  </li>
  <li>Bought - YES/NO
    <ul>
      <li>Whether I own the copy of the book or not</li>
    </ul>
  </li>
  <li>Read Status - To Read/Currently Reading/Read
    <ul>
      <li>current state of the book reading</li>
    </ul>
  </li>
  <li>Country - India/Other
    <ul>
      <li>Is the book primarily published in India (to make a decision of where to buy it)</li>
    </ul>
  </li>
  <li>Reference Count
    <ul>
      <li>how many references I have got for the book. More references means more preferred pick for reading next.</li>
    </ul>
  </li>
  <li>Reference Source - Office/Blog/X/Podcast/Search/Personal Recommendation/Random
    <ul>
      <li>From where the recommendations are coming in. This will help to decide which book to pick for reading</li>
    </ul>
  </li>
  <li>Comments
    <ul>
      <li>Usually gives more details of the reference source. Actual source like x link or podcast reference. Again helps with book reading decision.</li>
    </ul>
  </li>
  <li>Language
    <ul>
      <li>Language of the book. I primarily read either English or Kannada. Sometimes I get recommendations of other languages usually Indian language books.</li>
    </ul>
  </li>
  <li>For Kids -  YES/NO
    <ul>
      <li>Is this a book for kids that I want to buy and give it.</li>
    </ul>
  </li>
  <li>Category
    <ul>
      <li>This puts the book in a certain topic. There is no list of known topics rather which ever I feel this book resonated with.</li>
    </ul>
  </li>
  <li>Category Rating
    <ul>
      <li>Within that category how does this book stand in my view. The rating system I have explained below.</li>
    </ul>
  </li>
  <li>Links In My blog
    <ul>
      <li>This links my blog posts that is referring this book.</li>
    </ul>
  </li>
</ul>

<p>For external reference, I also mark the currently reading book in <a href="https://www.goodreads.com/user/show/38141133-harsha-kadekar">GoodReads</a> as well as in my <a href="https://www.harsha-kadekar.blog/now">personal blog</a>.</p>

<h2 id="rating-system">Rating System</h2>

<p>This is a rating system I use to put the book in particular sorting that is applicable to me.</p>

<ul>
  <li><strong>5 - Must Read</strong> - want to read multiple Times/lots of learning/enjoyed</li>
  <li><strong>4 - Good Read</strong> - Lots of learning/single time read/enjoyed</li>
  <li><strong>3 - Okay Read</strong> - some learning/single time read/passed through</li>
  <li><strong>2 - Not Bad Read</strong> - single time read/no learning/passed through</li>
  <li><strong>1 - Bad Read</strong> - could not complete /wrong teachings/negative/not applicable to me</li>
</ul>

<h2 id="future">Future</h2>

<p>There is a future plan to display this whole tracking sheet in my personal blog. I have just started this system and I will evolve it as I use it more.</p>

<hr />]]></content><author><name>Harsha Kadekar</name></author><category term="Personal-System" /><summary type="html"><![CDATA[I like to read books. The usual rate of my book reading is 1 book per month. As of now, I use Zoho Sheets to keep track of all the books I want to read, already read and currently reading. The tracking sheet has following information of the books I am tracking Title Title Of the Book Authors Authors of the Book Bought - YES/NO Whether I own the copy of the book or not Read Status - To Read/Currently Reading/Read current state of the book reading Country - India/Other Is the book primarily published in India (to make a decision of where to buy it) Reference Count how many references I have got for the book. More references means more preferred pick for reading next. Reference Source - Office/Blog/X/Podcast/Search/Personal Recommendation/Random From where the recommendations are coming in. This will help to decide which book to pick for reading Comments Usually gives more details of the reference source. Actual source like x link or podcast reference. Again helps with book reading decision. Language Language of the book. I primarily read either English or Kannada. Sometimes I get recommendations of other languages usually Indian language books. For Kids - YES/NO Is this a book for kids that I want to buy and give it. Category This puts the book in a certain topic. There is no list of known topics rather which ever I feel this book resonated with. Category Rating Within that category how does this book stand in my view. The rating system I have explained below. Links In My blog This links my blog posts that is referring this book.]]></summary></entry><entry><title type="html">Book-Summary - Classic Tales From India</title><link href="https://harsha-kadekar.github.io/book-summary-classic-tales-from-india.html" rel="alternate" type="text/html" title="Book-Summary - Classic Tales From India" /><published>2026-07-28T00:00:00+00:00</published><updated>2026-07-28T00:00:00+00:00</updated><id>https://harsha-kadekar.github.io/book-summary---classic-tales-from-india</id><content type="html" xml:base="https://harsha-kadekar.github.io/book-summary-classic-tales-from-india.html"><![CDATA[<ul>
  <li>Author: <strong>Vatsala Sperling, Harish Johari</strong></li>
  <li>GoodReads: <a href="https://www.goodreads.com/book/show/49930921-classic-tales-from-india">Classic Tales from India: How Ganesh Got His Elephant Head and Other Stories</a></li>
</ul>

<p>I picked up this book at the library. We usually go there to pick up suspense fiction for my wife and some toddler books for my daughter. As I was browsing the children’s aisle, I spotted this one shelved under children’s books. Since it was related to India and Indian mythology, it piqued my interest.</p>

<p><em>Classic Tales from India</em> collects several stories drawn from various Puranas. They’re narrated for a child audience — specifically, in a style suited to a child growing up in the United States today. Each story is kept short but still manages to convey a fair bit of detail. The real highlight of the book is the artwork: traditional Indian art styles that make the pages stand out and add a lot of visual appeal.</p>

<p>What I didn’t like: the stories drawn from the Ramayana and Mahabharata deviate in places from Valmiki’s Ramayana and Vyasa’s Mahabharata. This is most likely because these versions were sourced from later Puranas rather than the original epics, but the book never says so. It would have helped a lot if each story credited its specific source.</p>

<p>Overall, it’s a good book to give younger children a brief introduction to Indian Puranic stories.</p>

<hr />
<p>I have used LLM for reviewing the write up, fix grammatical errors and iron out any awkward sentences.</p>]]></content><author><name>Harsha Kadekar</name></author><category term="Book-Summary" /><summary type="html"><![CDATA[Author: Vatsala Sperling, Harish Johari GoodReads: Classic Tales from India: How Ganesh Got His Elephant Head and Other Stories]]></summary></entry><entry><title type="html">My Obsidian Settings</title><link href="https://harsha-kadekar.github.io/my-obsidian-settings.html" rel="alternate" type="text/html" title="My Obsidian Settings" /><published>2026-06-20T00:00:00+00:00</published><updated>2026-06-20T00:00:00+00:00</updated><id>https://harsha-kadekar.github.io/my-obsidian-settings</id><content type="html" xml:base="https://harsha-kadekar.github.io/my-obsidian-settings.html"><![CDATA[<p>I use <a href="https://obsidian.md">Obsidian</a> to capture notes, thoughts and tasks. In this post, I want to note down the settings I use in Obsidian so that, next time I configure a new system, I can just reference this.</p>

<p>My operating system is <a href="https://ubuntu.com/download/desktop">Ubuntu</a>. So, these instructions are specific for that operating system.</p>

<h2 id="installation">Installation</h2>

<p>Install Obsidian by downloading the deb file from https://obsidian.md/download. Sometimes, the Obsidian Web Clipper does not work with the one installed from the snap/Ubuntu Software. Hence, install it using the deb file directly.</p>

<h2 id="settings">Settings</h2>

<p>These are the settings. I’m only listing settings that differ from the defaults.</p>
<ul>
  <li>General
    <ul>
      <li>Log in to get the Catalyst license</li>
      <li>Enable <code class="language-plaintext highlighter-rouge">Command Line Interface</code></li>
      <li>Enable <code class="language-plaintext highlighter-rouge">Receive Early Access Versions</code></li>
    </ul>
  </li>
  <li>Editor
    <ul>
      <li>Spell Check Languages
        <ul>
          <li>English (United States)</li>
          <li>English (United Kingdom)</li>
          <li>Hindi</li>
        </ul>
      </li>
    </ul>
  </li>
  <li>Files and Links
    <ul>
      <li>Default location for new attachments: <code class="language-plaintext highlighter-rouge">In the folder specified below</code>
        <ul>
          <li><code class="language-plaintext highlighter-rouge">Attachments</code></li>
        </ul>
      </li>
      <li>Automatically update internal links: <code class="language-plaintext highlighter-rouge">True</code></li>
    </ul>
  </li>
  <li>Appearance
    <ul>
      <li>Theme: I change it after every few days. I can start with <code class="language-plaintext highlighter-rouge">Minimal</code></li>
      <li>Disable <code class="language-plaintext highlighter-rouge">Inline Title</code></li>
    </ul>
  </li>
  <li>Core Plugins
    <ul>
      <li>Following core plugins are switched off
        <ul>
          <li>Audio Recorder</li>
          <li>Publish</li>
          <li>Random Note</li>
          <li>Slash Commands</li>
          <li>Slides</li>
          <li>Sync</li>
          <li>Unique Note Creator</li>
          <li>Workspaces</li>
        </ul>
      </li>
    </ul>
  </li>
  <li>Community Plugins
    <ul>
      <li>Turn off Restricted Mode</li>
      <li>Enable <code class="language-plaintext highlighter-rouge">Automatically Check for Plugin Updates</code></li>
      <li>I use following community plugins
        <ul>
          <li>Advanced Tables</li>
          <li>Automatic List Management</li>
          <li>Calendar</li>
          <li>Charts</li>
          <li>Dataview</li>
          <li>Excalidraw</li>
          <li>Git</li>
          <li>Homepage</li>
          <li>Reminder</li>
          <li>Tag Wrangler</li>
          <li>Tasks</li>
          <li>Templater</li>
        </ul>
      </li>
    </ul>
  </li>
</ul>

<h2 id="core-plugin-settings">Core Plugin Settings</h2>

<h3 id="daily-notes">Daily Notes</h3>
<ul>
  <li>New file location: <code class="language-plaintext highlighter-rouge">DailyNotes</code></li>
  <li>Template file location: <code class="language-plaintext highlighter-rouge">Templates/Template_DailyNotes</code></li>
  <li>Date format: <code class="language-plaintext highlighter-rouge">YYYY-MM-DD</code></li>
</ul>

<h3 id="templates">Templates</h3>
<ul>
  <li>Template folder location: <code class="language-plaintext highlighter-rouge">Templates</code></li>
</ul>

<h2 id="community-plugin-settings">Community Plugin Settings</h2>

<p>Apart from the ones listed below, remaining plugins (Advanced Tables, Charts, Dataview, Excalidraw, Reminder, Tag Wrangler, Tasks) work well with their default settings.</p>

<h3 id="automatic-list-management">Automatic List Management</h3>
<ul>
  <li>Turn off: <code class="language-plaintext highlighter-rouge">Auto Sort On Changes</code></li>
</ul>

<h3 id="calendar">Calendar</h3>
<ul>
  <li>Words Per Dot: <code class="language-plaintext highlighter-rouge">2048</code></li>
</ul>

<h3 id="git">Git</h3>
<ul>
  <li>Auto commit-and-sync interval: <code class="language-plaintext highlighter-rouge">60</code></li>
  <li>Auto commit-and-sync after stopping file edits: <code class="language-plaintext highlighter-rouge">On</code></li>
  <li>Pull on startup: <code class="language-plaintext highlighter-rouge">On</code></li>
</ul>

<h3 id="homepage">Homepage</h3>
<ul>
  <li>Turn on <code class="language-plaintext highlighter-rouge">Pin</code></li>
  <li>Homepage view: <code class="language-plaintext highlighter-rouge">Reading View</code></li>
</ul>

<h3 id="templater">Templater</h3>
<ul>
  <li>Template folder location: <code class="language-plaintext highlighter-rouge">Templates</code></li>
</ul>

<h2 id="related-posts">Related Posts</h2>

<ul>
  <li><a href="https://www.harsha-kadekar.blog/my-personal-laptop-setup.html">My Personal Laptop Setup</a></li>
  <li><a href="https://www.harsha-kadekar.blog/my-obsidian-setup.html">My Obsidian Vault</a></li>
  <li><a href="https://www.harsha-kadekar.blog/my-development-configuration.html">My Development Configuration</a></li>
</ul>

<hr />]]></content><author><name>Harsha Kadekar</name></author><category term="Technical" /><category term="setup" /><category term="obsidian" /><summary type="html"><![CDATA[I use Obsidian to capture notes, thoughts and tasks. In this post, I want to note down the settings I use in Obsidian so that, next time I configure a new system, I can just reference this.]]></summary></entry><entry><title type="html">Book-Summary - How To Love In Sanskrit</title><link href="https://harsha-kadekar.github.io/book-summary-how-to-love-in-sanskrit.html" rel="alternate" type="text/html" title="Book-Summary - How To Love In Sanskrit" /><published>2026-06-06T00:00:00+00:00</published><updated>2026-06-06T00:00:00+00:00</updated><id>https://harsha-kadekar.github.io/book-summary-how-to-love-in-sanskrit</id><content type="html" xml:base="https://harsha-kadekar.github.io/book-summary-how-to-love-in-sanskrit.html"><![CDATA[<ul>
  <li>Author: <strong>Anusha Rao</strong>, <strong>Suhas Mahesh</strong></li>
  <li>GoodReads: <a href="https://www.goodreads.com/book/show/205425671-how-to-love-in-sanskrit">How to Love in Sanskrit</a></li>
</ul>

<p><a href="https://www.goodreads.com/book/show/205425671-how-to-love-in-sanskrit">How to Love In Sanskrit</a> was a surprise read. I did not expect much from the book when I picked it up. The title was also very intriguing in that I could not categorize it into a particular type of book. It lists Sanskrit poem translations related to love. The twist is, these translations are not word-to-word translations. Rather, these are translated to convey the same meaning but in a modern context. That brings out the liveliness of the poems and makes it easy to connect with them. Here are a few examples:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>She calls me hard-hearted. She should know. 
The moment I set eyes on her, she stole my heart and took it home with her.
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>I was you
and you were me.

What transpired
that now we see

you as you
and me as me?
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>She has no need for words:
her eyes
do a fine job already
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>I am he, you are she
You are verse, I am song.
I am heaven, you are earth
Let us live as one
and bring children into this world.
</code></pre></div></div>

<p>It made me realize the feelings about love, about separation, about flirting are the same across ages. The language of expression changes but that feeling remains the same then, now, and in the future.</p>

<p>An interesting feature of this collection is that each poem is accompanied by its source. A few of the texts, such as the Ramayana, Mahabharata, and Atharvaveda, were familiar to me, but most were not. Reading these poems also created a desire to read those Sanskrit, Prakrit, and other classical language books. I would also like to read those books not as word-to-word translations, but as modern contextual ones, which are far more enjoyable and relatable. Yes, word-to-word translation is interesting for understanding the language, but I want to feel those thoughts in these books. The brief descriptions of the source texts were another highlight. One example that stayed with me was Bawd’s Counsel by Damodaragupta, dated to around 800 CE, which is described as a work centered on ordinary people in an urban city. I had often assumed older texts would focus mostly on gods, kings, and queens, so this was a surprise. That made me curious to read more of such works and see what has changed, and what has remained familiar, across the centuries.</p>

<p>I strongly recommend this book and it is also a very nice book to give as a gift to your spouse, a newlywed, or anyone in love.</p>

<hr />
<ul>
  <li>I have used LLM agents to review the draft. I have also taken help with rewording and rephrasing the sentences.</li>
</ul>]]></content><author><name>Harsha Kadekar</name></author><category term="Book-Summary" /><summary type="html"><![CDATA[Author: Anusha Rao, Suhas Mahesh GoodReads: How to Love in Sanskrit]]></summary></entry><entry><title type="html">How Bad Can Java’s Stop-the-World Pauses Get? (And How Does Rust Compare?)</title><link href="https://harsha-kadekar.github.io/how-bad-can-java-s-stop-the-world-pauses-get-and-how-does-rust-compare.html" rel="alternate" type="text/html" title="How Bad Can Java’s Stop-the-World Pauses Get? (And How Does Rust Compare?)" /><published>2026-05-20T00:00:00+00:00</published><updated>2026-05-20T00:00:00+00:00</updated><id>https://harsha-kadekar.github.io/how-bad-can-java-s-stop-the-world-pauses-get---and-how-does-rust-compare--</id><content type="html" xml:base="https://harsha-kadekar.github.io/how-bad-can-java-s-stop-the-world-pauses-get-and-how-does-rust-compare.html"><![CDATA[<p>I recently read <a href="https://lemire.me/blog/2026/02/15/how-bad-can-python-stop-the-world-pauses-get/">(How bad can Python stop-the-world pauses get?)</a>. It describes a way to demonstrate how Python’s garbage collector will pause the application in order to claim back the memory. There is no deterministic way to know when this will trigger. Hence, this can lead to unexpected latency in the application. It gives a simple Python program to demonstrate it.</p>

<p>I wanted to understand how this would work out in a Java program. I wanted to compare it with a Rust program execution where there is no garbage collector.</p>

<p>For this experiment, I used the following Java version with the default G1 garbage collector.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>openjdk version "26" 2026-03-17
OpenJDK Runtime Environment (build 26+35-2893)
OpenJDK 64-Bit Server VM (build 26+35-2893, mixed mode, sharing)
</code></pre></div></div>

<p>Here is the Java program</p>

<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code>

<span class="kn">import</span> <span class="nn">java.time.Duration</span><span class="o">;</span>
<span class="kn">import</span> <span class="nn">java.time.Instant</span><span class="o">;</span>

<span class="kd">class</span> <span class="nc">Node</span> <span class="o">{</span>

    <span class="kd">private</span> <span class="kt">int</span> <span class="n">value</span><span class="o">;</span>
    <span class="kd">private</span> <span class="nc">Node</span> <span class="n">next</span><span class="o">;</span>

    <span class="kd">public</span> <span class="nf">Node</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">this</span><span class="o">.</span><span class="na">next</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
        <span class="k">this</span><span class="o">.</span><span class="na">value</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
    <span class="o">}</span>

    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">addNext</span><span class="o">(</span><span class="nc">Node</span> <span class="n">node</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">this</span><span class="o">.</span><span class="na">next</span> <span class="o">=</span> <span class="n">node</span><span class="o">;</span>
    <span class="o">}</span>

    <span class="kd">public</span> <span class="nc">Node</span> <span class="nf">getNext</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">return</span> <span class="k">this</span><span class="o">.</span><span class="na">next</span><span class="o">;</span>
    <span class="o">}</span>

    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">setValue</span><span class="o">(</span><span class="kt">int</span> <span class="n">value</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">this</span><span class="o">.</span><span class="na">value</span> <span class="o">=</span> <span class="n">value</span><span class="o">;</span>
    <span class="o">}</span>

    <span class="kd">public</span> <span class="kt">int</span> <span class="nf">getValue</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">return</span> <span class="n">value</span><span class="o">;</span>
    <span class="o">}</span>
<span class="o">}</span>



<span class="kd">class</span> <span class="nc">StopTheWorld</span> <span class="o">{</span>

    <span class="kd">public</span> <span class="kd">static</span> <span class="nc">Node</span> <span class="nf">createLinkedList</span><span class="o">(</span><span class="kt">int</span> <span class="n">limit</span><span class="o">)</span> <span class="o">{</span>
        <span class="nc">Node</span> <span class="n">headNode</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Node</span><span class="o">();</span>
        <span class="n">headNode</span><span class="o">.</span><span class="na">setValue</span><span class="o">(</span><span class="mi">0</span><span class="o">);</span>
        <span class="nc">Node</span> <span class="n">current</span> <span class="o">=</span> <span class="n">headNode</span><span class="o">;</span>

        <span class="k">for</span> <span class="o">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">limit</span><span class="o">;</span> <span class="n">i</span><span class="o">++)</span> <span class="o">{</span>
            <span class="nc">Node</span> <span class="n">newNode</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Node</span><span class="o">();</span>
            <span class="n">newNode</span><span class="o">.</span><span class="na">setValue</span><span class="o">(</span><span class="n">i</span><span class="o">);</span>
            <span class="n">current</span><span class="o">.</span><span class="na">addNext</span><span class="o">(</span><span class="n">newNode</span><span class="o">);</span>
            <span class="n">current</span> <span class="o">=</span> <span class="n">newNode</span><span class="o">;</span>
        <span class="o">}</span>

        <span class="k">return</span> <span class="n">headNode</span><span class="o">;</span>
    <span class="o">}</span>

    <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="nc">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="o">{</span>
        <span class="nc">Instant</span> <span class="n">start</span> <span class="o">=</span> <span class="nc">Instant</span><span class="o">.</span><span class="na">now</span><span class="o">();</span>
        <span class="nc">Instant</span> <span class="n">initStart</span> <span class="o">=</span> <span class="nc">Instant</span><span class="o">.</span><span class="na">now</span><span class="o">();</span>
        <span class="nc">Node</span> <span class="n">linkedList</span> <span class="o">=</span> <span class="n">createLinkedList</span><span class="o">(</span><span class="mi">50_000_000</span><span class="o">);</span>
        <span class="kt">long</span> <span class="n">initTime</span> <span class="o">=</span> <span class="nc">Duration</span><span class="o">.</span><span class="na">between</span><span class="o">(</span><span class="n">initStart</span><span class="o">,</span> <span class="nc">Instant</span><span class="o">.</span><span class="na">now</span><span class="o">()).</span><span class="na">toNanos</span><span class="o">()</span> <span class="o">/</span> <span class="mi">1000</span><span class="o">;</span>
        <span class="nc">Instant</span> <span class="n">oldStart</span> <span class="o">=</span> <span class="nc">Instant</span><span class="o">.</span><span class="na">now</span><span class="o">();</span>
        <span class="kt">long</span> <span class="n">delay</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
        <span class="kt">long</span> <span class="n">worstCase</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
        <span class="kt">long</span> <span class="n">createTime</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
        <span class="kt">long</span> <span class="n">worstCreateTime</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
        <span class="nc">Instant</span> <span class="n">loopStart</span> <span class="o">=</span> <span class="nc">Instant</span><span class="o">.</span><span class="na">now</span><span class="o">();</span>
        <span class="k">for</span> <span class="o">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="mi">1000000</span><span class="o">;</span> <span class="n">i</span><span class="o">++)</span> <span class="o">{</span>
            <span class="nc">Instant</span> <span class="n">min_start</span> <span class="o">=</span> <span class="nc">Instant</span><span class="o">.</span><span class="na">now</span><span class="o">();</span>
            <span class="kt">long</span> <span class="n">value</span> <span class="o">=</span> <span class="nc">Duration</span><span class="o">.</span><span class="na">between</span><span class="o">(</span><span class="n">oldStart</span><span class="o">,</span> <span class="n">min_start</span><span class="o">).</span><span class="na">toNanos</span><span class="o">()</span> <span class="o">/</span> <span class="mi">1000</span><span class="o">;</span>
            <span class="k">if</span> <span class="o">(</span><span class="n">value</span> <span class="o">&gt;</span> <span class="n">worstCase</span><span class="o">)</span> <span class="o">{</span>
                <span class="n">worstCase</span> <span class="o">=</span> <span class="n">value</span><span class="o">;</span>
            <span class="o">}</span>
            <span class="n">delay</span> <span class="o">+=</span> <span class="n">value</span><span class="o">;</span>
            <span class="nc">Instant</span> <span class="n">createStart</span> <span class="o">=</span> <span class="nc">Instant</span><span class="o">.</span><span class="na">now</span><span class="o">();</span>
            <span class="n">createLinkedList</span><span class="o">(</span><span class="mi">1000</span><span class="o">);</span>
            <span class="kt">long</span> <span class="n">thisCreateTime</span> <span class="o">=</span> <span class="nc">Duration</span><span class="o">.</span><span class="na">between</span><span class="o">(</span><span class="n">createStart</span><span class="o">,</span> <span class="nc">Instant</span><span class="o">.</span><span class="na">now</span><span class="o">()).</span><span class="na">toNanos</span><span class="o">()</span> <span class="o">/</span> <span class="mi">1000</span><span class="o">;</span>
            <span class="k">if</span> <span class="o">(</span><span class="n">thisCreateTime</span> <span class="o">&gt;</span> <span class="n">worstCreateTime</span><span class="o">)</span> <span class="o">{</span>
                <span class="n">worstCreateTime</span> <span class="o">=</span> <span class="n">thisCreateTime</span><span class="o">;</span>
            <span class="o">}</span>
            <span class="n">createTime</span> <span class="o">+=</span> <span class="n">thisCreateTime</span><span class="o">;</span>
            <span class="n">oldStart</span> <span class="o">=</span> <span class="n">min_start</span><span class="o">;</span>
        <span class="o">}</span>
        <span class="kt">long</span> <span class="n">loopTime</span> <span class="o">=</span> <span class="nc">Duration</span><span class="o">.</span><span class="na">between</span><span class="o">(</span><span class="n">loopStart</span><span class="o">,</span> <span class="nc">Instant</span><span class="o">.</span><span class="na">now</span><span class="o">()).</span><span class="na">toNanos</span><span class="o">()</span> <span class="o">/</span> <span class="mi">1000</span><span class="o">;</span>
        <span class="nc">Instant</span> <span class="n">end</span> <span class="o">=</span> <span class="nc">Instant</span><span class="o">.</span><span class="na">now</span><span class="o">();</span>
        <span class="nc">Duration</span> <span class="n">elapsed</span> <span class="o">=</span> <span class="nc">Duration</span><span class="o">.</span><span class="na">between</span><span class="o">(</span><span class="n">start</span><span class="o">,</span> <span class="n">end</span><span class="o">);</span>
        <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Elapsed: "</span> <span class="o">+</span> <span class="n">elapsed</span><span class="o">.</span><span class="na">toMillis</span><span class="o">()</span> <span class="o">+</span> <span class="s">" ms"</span><span class="o">);</span>
        <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Initial 50M list create time: "</span> <span class="o">+</span> <span class="n">initTime</span> <span class="o">+</span> <span class="s">" µs"</span><span class="o">);</span>
        <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Total For Loop time (1M x 1K): "</span> <span class="o">+</span> <span class="n">loopTime</span> <span class="o">+</span> <span class="s">" µs"</span><span class="o">);</span>
        <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Total Delays between iteration: "</span> <span class="o">+</span> <span class="n">delay</span> <span class="o">+</span> <span class="s">" µs"</span><span class="o">);</span>
        <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Worst Gap is: "</span> <span class="o">+</span> <span class="n">worstCase</span> <span class="o">+</span> <span class="s">" µs"</span><span class="o">);</span>
        <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Total Create time: "</span> <span class="o">+</span> <span class="n">createTime</span> <span class="o">+</span> <span class="s">" µs"</span><span class="o">);</span>
        <span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Worst Create time: "</span> <span class="o">+</span> <span class="n">worstCreateTime</span> <span class="o">+</span> <span class="s">" µs"</span><span class="o">);</span>
    <span class="o">}</span>
<span class="o">}</span>

</code></pre></div></div>

<p>Here is the output of the Java program.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>➜  simple-programs java StopTheWorld
Elapsed: 7670 ms
Initial 50M list create time: 2622048 µs
Total For Loop time (1M x 1K): 5048015 µs
Total Delays between iteration: 4711094 µs
Worst Gap is: 565162 µs
Total Create time: 4568381 µs
Worst Create time: 565142 µs
</code></pre></div></div>

<p>For Rust, I used <code class="language-plaintext highlighter-rouge">rustc 1.93.0 (254b59607 2026-01-19)</code>. Here is the equivalent Rust program.</p>

<div class="language-rust highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">use</span> <span class="nn">std</span><span class="p">::</span><span class="nn">time</span><span class="p">::</span><span class="n">Instant</span><span class="p">;</span>

<span class="k">struct</span> <span class="n">Node</span> <span class="p">{</span>
    <span class="n">value</span><span class="p">:</span> <span class="nb">i32</span><span class="p">,</span>
    <span class="n">next</span><span class="p">:</span> <span class="nb">Option</span><span class="o">&lt;</span><span class="nb">Box</span><span class="o">&lt;</span><span class="n">Node</span><span class="o">&gt;&gt;</span><span class="p">,</span>
<span class="p">}</span>

<span class="k">impl</span> <span class="n">Node</span> <span class="p">{</span>
    <span class="k">fn</span> <span class="nf">new</span><span class="p">(</span><span class="n">value</span><span class="p">:</span> <span class="nb">i32</span><span class="p">)</span> <span class="k">-&gt;</span> <span class="k">Self</span> <span class="p">{</span>
        <span class="n">Node</span> <span class="p">{</span> <span class="n">value</span><span class="p">,</span> <span class="n">next</span><span class="p">:</span> <span class="nb">None</span> <span class="p">}</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="k">impl</span> <span class="nb">Drop</span> <span class="k">for</span> <span class="n">Node</span> <span class="p">{</span>
    <span class="k">fn</span> <span class="nf">drop</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span> <span class="k">self</span><span class="p">)</span> <span class="p">{</span>
        <span class="k">let</span> <span class="k">mut</span> <span class="n">current</span> <span class="o">=</span> <span class="k">self</span><span class="py">.next</span><span class="nf">.take</span><span class="p">();</span>
        <span class="k">while</span> <span class="k">let</span> <span class="nf">Some</span><span class="p">(</span><span class="k">mut</span> <span class="n">node</span><span class="p">)</span> <span class="o">=</span> <span class="n">current</span> <span class="p">{</span>
            <span class="n">current</span> <span class="o">=</span> <span class="n">node</span><span class="py">.next</span><span class="nf">.take</span><span class="p">();</span>
        <span class="p">}</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="k">fn</span> <span class="nf">create_linked_list</span><span class="p">(</span><span class="n">limit</span><span class="p">:</span> <span class="nb">i32</span><span class="p">)</span> <span class="k">-&gt;</span> <span class="nb">Box</span><span class="o">&lt;</span><span class="n">Node</span><span class="o">&gt;</span> <span class="p">{</span>
    <span class="k">let</span> <span class="k">mut</span> <span class="n">head</span> <span class="o">=</span> <span class="nn">Box</span><span class="p">::</span><span class="nf">new</span><span class="p">(</span><span class="nn">Node</span><span class="p">::</span><span class="nf">new</span><span class="p">(</span><span class="mi">0</span><span class="p">));</span>
    <span class="k">let</span> <span class="k">mut</span> <span class="n">current</span><span class="p">:</span> <span class="o">*</span><span class="k">mut</span> <span class="n">Node</span> <span class="o">=</span> <span class="o">&amp;</span><span class="k">mut</span> <span class="o">*</span><span class="n">head</span><span class="p">;</span>

    <span class="k">for</span> <span class="n">i</span> <span class="k">in</span> <span class="mi">0</span><span class="o">..</span><span class="n">limit</span> <span class="p">{</span>
        <span class="k">let</span> <span class="n">new_node</span> <span class="o">=</span> <span class="nn">Box</span><span class="p">::</span><span class="nf">new</span><span class="p">(</span><span class="nn">Node</span><span class="p">::</span><span class="nf">new</span><span class="p">(</span><span class="n">i</span><span class="p">));</span>
        <span class="k">unsafe</span> <span class="p">{</span>
            <span class="p">(</span><span class="o">*</span><span class="n">current</span><span class="p">)</span><span class="py">.next</span> <span class="o">=</span> <span class="nf">Some</span><span class="p">(</span><span class="n">new_node</span><span class="p">);</span>
            <span class="n">current</span> <span class="o">=</span> <span class="o">&amp;</span><span class="k">mut</span> <span class="o">**</span><span class="p">(</span><span class="o">*</span><span class="n">current</span><span class="p">)</span><span class="py">.next</span><span class="nf">.as_mut</span><span class="p">()</span><span class="nf">.unwrap</span><span class="p">();</span>
        <span class="p">}</span>
    <span class="p">}</span>

    <span class="n">head</span>
<span class="p">}</span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
    <span class="k">let</span> <span class="n">start</span> <span class="o">=</span> <span class="nn">Instant</span><span class="p">::</span><span class="nf">now</span><span class="p">();</span>

    <span class="k">let</span> <span class="n">init_start</span> <span class="o">=</span> <span class="nn">Instant</span><span class="p">::</span><span class="nf">now</span><span class="p">();</span>
    <span class="k">let</span> <span class="n">_linked_list</span> <span class="o">=</span> <span class="nf">create_linked_list</span><span class="p">(</span><span class="mi">50_000_000</span><span class="p">);</span>
    <span class="k">let</span> <span class="n">init_time</span> <span class="o">=</span> <span class="n">init_start</span><span class="nf">.elapsed</span><span class="p">()</span><span class="nf">.as_micros</span><span class="p">();</span>

    <span class="k">let</span> <span class="k">mut</span> <span class="n">old_start</span> <span class="o">=</span> <span class="nn">Instant</span><span class="p">::</span><span class="nf">now</span><span class="p">();</span>
    <span class="k">let</span> <span class="k">mut</span> <span class="n">delay</span><span class="p">:</span> <span class="nb">u128</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">let</span> <span class="k">mut</span> <span class="n">worst_case</span><span class="p">:</span> <span class="nb">u128</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">let</span> <span class="k">mut</span> <span class="n">create_time</span><span class="p">:</span> <span class="nb">u128</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">let</span> <span class="k">mut</span> <span class="n">worst_create_time</span><span class="p">:</span> <span class="nb">u128</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>

    <span class="k">let</span> <span class="n">loop_start</span> <span class="o">=</span> <span class="nn">Instant</span><span class="p">::</span><span class="nf">now</span><span class="p">();</span>
    <span class="k">for</span> <span class="n">_</span> <span class="k">in</span> <span class="mi">0</span><span class="o">..</span><span class="mi">1_000_000</span> <span class="p">{</span>
        <span class="k">let</span> <span class="n">min_start</span> <span class="o">=</span> <span class="nn">Instant</span><span class="p">::</span><span class="nf">now</span><span class="p">();</span>
        <span class="k">let</span> <span class="n">value</span> <span class="o">=</span> <span class="n">min_start</span><span class="nf">.duration_since</span><span class="p">(</span><span class="n">old_start</span><span class="p">)</span><span class="nf">.as_micros</span><span class="p">();</span>
        <span class="k">if</span> <span class="n">value</span> <span class="o">&gt;</span> <span class="n">worst_case</span> <span class="p">{</span>
            <span class="n">worst_case</span> <span class="o">=</span> <span class="n">value</span><span class="p">;</span>
        <span class="p">}</span>
        <span class="n">delay</span> <span class="o">+=</span> <span class="n">value</span><span class="p">;</span>
        <span class="k">let</span> <span class="n">create_start</span> <span class="o">=</span> <span class="nn">Instant</span><span class="p">::</span><span class="nf">now</span><span class="p">();</span>
        <span class="k">let</span> <span class="n">_list</span> <span class="o">=</span> <span class="nf">create_linked_list</span><span class="p">(</span><span class="mi">1000</span><span class="p">);</span>
        <span class="k">let</span> <span class="n">this_create_time</span> <span class="o">=</span> <span class="n">create_start</span><span class="nf">.elapsed</span><span class="p">()</span><span class="nf">.as_micros</span><span class="p">();</span>
        <span class="k">if</span> <span class="n">this_create_time</span> <span class="o">&gt;</span> <span class="n">worst_create_time</span> <span class="p">{</span>
            <span class="n">worst_create_time</span> <span class="o">=</span> <span class="n">this_create_time</span><span class="p">;</span>
        <span class="p">}</span>
        <span class="n">create_time</span> <span class="o">+=</span> <span class="n">this_create_time</span><span class="p">;</span>
        <span class="n">old_start</span> <span class="o">=</span> <span class="n">min_start</span><span class="p">;</span>
    <span class="p">}</span>
    <span class="k">let</span> <span class="n">loop_time</span> <span class="o">=</span> <span class="n">loop_start</span><span class="nf">.elapsed</span><span class="p">()</span><span class="nf">.as_micros</span><span class="p">();</span>

    <span class="k">let</span> <span class="n">elapsed</span> <span class="o">=</span> <span class="n">start</span><span class="nf">.elapsed</span><span class="p">();</span>
    <span class="nd">println!</span><span class="p">(</span><span class="s">"Elapsed: {} ms"</span><span class="p">,</span> <span class="n">elapsed</span><span class="nf">.as_millis</span><span class="p">());</span>
    <span class="nd">println!</span><span class="p">(</span><span class="s">"Initial 50M list create time: {} µs"</span><span class="p">,</span> <span class="n">init_time</span><span class="p">);</span>
    <span class="nd">println!</span><span class="p">(</span><span class="s">"Total For Loop time (1M x 1K): {} µs"</span><span class="p">,</span> <span class="n">loop_time</span><span class="p">);</span>
    <span class="nd">println!</span><span class="p">(</span><span class="s">"Total Delays between iteration: {} µs"</span><span class="p">,</span> <span class="n">delay</span><span class="p">);</span>
    <span class="nd">println!</span><span class="p">(</span><span class="s">"Worst Gap is: {} µs"</span><span class="p">,</span> <span class="n">worst_case</span><span class="p">);</span>
    <span class="nd">println!</span><span class="p">(</span><span class="s">"Total Create time: {} µs"</span><span class="p">,</span> <span class="n">create_time</span><span class="p">);</span>
    <span class="nd">println!</span><span class="p">(</span><span class="s">"Worst Create time: {} µs"</span><span class="p">,</span> <span class="n">worst_create_time</span><span class="p">);</span>
<span class="p">}</span>

</code></pre></div></div>

<p>Here is the output of the Rust program.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>➜  simple-programs ./stop_the_world
Elapsed: 26915 ms
Initial 50M list create time: 1737040 µs
Total For Loop time (1M x 1K): 25178866 µs
Total Delays between iteration: 24577577 µs
Worst Gap is: 145 µs
Total Create time: 10964945 µs
Worst Create time: 90 µs
</code></pre></div></div>

<p>The code is trying to stress test the memory allocation. We are using a linked list for this experiment. We create one big 50 million nodes linked list and then 1 million small 1000 nodes linked lists. Here is the tabular output for comparison.</p>

<table>
  <thead>
    <tr>
      <th>Metrics</th>
      <th>Java</th>
      <th>Rust</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Program Execution Time</td>
      <td>7670 ms</td>
      <td>26915 ms</td>
    </tr>
    <tr>
      <td>Initial 50M node linked list creation time</td>
      <td>2622 ms</td>
      <td>1737 ms</td>
    </tr>
    <tr>
      <td>Total time for creating 1M 1k node linked list creation time (including delays)</td>
      <td>5048 ms</td>
      <td>25179 ms</td>
    </tr>
    <tr>
      <td>Total delays between single 1k node linked list creations</td>
      <td>4711 ms</td>
      <td>24578 ms</td>
    </tr>
    <tr>
      <td>Worst Gap between the individual iteration</td>
      <td>565162 µs</td>
      <td>145 µs</td>
    </tr>
    <tr>
      <td>Total time spent in just creating 1M of 1k node linked list (without gaps/delays)</td>
      <td>4568 ms</td>
      <td>10965 ms</td>
    </tr>
    <tr>
      <td>Max time spent in creating one single 1k node linked list (including gap)</td>
      <td>565142 µs</td>
      <td>90 µs</td>
    </tr>
  </tbody>
</table>

<p>On a high level, these results looked weird. My mental model was Rust is more of a systems programming language and hence should have been faster than Java across every metric. Here, we see that the Java program completed about 3.5x faster than Rust. Let’s look into the following metrics and try to understand why that is happening:</p>
<ul>
  <li>Total time for creating 1M 1k node linked list creation time (including delays)
    <ul>
      <li>This is the total loop time (1M x 1k). Here, Java is almost 5x faster than Rust.</li>
      <li>The key here is, in every iteration, a 1k node linked list is formed and by the end of the iteration, that linked list has gone out of scope.</li>
      <li>In the Rust world, the moment it goes out of scope, Rust deletes it. So, for Rust, every iteration = allocation + <em>any work after allocation</em> + delete.</li>
      <li>In the Java world, there is only allocation and no deletion. Deletion is taken care by the GC at a later time. So, for Java, every iteration = allocation + <em>any work after allocation</em>. Hence, Java is much faster here.</li>
    </ul>
  </li>
  <li>Total delays between single 1k node linked list creations
    <ul>
      <li>This is the total iteration delays. Here too, Java is 5x faster than Rust.</li>
      <li>This makes sense given how every iteration differs in Rust world vs Java world. In Rust, the extra time goes toward deletion. 1 million deletions add up in Rust.</li>
    </ul>
  </li>
  <li>Total time spent in just creating 1M of 1k node linked list (without gaps/delays)
    <ul>
      <li>This is the total time it spent on just the creation of 1k node linked lists. Here, Java is 2.4x faster than Rust. This indicates that even pure allocation (without deallocation) is costlier in Rust than in Java. The reason is that Java’s generational GC uses <a href="https://shipilev.net/jvm/anatomy-quarks/4-tlab-allocation/"><strong>bump-pointer allocation</strong></a> for short-lived objects — allocating a new object is nearly free, just incrementing a pointer into the young generation heap. Rust, by contrast, performs a heap allocation through its allocator for every <code class="language-plaintext highlighter-rouge">Box::new</code>, which is typically slower than HotSpot’s thread-local bump-pointer fast path for young objects. That per-node allocator overhead accumulates across 1000 nodes per list × 1 million iterations.</li>
    </ul>
  </li>
  <li>Max time spent in creating one single 1k node linked list (including gap)
    <ul>
      <li>This is the most interesting metric. Here, Rust is almost 6280x better than Java.</li>
      <li>This is the <strong>STOP THE WORLD PAUSE OF JAVA GARBAGE COLLECTOR</strong>. Before allocating the node, Java needed to reclaim some space. Hence, <a href="https://shipilev.net/jvm/anatomy-quarks/3-gc-design-and-pauses/">it stopped the application and asked GC to reclaim some space</a>. So, for one of the creation steps, it took significantly longer.</li>
    </ul>
  </li>
  <li>Worst Gap between the individual iteration
    <ul>
      <li>Here also, Rust is almost 3900x better than Java. This is a continuation of the previous metric. Because GC worked for one of the creation attempts, that iteration time ballooned for Java.
        <ul>
          <li>For Rust, every iteration is the same = allocation + <em>any work after allocation</em> + delete.</li>
          <li>For Java, there is a magic step = (<em>Garbage Collection</em>) + allocation + <em>any work after allocation</em></li>
        </ul>
      </li>
    </ul>
  </li>
  <li>Initial 50M node linked list creation time
    <ul>
      <li>It seems Rust is almost 1.5x faster in creating a huge single-shot list. I am not sure why that behavior is seen. One important timing note: <code class="language-plaintext highlighter-rouge">_linked_list</code> goes out of scope at the very end of <code class="language-plaintext highlighter-rouge">main</code>, after <code class="language-plaintext highlighter-rouge">start.elapsed()</code> is already captured. So the program’s reported elapsed time does <strong>not</strong> include the cost of dropping the 50M node list — that drop happens outside the measured window.</li>
    </ul>
  </li>
</ul>

<h2 id="validating-with-gc-logs">Validating with GC Logs</h2>

<p>We can enable GC logs to understand how GC is behaving in Java. Here are the GC logs — let’s try to understand whether the numbers match.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>➜  simple-programs time java -Xlog:gc StopTheWorld
[0.003s][info][gc] Using G1
[0.040s][info][gc] GC(0) Pause Young (Normal) (G1 Evacuation Pause) 5M-&gt;5M(16M) 10.465ms
[0.056s][info][gc] GC(1) Pause Young (Normal) (G1 Evacuation Pause) 9M-&gt;9M(20M) 14.943ms
[0.075s][info][gc] GC(2) Pause Young (Normal) (G1 Evacuation Pause) 13M-&gt;12M(72M) 17.457ms
[0.130s][info][gc] GC(3) Pause Young (Normal) (G1 Evacuation Pause) 28M-&gt;28M(72M) 42.890ms
[0.157s][info][gc] GC(4) Pause Young (Normal) (G1 Evacuation Pause) 40M-&gt;43M(72M) 25.836ms
[0.178s][info][gc] GC(5) Pause Young (Concurrent Start) (G1 Evacuation Pause) 51M-&gt;51M(72M) 19.032ms
[0.178s][info][gc] GC(6) Concurrent Mark Cycle
[0.203s][info][gc] GC(7) Pause Young (Normal) (G1 Evacuation Pause) 59M-&gt;60M(228M) 22.891ms
[0.330s][info][gc] GC(8) Pause Young (Normal) (G1 Evacuation Pause) 108M-&gt;109M(228M) 97.542ms
[0.415s][info][gc] GC(9) Pause Young (Normal) (G1 Evacuation Pause) 145M-&gt;147M(228M) 80.128ms
[0.465s][info][gc] GC(10) Pause Young (Normal) (G1 Evacuation Pause) 167M-&gt;169M(228M) 46.356ms
[0.499s][info][gc] GC(11) Pause Young (Normal) (G1 Evacuation Pause) 185M-&gt;187M(684M) 31.950ms
[0.526s][info][gc] GC(6) Pause Remark 233M-&gt;233M(684M) 0.997ms
[0.574s][info][gc] GC(6) Pause Cleanup 315M-&gt;315M(684M) 0.039ms
[0.576s][info][gc] GC(6) Concurrent Mark Cycle 398.156ms
[0.917s][info][gc] GC(12) Pause Young (Prepare Mixed) (G1 Evacuation Pause) 339M-&gt;343M(684M) 330.662ms
[1.155s][info][gc] GC(13) Pause Young (Mixed) (G1 Evacuation Pause) 447M-&gt;451M(684M) 226.702ms
[1.321s][info][gc] GC(14) Pause Young (Concurrent Start) (G1 Evacuation Pause) 519M-&gt;521M(684M) 158.399ms
[1.321s][info][gc] GC(15) Concurrent Mark Cycle
[1.433s][info][gc] GC(16) Pause Young (Normal) (G1 Evacuation Pause) 569M-&gt;573M(2052M) 106.487ms
[2.493s][info][gc] GC(17) Pause Young (Normal) (G1 Evacuation Pause) 977M-&gt;979M(2052M) 845.976ms
[2.963s][info][gc] GC(18) Pause Young (Normal) (G1 Evacuation Pause) 1311M-&gt;1183M(2052M) 418.603ms
[3.101s][info][gc] GC(19) Pause Young (Normal) (G1 Evacuation Pause) 1459M-&gt;1194M(2052M) 96.162ms
[3.152s][info][gc] GC(20) Pause Young (Normal) (G1 Evacuation Pause) 1490M-&gt;1193M(4428M) 5.607ms
[3.431s][info][gc] GC(21) Pause Young (Normal) (G1 Evacuation Pause) 1713M-&gt;1193M(4428M) 1.118ms
[3.476s][info][gc] GC(15) Pause Remark 1523M-&gt;1523M(4428M) 0.737ms
[3.526s][info][gc] GC(22) Pause Young (Normal) (G1 Evacuation Pause) 1745M-&gt;1193M(4428M) 0.848ms
[3.685s][info][gc] GC(15) Pause Cleanup 1883M-&gt;1883M(4428M) 0.070ms
[3.696s][info][gc] GC(15) Concurrent Mark Cycle 2375.184ms
[4.578s][info][gc] GC(23) Pause Young (Prepare Mixed) (G1 Evacuation Pause) 3785M-&gt;1193M(4428M) 1.470ms
[4.909s][info][gc] GC(24) Pause Young (Mixed) (G1 Evacuation Pause) 3845M-&gt;1189M(4428M) 6.353ms
[5.236s][info][gc] GC(25) Pause Young (Normal) (G1 Evacuation Pause) 3841M-&gt;1189M(4428M) 1.434ms
[5.558s][info][gc] GC(26) Pause Young (Normal) (G1 Evacuation Pause) 3841M-&gt;1189M(4428M) 1.472ms
[5.882s][info][gc] GC(27) Pause Young (Normal) (G1 Evacuation Pause) 3841M-&gt;1189M(4428M) 1.258ms
[6.214s][info][gc] GC(28) Pause Young (Normal) (G1 Evacuation Pause) 3841M-&gt;1189M(4428M) 1.623ms
[6.540s][info][gc] GC(29) Pause Young (Normal) (G1 Evacuation Pause) 3841M-&gt;1189M(4428M) 1.357ms
[6.879s][info][gc] GC(30) Pause Young (Normal) (G1 Evacuation Pause) 3841M-&gt;1189M(4332M) 1.320ms
Elapsed: 6863 ms
Initial 50M list create time: 2497475 µs
Total For Loop time (1M x 1K): 4364742 µs
Total Delays between iteration: 3733728 µs
Worst Gap is: 420189 µs
Total Create time: 3678367 µs
Worst Create time: 420117 µs
java -Xlog:gc StopTheWorld  11.25s user 1.61s system 180% cpu 7.124 total
</code></pre></div></div>

<p>Yes, from the logs we can see that GC pauses are happening. We can map the worst gap we saw (~420ms) to GC(18) which took 418ms. Using the default heap means the JVM starts with 16M and slowly expands, leading to more pauses early on. We can use a fixed heap with <code class="language-plaintext highlighter-rouge">-Xms4G -Xmx4G</code> which reduces pause frequency by avoiding dynamic heap expansion. The biggest memory reclaim happens around GC(23) and GC(24), after which the GC stabilizes with quick cycles. By the time GC(23) and GC(24) happen, the long-lived 50M node list has likely already been promoted to the old generation. Those later mixed collections are reclaiming old-generation regions after concurrent marking. The quick cycles after that occur because most of the remaining work is collecting the short-lived 1k node lists.</p>

<table>
  <thead>
    <tr>
      <th>GC event</th>
      <th>Pause</th>
      <th>Phase</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>GC(0)–GC(17)</td>
      <td>10ms–845ms</td>
      <td>During 50M list creation (captured in <code class="language-plaintext highlighter-rouge">init_time</code>)</td>
    </tr>
    <tr>
      <td>GC(18)</td>
      <td>418ms</td>
      <td>First loop pause — the worst gap</td>
    </tr>
    <tr>
      <td>GC(19)–GC(20)</td>
      <td>5–96ms</td>
      <td>Transitioning — heap expanding, pauses shrinking</td>
    </tr>
    <tr>
      <td>GC(21)–GC(30)</td>
      <td>1–6ms</td>
      <td>Stabilized — short-lived 1k lists collected cheaply</td>
    </tr>
  </tbody>
</table>

<h2 id="conclusion">Conclusion</h2>

<p>So, Java’s throughput is good, but Rust is very deterministic. Here is what two LLMs had to say about these results:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
- Claude:
  
This is a classic **throughput vs. latency tradeoff**:
- Java's GC optimizes for throughput (amortizes collection cost across many allocations)
- Rust's ownership model gives deterministic, near-zero pause times at the cost of slower aggregate destruction of long-lived heap structures

For real-time systems, games, trading, or audio — Rust's 145 µs worst case matters enormously. For batch jobs or web services that care about average throughput, Java wins here.
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>- Codex

Bottom line: this output says Java has much better allocation throughput for short-lived objects, while Rust gives much tighter pause-time behavior. It does not prove “Java is faster than Rust” generally; it proves HotSpot’s generational allocator is very good for this exact garbage-heavy workload.
</code></pre></div></div>

<p>Yes, this is a small program and extrapolating these results broadly would be unwise. But it does give some good insights. If we are looking for very deterministic latency in our applications or services, then Rust is a good fit. In this allocation-heavy workload, Java showed better overall throughput. So, we need not feel guilty about using Java as long as occasional latency spikes are within acceptable bounds.</p>

<hr />
<ul>
  <li>I have used LLM agents to review the draft. I have also taken help with rewording and rephrasing the sentences. I have also used it for doing research.</li>
</ul>]]></content><author><name>Harsha Kadekar</name></author><category term="Technical" /><summary type="html"><![CDATA[I recently read (How bad can Python stop-the-world pauses get?). It describes a way to demonstrate how Python’s garbage collector will pause the application in order to claim back the memory. There is no deterministic way to know when this will trigger. Hence, this can lead to unexpected latency in the application. It gives a simple Python program to demonstrate it.]]></summary></entry><entry><title type="html">Book-Summary - ಶಕುನ ಪಕ್ಷಿ, ಆರಿದ ಲಾಂದ್ರ, ತಾಳೆ ಹೂವು</title><link href="https://harsha-kadekar.github.io/book-summary-%E0%B2%B6%E0%B2%95%E0%B3%81%E0%B2%A8-%E0%B2%AA%E0%B2%95-%E0%B2%B7%E0%B2%BF-%E0%B2%86%E0%B2%B0%E0%B2%BF%E0%B2%A6-%E0%B2%B2%E0%B2%BE%E0%B2%82%E0%B2%A6-%E0%B2%B0-%E0%B2%A4%E0%B2%BE%E0%B2%B3%E0%B3%86-%E0%B2%B9%E0%B3%82%E0%B2%B5%E0%B3%81.html" rel="alternate" type="text/html" title="Book-Summary - ಶಕುನ ಪಕ್ಷಿ, ಆರಿದ ಲಾಂದ್ರ, ತಾಳೆ ಹೂವು" /><published>2026-05-13T00:00:00+00:00</published><updated>2026-05-13T00:00:00+00:00</updated><id>https://harsha-kadekar.github.io/book-summary-%E0%B2%B6%E0%B2%95%E0%B3%81%E0%B2%A8-%E0%B2%AA%E0%B2%95%E0%B3%8D%E0%B2%B7%E0%B2%BF-%E0%B2%86%E0%B2%B0%E0%B2%BF%E0%B2%A6-%E0%B2%B2%E0%B2%BE%E0%B2%82%E0%B2%A6%E0%B3%8D%E0%B2%B0-%E0%B2%A4%E0%B2%BE%E0%B2%B3%E0%B3%86-%E0%B2%B9%E0%B3%82%E0%B2%B5%E0%B3%81</id><content type="html" xml:base="https://harsha-kadekar.github.io/book-summary-%E0%B2%B6%E0%B2%95%E0%B3%81%E0%B2%A8-%E0%B2%AA%E0%B2%95-%E0%B2%B7%E0%B2%BF-%E0%B2%86%E0%B2%B0%E0%B2%BF%E0%B2%A6-%E0%B2%B2%E0%B2%BE%E0%B2%82%E0%B2%A6-%E0%B2%B0-%E0%B2%A4%E0%B2%BE%E0%B2%B3%E0%B3%86-%E0%B2%B9%E0%B3%82%E0%B2%B5%E0%B3%81.html"><![CDATA[<ul>
  <li>Author: <strong>T.K. Rama Rao</strong></li>
  <li>GoodReads: <a href="https://www.goodreads.com/book/show/138979497-shakuna-pakshi-aarida-thaale-hoo">ಶಕುನ ಪಕ್ಷಿ, ಆರಿದ ಲಾಂದ್ರ, ತಾಳೆ ಹೂವು (Shakuna Pakshi, Aarida Laandra, tale hoovu)</a></li>
</ul>

<p>ಇದು ನಾನು ಓದುತ್ತಿರುವ ಟಿ. ಕೆ. ರಾಮಾ ರಾವು ಅವರ ಮೊದಲ ಪುಸ್ತಕ. ಇದರಲ್ಲಿ ಮೂರು ಸಣ್ಣ ಪತ್ತೆದಾರಿ ಕಥೆಗಳಿವೆ. ಪ್ರತಿಯೊಂದೂ ವಿಭಿನ್ನವಾಗಿದೆ. ಕಥೆಗಳು ಪ್ರಾರಂಭದಲ್ಲಿ ನಿಧಾನವಾಗಿ ಸಾಗಿದರೂ ತುಂಬ ಬೇಗನೆ ರೋಚಕವಾಗುತ್ತ ಹೋಗುತ್ತವೆ. ಎಂಬತ್ತು-ತೊಂಬತ್ತರ ದಶಕದಲ್ಲಿ ನಡೆಯುವಂತ ಸನ್ನಿವೇಶ ಇದೆ. ಕಥೆಗಳಲ್ಲಿನ ಹಲವು ಪಾತ್ರಗಳಲ್ಲಿ ಯಾರು ಕೊಲೆಗಾರರೆಂದು ಊಹಿಸಲು ನನ್ನಿಂದ ಸಾಧ್ಯವಾಗಲಿಲ್ಲ. ನನಗೆ ಅನಿಸಿದ್ದು, ಈ ಕಥೆಗಳನ್ನು ಇನ್ನು ದೊಡ್ಡದಾಗಿ ಮಾಡಿ ಇನ್ನೂ ಹಲವಾರು ವಿಷಯಗಳ ವಿವರಣೆಗಳನ್ನು ನೀಡಬಹುದಿತ್ತು. ಪ್ರತಿ ಕಥೆಯ ಮುಖ್ಯ ಪಾತ್ರವು ಸಾಮಾನ್ಯ ವ್ಯಕ್ತಿಯಂತಿದೆ. ಒಂದು ಆಸೆ, ರಾಮಾ ರಾವು ಅವರ ಈ ಪತ್ತೆದಾರಿ ಕಥೆಗಳನ್ನು ಮತ್ತು ಗಣೇಶಯ್ಯರವರ ಪತ್ತೆದಾರಿ ಕಥೆಗಳನ್ನು ಕನ್ನಡ web series/youtube series ಆಗಿ ಮಾಡಿದರೆ ಎಷ್ಟು ಚೆನ್ನಾಗಿರುತ್ತಿತ್ತು. ಟಿ.ಕೆ. ರಾಮಾ ರಾವುರವರ ಮತ್ತಷ್ಟು ಕಥೆಗಳನ್ನು ಓದಬೇಕು.</p>

<hr />]]></content><author><name>Harsha Kadekar</name></author><category term="Book-Summary" /><category term="novel" /><category term="ಕನ್ನಡ" /><summary type="html"><![CDATA[Author: T.K. Rama Rao GoodReads: ಶಕುನ ಪಕ್ಷಿ, ಆರಿದ ಲಾಂದ್ರ, ತಾಳೆ ಹೂವು (Shakuna Pakshi, Aarida Laandra, tale hoovu)]]></summary></entry><entry><title type="html">Japan Visit 2026</title><link href="https://harsha-kadekar.github.io/japan-visit-2026.html" rel="alternate" type="text/html" title="Japan Visit 2026" /><published>2026-04-11T00:00:00+00:00</published><updated>2026-04-11T00:00:00+00:00</updated><id>https://harsha-kadekar.github.io/japan-visit-2026</id><content type="html" xml:base="https://harsha-kadekar.github.io/japan-visit-2026.html"><![CDATA[<p>My wife, daughter, and I visited Japan for a nine-day family vacation, during which we spent time in Tokyo and Kyoto.</p>

<p>After reading Made in Japan, I became deeply curious about the country and its culture. I wanted to see it for myself and experience it firsthand, and my wife planned the trip.</p>

<p>The trip was an eye-opener in more ways than I expected.</p>

<h2 id="trains-and-trains-everywhere">Trains and Trains Everywhere</h2>

<p>My main experience with a vast and busy transport station is Bengaluru’s Majestic Bus Stand (my dad told me that Mumbai has even bigger and busier stations). It is an integrated hub where the local city bus system, inter-city and inter-state bus system, auto stand, and train station are all very nearby (recently, even a Metro station has been added to it). If you go to Majestic during peak hours, it is very busy and chaotic, with a large number of buses and people.</p>

<p>Japan operates on an even bigger scale, with seamless integration between metro trains, bullet trains, and buses. The stations are crowded and busy, yet they feel remarkably orderly. The trains arrive almost to the second; every two to three minutes, trains come and go. Huge numbers of people move in and out of the trains, while the stations themselves are filled with shops and activity. People stand in line to get on trains and enter elevators, and train station workers are very cooperative and help people reach their destinations. They are professional and, to borrow a Sanskrit expression, स्मितपूर्वाभिभाषिणः, smiling as they speak. That brings calmness to confused or distressed passengers and helps disabled commuters. There were many facilities to make things easier for passengers, like coin lockers to store luggage, regular announcements of trains and delays, color-coded directions to help with navigation within the station, and a large number of escalators and elevators (some places did not have them, but the majority did).</p>

<p>I expected bullet trains to be rare, probably twice a day, but they were also very regular, like every 10 minutes. There were simply so many varieties of trains (rapids, local, limited express, and shinkansen), and it felt as if everything was connected by rail.</p>
<h2 id="shrines">Shrines</h2>

<p>They were massive, well-maintained, and built of wood. Overall, they were aesthetically very pleasing, with gardens, trees, and structures. Though I felt they were more touristy than spiritual (maybe because there were lots of tourists). Everyone had the same entrance fees and the same level of access. Only those who were performing certain rituals had extra access. The crowd control and management were very professional. The streets leading to these shrines were very small and yet fully crowded with tiny shops and people. Yet these streets were very clean, and even the shops looked well-maintained. There were fees for fortunes and dedicated spaces for popular rituals (100 yen to get a fortune, tie the amulet at a dedicated place), and everything was well-maintained. Seeing these shrines also made me reflect on Hindu temples and temple streets back home.</p>

<p>This made me think of my own Hindu temples, temple streets, and commercial streets in my cities (Bengaluru, Chikkamagaluru, Udupi, and any old commercially important streets of India). I always thought they were badly managed. I thought that because there are so many people and these places get crowded, it is not possible to maintain them well. I always felt these old commercial streets needed to be widened to make them breathe. Poor crowd management in temples felt inevitable because there are so many people. How wrong I was! Even these small streets can have world-class facilities if the people and the government want them to. Kyoto was the best example of how small streets, lined with modest shops and major brands, can still be well-maintained and economically vibrant. Our Hindu temples need better and more modern people management as well as facility management, carried out with professionalism and empathy.</p>

<p>Seeing those shrines made me think about how grand many Hindu shrines might have been had they not been neglected or ruined over the centuries. If there had been no invasions over the last thousand years, how would these temples, palaces, and cities have grown? I had heard that many wooden Hindu temples and Indian wooden palaces were burned down. I always felt that, because they were wooden, they might not have been that great. No, they would have been architecturally magnificent, and in every way they would have been grand. Entire cities, along with temple structures, were ruined by invasions and apathy. How much we have lost!</p>

<p>Many shrines in Japan have been restored. So, I wondered why Hindu temples, palaces, and forts are not restored.</p>

<h2 id="automation">Automation</h2>

<p>One strong impression I came away with was that Japan takes automation very seriously. They had so many sorts of vending machines: drinks, fresh on-the-spot orange juice, soft-serve ice cream, and animal-feeding food. You name it, and they have it in the form of a vending machine. That massive train network cannot be managed without a massive amount of automation.</p>

<p>My wife and I kept joking that one thing we would definitely miss after returning to the USA or India would be the Japanese toilet. It had water for cleaning, heated seats, and an automated cleaning system. This was the norm everywhere, from public parks, tourist places, trains, and aircraft to restaurants and hotels.</p>

<h2 id="language--culture">Language &amp; Culture</h2>

<p>One thing that stood out to me was how strongly Japanese language and culture remain present in everyday life. The train stations had a little bit of English along with Japanese, either on signboards or announcement boards. Most things were in Japanese. We hardly met anyone, barring only two or three people during our entire stay in Japan, who could converse in English beyond three or four words. We relied heavily on Google Lens and Google Translate for conversation and translation.</p>

<p>People are very down to earth. They were very friendly and helpful. Just because I do not know Japanese, they did not dismiss us. At least in our experience, very few people treated us dismissively for not knowing Japanese (maybe that was because we were tourists and only went to tourist places). There were many instances in which they went beyond their responsibility to help us. We have a saying, “Athithi Devo Bhavah!” (Guest is like God), and we truly felt that in Japanese hospitality. The taxi services were very good. They were very professional, taxis were kept clean, and there was no haggling or random price quote. If I stopped a taxi, it would stop and take us irrespective of our destination. They were dignified, wearing suits and calmly asking clarifying questions to understand clearly where we wanted to go.</p>

<p>Japan also felt like a high-trust society. Rarely did anyone check whether you had paid and had valid tickets for reserved or first-class seats on the train (I am not sure if they have other means of validating). Even in shops, hardly anyone was watching whether you had paid before taking things out (yes, there are CCTV cameras, but still). Hardly any police officers or security personnel were visible.</p>

<p>So, at least for me, these sayings, “English is needed to become a global power” or “English is needed to civilize” or “English is needed to adapt to global standards” or “Due to English we have an advantage” or “English is needed for access to modern science,” are all just propaganda or myth. I have seen living proof that people can be very cultured, disciplined, and advanced in every way even without English-language education.</p>

<h2 id="food">Food</h2>
<p>There was an incredible variety of food, and it was clear that people in Japan take food seriously. I especially liked the ramen. Though, as a vegetarian, finding a vegetarian-only restaurant was difficult. We were looking for vegan restaurants. There were many, but there were fewer near the places we were visiting, and they were always crowded.</p>

<h2 id="conclusion">Conclusion</h2>
<p>I would recommend Japan to anyone who wants to experience a country through its culture, people, language, and everyday public life. It is a place that leaves a strong impression.</p>

<hr />]]></content><author><name>Harsha Kadekar</name></author><category term="Tour-Review" /><summary type="html"><![CDATA[My wife, daughter, and I visited Japan for a nine-day family vacation, during which we spent time in Tokyo and Kyoto.]]></summary></entry><entry><title type="html">Notes On Learning to Code With LLMs - 2026-02-26</title><link href="https://harsha-kadekar.github.io/notes-on-learning-to-code-with-llms-2026-02-26.html" rel="alternate" type="text/html" title="Notes On Learning to Code With LLMs - 2026-02-26" /><published>2026-02-26T00:00:00+00:00</published><updated>2026-02-26T00:00:00+00:00</updated><id>https://harsha-kadekar.github.io/notes-on-learning-to-code-with-llms---2026-02-26</id><content type="html" xml:base="https://harsha-kadekar.github.io/notes-on-learning-to-code-with-llms-2026-02-26.html"><![CDATA[<h2 id="overview">Overview</h2>

<p>This is the 2nd post (<a href="https://www.harsha-kadekar.blog/notes-on-learning-to-code-with-llms-2026-02-15.html">first one</a>) on my attempt to learn how to use LLMs for coding. I developed an Android app - <a href="https://www.harsha-kadekar.blog/citta-a-personal-meditation-tracking-app.html">Citta - A Personal Meditation Tracking App</a> using Claude Code, even though I had never worked with Dart, Flutter, or Android development before. In the process of development, I realized that the essential software development engineering skills remain the same even in the LLM era of coding. LLM agents can produce professional-looking apps very fast, but making the underlying code production-ready and maintainable still takes work. LLMs/Agents will supercharge you if you have deep domain knowledge, use good software engineering practices, and have good basic computer science knowledge. Let me explain this in detail.</p>

<h2 id="experience">Experience</h2>

<p>With my zero knowledge of Android (or its SDK, or Flutter framework), I was still able to develop a good app within 2 weeks (~30 hours of actual development work). The developed app is comparable to equivalent professional apps listed in the Play Store. Using an LLM definitely reduced the overall turnaround time from idea generation to the first working product.</p>

<p>I started by using the planning mode of Claude Code (<code class="language-plaintext highlighter-rouge">shift + tab</code>). I interacted with Claude Code to discuss my idea for the app. I explained how my app should look and feel, and what features the app should provide. As part of this process, I did ask some questions like which framework I should use, what kind of storage I should explore, why a DB does not make sense here, what the effect of storing everything in a file would be, and how this would scale as years go by. For everything, Claude gave me a good explanation and then followed up with a couple of options marked with the preferred way to do it. For a few of them, I chose what Claude gave as preferred, and for others, I overrode the preferred way with something else that I thought was the right way to do it. If I had prior knowledge in Flutter or Android development, I could have led Claude in an even better direction, as I could have asked better questions. With that domain knowledge, I would have thought even more deeply about the internals, and thus probably it would have given better alternatives.</p>

<p>I asked Claude to break the requirements into atomic small tasks that could be worked on independently. It did break them down into smaller tasks. I wanted to go one task at a time. But I guess my prompt was not clear, and Claude Code went ahead and completed all the broken-down tasks at once. Claude developed the complete UI. The UI development was a breeze with little hands-on help. As it completed everything, a lot of code got generated. I had to spend 2-3 days reading the code to understand what it had written. So, even though I was progressing fast in app development, which was exciting, I had also lost the context of what it was doing underneath. I had to slow down to regain an understanding of what it was doing so that I would be comfortable with what I was shipping.</p>

<p>Overall, it did not follow good coding best practices. It had duplicated code and also very little test coverage. Much of the implemented code did not have tests. I had to explicitly ask it to add test cases. So, even though the app looked professional from the outside, the code underneath was not production-ready or maintainable.</p>

<p>I wanted Claude to complete one atomic task at a time, then come back to me so that I could review it and then go to the next step. I also wanted it to add those tasks as GitHub issues so I could track the progress of the product implementation. Claude Code, in a few instances, pushed code to GitHub without running all the tests and static analyzers. Ideally, the iteration would be: implement a single task, run the unit tests, run the analyzers, do a self-review, wait for my review, push it to GitHub after human review, mark that task as complete in GitHub, and finally move on to the next GitHub issue.</p>

<p>There were many things Claude did not remember in its context, and it kept on making the same mistakes. For example, I had installed the Flutter SDK in a custom folder. Even though I provided the actual location of the SDK when it failed the first time, it did not remember. Rather, it kept on making the same mistake when it tried to run the build, as it could not find the SDK in the standard location. I created a skill which helped reduce that repeated mistake.</p>

<p>There was one bug related to the alarm not playing the first time the app started. Claude tried many things to fix it, but failed. Those fixes made things worse, and I had to roll back those changes. I did some investigation on my own, and I found two links which had information and fixes about a similar problem. I suggested those two links to Claude Code, and based on that, it implemented the actual fix for the bug. This worked nicely! Probably LLMs are good at solving bugs that need relatively little context. In this case, it needed to search for similar problems/errors and then infer how it could apply that knowledge to the current problem.</p>

<p>Claude Code had introduced a few logical bugs while developing the app. For example, the way it had implemented file backup and recovery had issues that could have led to loss of data. Only when I read the code was I able to discover and fix it. From this, I feel we need strong domain knowledge or experience which would help identify and fix these problems outside of the LLM agents. Having closer review cycles of generated code will also help identify them early and fix them.</p>

<p>The other thing I missed was a better code review tool. I would want to see the LLM prompts that generated or updated the code along with the code it had generated. This would give better context. So, the review should capture both code and LLM prompt interactions.</p>

<h2 id="what-next">What next?</h2>

<p>Here are some of the things I would like to practice and learn next:</p>
<ul>
  <li>Developing skills or rules for the LLM agent that would help bring software engineering best practices into the workflow, so that LLM agents work through atomic tasks in a test-driven development style with a close review cycle.</li>
  <li>An LLM agent needs to augment the developer, and hence what I expect from the agent will be completely different from what another developer seeks from agents. I would want to set the following rules for the LLMs to be effective for my way of development:
    <ul>
      <li>Do not implement more than one GitHub issue without approval.</li>
      <li>Run formatter, analyzer, and tests before reporting completion.</li>
      <li>Avoid duplicate code.</li>
      <li>Do not push to GitHub unless explicitly approved.</li>
      <li>Start with test-driven development for every GitHub issue.</li>
      <li>Add or update tests for every behavioral change.</li>
      <li>Do a code review of self-implemented code before declaring the task completed.</li>
      <li>Record unresolved risks before moving to the next task.</li>
    </ul>
  </li>
  <li>Explore better code review tools that can show both the generated code and the LLM context that produced it.</li>
</ul>

<h2 id="critical-observations">Critical Observations</h2>
<ul>
  <li>Using an LLM agent for a new product idea can drastically reduce the overall time for actual product development. But there is a real risk of losing an understanding of the underlying code of the product. So you need to slow down to bring yourself up to speed.</li>
  <li>Writing code via LLMs does not remove my responsibility to read the generated code to understand the in-depth context.</li>
  <li>We need to have in-depth context of the problem/domain as well as coding/computer science knowledge for better prompts and a better way to lead the agents in the right direction.</li>
  <li>I need to create LLM agent skills or rules to make the code style and quality closer to the way I would have written it.</li>
</ul>

<hr />]]></content><author><name>Harsha Kadekar</name></author><category term="Technical" /><category term="llm" /><summary type="html"><![CDATA[Overview]]></summary></entry><entry><title type="html">Poem-ಕವನ-ಯೋಜನೆಗಳು</title><link href="https://harsha-kadekar.github.io/poem-%E0%B2%95%E0%B2%B5%E0%B2%A8-%E0%B2%AF%E0%B3%8B%E0%B2%9C%E0%B2%A8%E0%B3%86%E0%B2%97%E0%B2%B3%E0%B3%81.html" rel="alternate" type="text/html" title="Poem-ಕವನ-ಯೋಜನೆಗಳು" /><published>2026-02-26T00:00:00+00:00</published><updated>2026-02-26T00:00:00+00:00</updated><id>https://harsha-kadekar.github.io/poem-%E0%B2%95%E0%B2%B5%E0%B2%A8-%E0%B2%AF%E0%B3%8B%E0%B2%9C%E0%B2%A8%E0%B3%86%E0%B2%97%E0%B2%B3%E0%B3%81</id><content type="html" xml:base="https://harsha-kadekar.github.io/poem-%E0%B2%95%E0%B2%B5%E0%B2%A8-%E0%B2%AF%E0%B3%8B%E0%B2%9C%E0%B2%A8%E0%B3%86%E0%B2%97%E0%B2%B3%E0%B3%81.html"><![CDATA[<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ಎಷ್ಟೆಲ್ಲ ಯೋಜನೆಗಳು 
ಎಷ್ಟೆಲ್ಲ ಪ್ರಯತ್ನಗಳು 
ನೀ ಇಲ್ಲದ ಪ್ರಯತ್ನಗಳು 
ನೀ ಇಲ್ಲದ ಯೋಜನೆಗಳು
ಗುರಿಯಿಲ್ಲದೆ ದಿಗಿಲೆನಿಸುವ
ನಿನ್ನ ಹಾದಿಯನ್ನೇ ಕಾಯುತ್ತಿರುವ ಈ ನಿನ್ನ ಶಾಮ
</code></pre></div></div>]]></content><author><name>Harsha Kadekar</name></author><category term="poem-ಕವನ" /><summary type="html"><![CDATA[ಎಷ್ಟೆಲ್ಲ ಯೋಜನೆಗಳು  ಎಷ್ಟೆಲ್ಲ ಪ್ರಯತ್ನಗಳು  ನೀ ಇಲ್ಲದ ಪ್ರಯತ್ನಗಳು  ನೀ ಇಲ್ಲದ ಯೋಜನೆಗಳು ಗುರಿಯಿಲ್ಲದೆ ದಿಗಿಲೆನಿಸುವ ನಿನ್ನ ಹಾದಿಯನ್ನೇ ಕಾಯುತ್ತಿರುವ ಈ ನಿನ್ನ ಶಾಮ]]></summary></entry></feed>