<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://mehla.in/feed.xml" rel="self" type="application/atom+xml" /><link href="https://mehla.in/" rel="alternate" type="text/html" hreflang="en" /><updated>2026-10-01T05:00:25+00:00</updated><id>https://mehla.in/feed.xml</id><title type="html">Gaurav Mehla</title><subtitle>Engineer, builder, and forward thinker. Essays and ideas on technology, software, and the future.</subtitle><author><name>Gaurav Mehla</name></author><entry><title type="html">My Agents Never Said “I Don’t Know”</title><link href="https://mehla.in/blog/my-agents-never-said-i-dont-know" rel="alternate" type="text/html" title="My Agents Never Said “I Don’t Know”" /><published>2026-09-30T00:00:00+00:00</published><updated>2026-09-30T00:00:00+00:00</updated><id>https://mehla.in/blog/my-agents-never-said-i-dont-know</id><content type="html" xml:base="https://mehla.in/blog/my-agents-never-said-i-dont-know"><![CDATA[<p>There’s a tempting idea going around right now. Why write code at all, when you can just ask an agent to do the task every time?</p>

<p>For a while, one of my projects worked exactly like that. It’s an agent that takes messy input, like photos, exports and half-finished documents, and turns it into clean records I rely on. I’d hand it the input, and it would read it, work out what had changed, update everything, and tell me the result. No real code in the middle, just the agent.</p>

<p>It felt like the future. Mostly, it worked.</p>

<h2 id="the-problem-with-mostly">The problem with “mostly”</h2>

<p>“Mostly” is fine for a lot of things. It’s fine for a first draft, a summary, or an idea to bounce around. It’s not fine for something you rely on to be right.</p>

<p>The agent never crashed and never threw an error. Every so often it was just a little bit wrong: something counted twice, something quietly skipped, a number estimated when it should have been looked up. And it was wrong with exactly the same confidence it had when it was right.</p>

<p>That’s the part that matters. An agent doesn’t say “I don’t know.” It gives you an answer that sounds finished. When it’s wrong, nothing tells you. You find out later, if you find out at all.</p>

<h2 id="a-brilliant-reader-an-unreliable-calculator">A brilliant reader, an unreliable calculator</h2>

<p>The easiest way I’ve found to explain it is this: an agent is like a brilliant reader who is an unreliable calculator.</p>

<p>Hand it a blurry photo or a messy document, and it will tell you what’s in it better than any code I could write. That’s real magic, and I wouldn’t give it up.</p>

<p>But ask that same reader to add up a long column of numbers in their head, every week, forever, and never slip once? You wouldn’t. Not because they aren’t smart, but because that isn’t a job for judgement. It’s a job for a calculator: something that gives the same answer every time, and that you can check.</p>

<p>Code is the calculator. It does exactly what it says, the same way every time. You can test it, and you can prove it’s right before you rely on it. When it doesn’t know something, you can make it stop and ask instead of guessing.</p>

<h2 id="so-i-split-the-job">So I split the job</h2>

<p>This week I drew a line through the middle of the project.</p>

<p><strong>The agent reads.</strong> It looks at the messy input and says what’s in it. That’s the part that needs intelligence.</p>

<p><strong>Code writes.</strong> Everything that changes my data now goes through plain code that follows the same rules every time. It doesn’t add something twice. It doesn’t quietly overwrite something that changed; it holds it for me to look at. It doesn’t skip what it doesn’t understand; it stops and says so. And when it isn’t sure, it leaves the field empty and waits for me instead of filling in a confident guess.</p>

<p>To check the new version, I ran a real update through it and compared the result with what the agent had produced on its own. They matched, and now I know <em>why</em> they matched.</p>

<h2 id="the-twist-an-agent-wrote-the-code">The twist: an agent wrote the code</h2>

<p>Here’s the part I find most interesting. I didn’t write most of that code by hand. I wrote it together with a coding agent.</p>

<p>So an agent was involved either way. The difference is <em>where</em> its work ends up. When the agent does the task directly, its work is gone the moment it answers. You get a result, and you have to trust it. When the agent writes code, its work sticks around as something you can read, test and run a thousand times, and it gives the same answer every time.</p>

<p>That’s the whole idea in one line: <strong>Agents can write the code, but they can’t replace it.</strong></p>

<p>If anything, agents make it <em>easier</em> to choose code. Writing the careful, boring version used to be the expensive option. Now it’s an afternoon. There’s less excuse than ever to skip it.</p>

<h2 id="soon-theyll-just-write-the-binary">“Soon they’ll just write the binary”</h2>

<p>A few weeks ago I heard a prediction that has stuck with me. Since agents can write code, the argument goes, we won’t need programming languages much longer: no high-level languages, no low-level languages, no compilers. The agent will just output the raw binary, the ones and zeros the machine runs.</p>

<p>I understand why it sounds plausible. After this week, I think it gets the job of code backwards.</p>

<p>Agents and code are good at completely different things. <strong>An agent gives you generalisation.</strong> It can handle input it has never seen before and make a sensible call about something nobody wrote a rule for. <strong>Code gives you reliability.</strong> It does exactly what it says, the same way every time, and you can check that before you trust it.</p>

<p>Code isn’t perfect. It has bugs. But a bug in code is wrong <em>the same way every time</em>, so you can find it, understand it, and fix it once. An agent’s mistakes come and go, and they look exactly like its correct answers.</p>

<p>Programming languages and compilers were never really for the machine. The machine would happily run raw binary. They’re for <em>us</em>, so a person can read what the program will do, review it, and reason about it. A compiler is a check that refuses to continue when something doesn’t add up. In other words, it’s a system that says “I don’t know.”</p>

<p>An agent that skips all of that and hands you raw binary gives you back exactly the problem from my project, at the lowest level there is: an answer that looks finished, that nobody can read, and that you simply have to trust. I don’t want less code because agents can write it. I want more code that I can read, written faster.</p>

<h2 id="what-id-tell-anyone-building-with-agents">What I’d tell anyone building with agents</h2>

<ul>
  <li><strong>Use the agent where you need generalisation:</strong> reading, understanding, explaining.</li>
  <li><strong>Use code where you need reliability:</strong> counting, changing data, following rules.</li>
  <li><strong>Make it fail loudly.</strong> A system that stops and asks is better than one that quietly guesses.</li>
  <li><strong>Let the agent write that code.</strong> Then test it like you would any other code.</li>
</ul>

<p>Agents are a new kind of tool, and a remarkable one. But they’re a tool <em>for</em> building software, not a replacement for it.</p>]]></content><author><name>Gaurav Mehla</name></author><summary type="html"><![CDATA[One of my agents was confidently wrong just often enough to matter. Fixing it taught me that agents can write code, but they can't replace it.]]></summary></entry><entry><title type="html">Hello World</title><link href="https://mehla.in/blog/hello-world" rel="alternate" type="text/html" title="Hello World" /><published>2026-03-09T00:00:00+00:00</published><updated>2026-03-09T00:00:00+00:00</updated><id>https://mehla.in/blog/hello-world</id><content type="html" xml:base="https://mehla.in/blog/hello-world"><![CDATA[<p>This is the beginning of something new.</p>

<p>For over a decade, I’ve been building software — leading teams, designing systems, writing code. My old portfolio was a showcase of what I <em>know</em>. Skills, frameworks, progress bars. It served its purpose.</p>

<p>But I’ve been thinking differently lately. The most valuable thing I can share isn’t a list of technologies. It’s how I think — about engineering, about the future, about the problems worth solving.</p>

<p>So I rebuilt this site from scratch. No frameworks, no build steps. Just words.</p>

<h2 id="what-to-expect">What to expect</h2>

<p>I’ll be writing about:</p>

<ul>
  <li><strong>The Agentic Era</strong> — How AI agents are reshaping software development and what it means for engineers</li>
  <li><strong>System Design</strong> — Lessons from building and scaling real-world systems</li>
  <li><strong>Forward Thinking</strong> — Ideas about where technology is heading and why it matters</li>
</ul>

<h2 id="why-now">Why now?</h2>

<p>We’re at an inflection point. The tools we use to build software are changing faster than at any point in my career. I want to think out loud about what that means — for builders, for teams, for the industry.</p>

<p>Stay tuned.</p>]]></content><author><name>Gaurav Mehla</name></author><summary type="html"><![CDATA[My first post on the new site.]]></summary></entry></feed>