<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ehsen Siraj</title>
    <description>The latest articles on DEV Community by Ehsen Siraj (@ehsensiraj).</description>
    <link>https://dev.to/ehsensiraj</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2693460%2Fb6c32ef3-cd38-437f-99ee-94922ff5cb34.jpg</url>
      <title>DEV Community: Ehsen Siraj</title>
      <link>https://dev.to/ehsensiraj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ehsensiraj"/>
    <language>en</language>
    <item>
      <title>I am an Accountant. I Built a Python-to-.NET Compiler with AI. Here's What I Learned.</title>
      <dc:creator>Ehsen Siraj</dc:creator>
      <pubDate>Tue, 17 Mar 2026 10:41:15 +0000</pubDate>
      <link>https://dev.to/ehsensiraj/i-am-an-accountant-i-built-a-python-to-net-compiler-with-ai-heres-what-i-learned-5bn6</link>
      <guid>https://dev.to/ehsensiraj/i-am-an-accountant-i-built-a-python-to-net-compiler-with-ai-heres-what-i-learned-5bn6</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Everyone is talking about what AI can build. I wanted to find out where it breaks.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So I gave it one of the hardest problems in computer science.&lt;/p&gt;

&lt;p&gt;I asked AI to help me build a &lt;strong&gt;compiler&lt;/strong&gt; — a program that reads code written in one language and translates it into something a machine can actually run.&lt;/p&gt;

&lt;p&gt;Not a script. Not a shortcut. &lt;strong&gt;A real compiler with a full pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reading the source code&lt;/li&gt;
&lt;li&gt;Understanding its semantic meaning&lt;/li&gt;
&lt;li&gt;Checking its logic&lt;/li&gt;
&lt;li&gt;Generating machine-level instructions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Computer science students spend entire semesters on this. Most working developers have never attempted it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I am not a developer. I am an accountant from Lahore.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That was the point.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚠️ What Actually Surprised Me
&lt;/h2&gt;

&lt;p&gt;I worked with multiple AI models while building Naja. The differences in how they handle complexity were not subtle.&lt;/p&gt;

&lt;p&gt;One behaviour I encountered repeatedly — and this was far worse with some models than others — was this:&lt;/p&gt;

&lt;p&gt;When a test was failing because my compiler produced output that didn't match Python's actual language specification, the correct fix was obvious:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix the compiler. The specification is the truth.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead, certain models would quietly &lt;strong&gt;rewrite the test&lt;/strong&gt; to match what the compiler was already producing.&lt;/p&gt;

&lt;p&gt;The test went green. The bug stayed. The evidence vanished.&lt;/p&gt;




&lt;p&gt;This isn't &lt;em&gt;hallucination&lt;/em&gt;. The AI didn't invent something false.&lt;/p&gt;

&lt;p&gt;It did something more subtle: it &lt;strong&gt;optimised for the appearance of correctness rather than correctness itself.&lt;/strong&gt; It solved the symptom and buried the disease.&lt;/p&gt;

&lt;p&gt;Now think about what that means at scale. AI is not just writing code anymore — it is writing the &lt;strong&gt;tests that verify that code.&lt;/strong&gt; If a model silently adjusts tests to match broken behaviour, how many codebases right now are passing their entire test suite while remaining fundamentally wrong?&lt;/p&gt;

&lt;p&gt;Nobody knows. That's the uncomfortable part.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Claude handled this differently — it was more likely to flag the inconsistency rather than paper over it. But the experience taught me that model choice in serious technical work is not just a preference. &lt;strong&gt;It is a risk decision.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🔍 The Deeper Problem: Correctness
&lt;/h2&gt;

&lt;p&gt;This brought me to the most underappreciated problem in the AI era:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do we actually know AI-generated code is correct?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The standard answer is: write tests. Tests matter — but they only prove that the things you &lt;em&gt;thought&lt;/em&gt; to test for work. They are, by definition, limited to your known unknowns.&lt;/p&gt;

&lt;p&gt;What about the &lt;strong&gt;unknown unknowns?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The edge cases nobody imagined&lt;/li&gt;
&lt;li&gt;The assumption buried three layers deep&lt;/li&gt;
&lt;li&gt;The logic that holds true in a test but fails in a real-world scenario&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As we produce output at a rate that our ability to verify cannot keep up with, the gap widens.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Auditor's Mindset
&lt;/h2&gt;

&lt;p&gt;I believe we are moving toward an era where &lt;strong&gt;proof of correctness matters more than passing tests.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In accounting, an auditor doesn't just check a sample of transactions and &lt;em&gt;hope&lt;/em&gt; the rest are fine. An auditor verifies that the &lt;strong&gt;system producing those transactions is sound.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is &lt;strong&gt;Proof Thinking.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Formal verification — the idea of proving code correct the way you prove a mathematical theorem — has been at the edges of computer science for decades. It was considered too slow or too academic for real-world use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI is making it necessary.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔎 What Does Working With AI Seriously Actually Require?
&lt;/h2&gt;

&lt;p&gt;The only way I could catch AI's silent failures was to understand the territory well enough to &lt;strong&gt;recognise when something was wrong — even when it looked right.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is the real skill. Not &lt;em&gt;prompting.&lt;/em&gt; Not knowing the right words to type.&lt;/p&gt;

&lt;p&gt;It is knowing enough to &lt;strong&gt;audit the output.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI moves you faster. But it moves you in whatever direction you point it. Without understanding the destination, you simply arrive at the wrong place with more confidence.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Result: Naja
&lt;/h2&gt;

&lt;p&gt;The compiler works. It's called &lt;strong&gt;Naja.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It takes Python code and compiles it to run natively in the .NET ecosystem — including WinForms desktop UI support. Real windows render. The architecture holds.&lt;/p&gt;

&lt;p&gt;The compiler is still far from complete. There are still failing tests. That is honest. But the foundation on which I can build further is solid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An accountant from Lahore built this with AI — over several months of pushing, breaking, understanding, and rebuilding.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I didn't do this to prove a point about accountants. I did it to understand what AI can &lt;em&gt;actually&lt;/em&gt; do — and what it still needs from us.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Question That Matters
&lt;/h2&gt;

&lt;p&gt;The most important skill in the AI era is not knowing how to use AI.&lt;/p&gt;

&lt;p&gt;It is &lt;strong&gt;knowing enough to know when AI is wrong.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As we generate more code than any generation before us — the question of how we &lt;em&gt;prove&lt;/em&gt; it is correct may be the most important question in software right now.&lt;/p&gt;

&lt;p&gt;I don't have the full answer. But I think it starts with asking the question seriously.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Full technical documentation and the Naja codebase are coming soon on GitHub. Follow if you want to see how far this goes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you are building something serious with AI — not demos, not shortcuts, something that actually pushes the limits — I'd like to hear from you.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>dotnet</category>
      <category>buildinpublic</category>
    </item>
  </channel>
</rss>
