<?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: Miitobow | Building apps with AI</title>
    <description>The latest articles on DEV Community by Miitobow | Building apps with AI (@miitobow).</description>
    <link>https://dev.to/miitobow</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4026801%2F9e3e7709-7980-4d58-abac-211495b96c50.jpg</url>
      <title>DEV Community: Miitobow | Building apps with AI</title>
      <link>https://dev.to/miitobow</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/miitobow"/>
    <language>en</language>
    <item>
      <title>I had my AI review its own code, and it found 3 bugs it had just written</title>
      <dc:creator>Miitobow | Building apps with AI</dc:creator>
      <pubDate>Mon, 13 Jul 2026 07:38:17 +0000</pubDate>
      <link>https://dev.to/miitobow/i-had-my-ai-review-its-own-code-and-it-found-3-bugs-it-had-just-written-3430</link>
      <guid>https://dev.to/miitobow/i-had-my-ai-review-its-own-code-and-it-found-3-bugs-it-had-just-written-3430</guid>
      <description>&lt;p&gt;Do you trust the code your AI assistant just wrote for you?&lt;/p&gt;

&lt;p&gt;I did. More than I should have.&lt;/p&gt;

&lt;p&gt;Lately, right after my AI (I use Claude Code) writes something, I ask it one more thing: pretend you didn't write this. Review it like a skeptical senior engineer who's never seen it before.&lt;/p&gt;

&lt;p&gt;Last week, that one extra step found 3 bugs. In code the same AI had written minutes earlier. Bugs it hadn't noticed at all when it wrote it.&lt;/p&gt;

&lt;p&gt;Turns out, the person who writes something can't see its flaws. And apparently, that's true for AI too.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug that started it
&lt;/h2&gt;

&lt;p&gt;I'm building a Windows app that translates screenshots on the fly. Paste a screenshot, it OCRs the text and overlays a translation.&lt;/p&gt;

&lt;p&gt;One screen type kept beating it: white text on a dark navy header. Buttons like "Sign up" or "Help" — completely skipped. Not mistranslated, just never even detected as text.&lt;/p&gt;

&lt;p&gt;The cause: the OCR pipeline decided "dark background = ignore this region" and threw the whole header away before even trying to read it.&lt;/p&gt;

&lt;p&gt;I asked Claude Code to fix it — detect dark regions, invert them locally, then run OCR. That part worked. "Sign up" and "Help" started translating correctly.&lt;/p&gt;

&lt;p&gt;I thought I was done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then I made the AI doubt itself
&lt;/h2&gt;

&lt;p&gt;Here's the habit: I never let the AI mark its own work "finished." Right after it writes something, I ask the &lt;em&gt;same&lt;/em&gt; AI to switch roles — become a skeptical reviewer who's never seen this code, and rip apart the diff it just wrote.&lt;/p&gt;

&lt;p&gt;This time, it found 3 real bugs in the fix it had just shipped:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. "Anything long and thin must be a button"&lt;/strong&gt;&lt;br&gt;
The button-detection logic was missing a width check. A single thin vertical stroke of text got mistaken for a button edge — splitting words like "DASHBOARD" into fragments and making them unreadable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The noise-removal rule was too aggressive&lt;/strong&gt;&lt;br&gt;
A rule meant to clean up small artifacts was matching a much wider range than intended, and it was quietly deleting text it should have kept.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Brightness was measured the wrong way&lt;/strong&gt;&lt;br&gt;
The logic deciding whether to invert a region measured brightness by looking at how much of a character's &lt;em&gt;ink&lt;/em&gt; was bright — so a bold white letter (lots of bright pixel area) got misread as "this is a bright button," and the region never got inverted at all.&lt;/p&gt;

&lt;p&gt;None of these were caught when the code was written. Everything looked like it worked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does the same AI catch its own blind spots when you just... ask differently?
&lt;/h2&gt;

&lt;p&gt;This is the part I keep thinking about.&lt;/p&gt;

&lt;p&gt;The model that wrote the code and the model that reviewed it are the same model. Nothing changed except the role I asked it to play.&lt;/p&gt;

&lt;p&gt;My best guess: writing code and reviewing code point your attention in different directions. When you're writing to satisfy an intent, you're checking "does this match what I meant to do?" Whether the intent itself was wrong barely enters your field of view.&lt;/p&gt;

&lt;p&gt;Reviewing flips that. You start from "is this intent even correct?" — no assumption that the goal was right in the first place.&lt;/p&gt;

&lt;p&gt;It's the same reason a second human catches a bug in code you just wrote, instantly, that you missed for an hour. You remember what you meant. That memory is exactly what blinds you.&lt;/p&gt;

&lt;h2&gt;
  
  
  One more thing: don't trust the review either
&lt;/h2&gt;

&lt;p&gt;Switching the AI's role produces a &lt;em&gt;lot&lt;/em&gt; of findings. Not all of them are real bugs. Some are intentional design choices getting flagged as "wrong." Some are just misreadings.&lt;/p&gt;

&lt;p&gt;So I never apply a finding straight from the review. Everything gets triaged first: real bug, intentional, or false positive — with the reasoning grounded in the actual code, not a guess. Only confirmed real bugs get fixed, and only with the smallest change that doesn't break the original intent.&lt;/p&gt;

&lt;p&gt;Skip that step and you'll end up thrashing perfectly correct code because an overeager review said so.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual takeaway
&lt;/h2&gt;

&lt;p&gt;The person who wrote it can't see its flaws. That's not a human-only limitation — it applies to AI too.&lt;/p&gt;

&lt;p&gt;So now, every time I have an AI write or fix something, I make it play a second role before I call it done: someone who's never seen this code, whose job is to find what the author missed.&lt;/p&gt;

&lt;p&gt;Since I started doing this, I catch noticeably more bugs before a user ever does.&lt;/p&gt;




&lt;p&gt;I actually use two specific prompts every time I do this — one to force the "skeptical reviewer" review itself, one to triage what comes back so I don't blindly apply every finding. If people want the exact prompts, let me know in the comments — I might put together something more detailed with the full toolkit.&lt;/p&gt;

&lt;p&gt;I post more of this kind of thing (solo dev + AI, the wins and the messes) on &lt;a href="https://www.threads.net/@miitobow" rel="noopener noreferrer"&gt;Threads&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>coding</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
