<?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: Iam vin</title>
    <description>The latest articles on DEV Community by Iam vin (@beingvin).</description>
    <link>https://dev.to/beingvin</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%2F1136134%2F64480b7b-6637-4d58-b6a7-01339961b9a8.png</url>
      <title>DEV Community: Iam vin</title>
      <link>https://dev.to/beingvin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/beingvin"/>
    <language>en</language>
    <item>
      <title>AI Hall of Shame: How 4 Most Powerful AI Failed My Bug, and Backspace Won</title>
      <dc:creator>Iam vin</dc:creator>
      <pubDate>Fri, 08 Aug 2025 17:55:40 +0000</pubDate>
      <link>https://dev.to/beingvin/ai-hall-of-shame-how-4-most-powerful-ai-failed-my-bug-and-backspace-won-5gaa</link>
      <guid>https://dev.to/beingvin/ai-hall-of-shame-how-4-most-powerful-ai-failed-my-bug-and-backspace-won-5gaa</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;The AI Hall of Shame 😅&lt;/strong&gt;
&lt;/h1&gt;

&lt;h2&gt;
  
  
  How I Beat a 15-Day React Bug That Outsmarted 4 AI Geniuses
&lt;/h2&gt;




&lt;h3&gt;
  
  
  The Setup 🎭
&lt;/h3&gt;

&lt;p&gt;Imagine this: You’re building a sleek art competition platform with &lt;strong&gt;Next.js&lt;/strong&gt; and &lt;strong&gt;Supabase&lt;/strong&gt;. Everything’s looking great — artists can upload their work, people can vote in real time, navigation is buttery smooth.&lt;/p&gt;

&lt;p&gt;Then… &lt;em&gt;bam&lt;/em&gt;.&lt;br&gt;
A tiny, annoying flicker pops up every time you switch browser tabs. The gallery disappears, shows a loading spinner, then comes back.&lt;/p&gt;

&lt;p&gt;“Eh, easy fix,” I thought.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spoiler:&lt;/strong&gt; I was wrong.&lt;br&gt;
What followed was a &lt;strong&gt;15-day debugging saga&lt;/strong&gt; where I fought four of the most advanced AI coding models… and won.&lt;/p&gt;


&lt;h3&gt;
  
  
  The Project 🎨
&lt;/h3&gt;

&lt;p&gt;The site had some neat features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User uploads&lt;/strong&gt;: Artists submit their masterpieces&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live voting&lt;/strong&gt;: Likes update instantly via Supabase&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple pages&lt;/strong&gt;: Gallery, dashboard, voting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React Query&lt;/strong&gt;: For smooth data fetching &amp;amp; caching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything was perfect… except for &lt;em&gt;The Flicker&lt;/em&gt;™.&lt;/p&gt;


&lt;h3&gt;
  
  
  The Bug 🐛
&lt;/h3&gt;

&lt;p&gt;Every time I switched tabs and came back, the gallery blinked like a shy contestant on a game show.&lt;/p&gt;

&lt;p&gt;The symptoms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React Query cache seemed to reset&lt;/li&gt;
&lt;li&gt;Components re-rendered with empty data&lt;/li&gt;
&lt;li&gt;Loading states triggered unnecessarily&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was subtle, but it drove me &lt;em&gt;nuts&lt;/em&gt;.&lt;/p&gt;


&lt;h3&gt;
  
  
  The Challengers 🥊
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;In the Red Corner:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DeepSeek R1 (logic ninja 🥷)&lt;/li&gt;
&lt;li&gt;Gemini 2.5 Pro (Google’s heavyweight)&lt;/li&gt;
&lt;li&gt;ChatGPT 4o (the OG)&lt;/li&gt;
&lt;li&gt;Claude Sonnet 4.0 (the philosophical one)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;In the Blue Corner:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One increasingly sleep-deprived human developer&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  Round 1: DeepSeek R1 ❌
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Plan:&lt;/strong&gt; Supercharge React Query’s cache.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tweaked &lt;code&gt;staleTime&lt;/code&gt; &amp;amp; &lt;code&gt;cacheTime&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Added optimistic updates&lt;/li&gt;
&lt;li&gt;Overhauled cache invalidation&lt;/li&gt;
&lt;li&gt;Added error boundaries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code added:&lt;/strong&gt; ~80 lines&lt;br&gt;
&lt;strong&gt;Result:&lt;/strong&gt; Cache was spotless. Flicker still danced on.&lt;/p&gt;


&lt;h3&gt;
  
  
  Round 2: Gemini 2.5 Pro ❌
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Plan:&lt;/strong&gt; Rebuild the architecture.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Aggressive &lt;code&gt;useMemo&lt;/code&gt; &amp;amp; &lt;code&gt;useCallback&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Optimized dependency arrays&lt;/li&gt;
&lt;li&gt;Split components, added lazy loading&lt;/li&gt;
&lt;li&gt;Tightened context logic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code added:&lt;/strong&gt; ~120 lines&lt;br&gt;
&lt;strong&gt;Result:&lt;/strong&gt; Faster overall. Flicker didn’t care.&lt;/p&gt;


&lt;h3&gt;
  
  
  Round 3: ChatGPT 4o ❌
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Plan:&lt;/strong&gt; State management revamp.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cleaner loading states&lt;/li&gt;
&lt;li&gt;Async flow improvements&lt;/li&gt;
&lt;li&gt;Lifecycle tweaks&lt;/li&gt;
&lt;li&gt;More graceful error handling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code added:&lt;/strong&gt; ~60 lines&lt;br&gt;
&lt;strong&gt;Result:&lt;/strong&gt; Better UX… flicker still smirking.&lt;/p&gt;


&lt;h3&gt;
  
  
  Round 4: Claude Sonnet 4.0 ❌
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Plan:&lt;/strong&gt; “Smart” loading states.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-level &lt;code&gt;userDataLoaded&lt;/code&gt; checks&lt;/li&gt;
&lt;li&gt;Conditional rendering layers&lt;/li&gt;
&lt;li&gt;Real-time listener tweaks&lt;/li&gt;
&lt;li&gt;Hydration state fixes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code added:&lt;/strong&gt; ~100 lines&lt;br&gt;
&lt;strong&gt;Result:&lt;/strong&gt; Over-engineered masterpiece… flicker still undefeated.&lt;/p&gt;


&lt;h3&gt;
  
  
  The Turning Point 💡
&lt;/h3&gt;

&lt;p&gt;After 15 days of AI wizardry, I was staring at this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;authLoading&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;userIdLoading&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;submissionsLoading&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;allSubmissions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;Loading&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then it hit me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What if the problem isn’t what I need to &lt;strong&gt;add&lt;/strong&gt;… but what I need to &lt;strong&gt;remove&lt;/strong&gt;?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I tried this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;authLoading&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;submissionsLoading&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;allSubmissions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;Loading&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;BOOM.&lt;/strong&gt; 💥 Flicker gone.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Real Culprit 🕵️
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cause:&lt;/strong&gt; &lt;code&gt;userIdLoading&lt;/code&gt; briefly flipped to &lt;code&gt;true&lt;/code&gt; after tab switches, triggering the loading state and wiping the gallery.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix:&lt;/strong&gt; Delete &lt;code&gt;userIdLoading ||&lt;/code&gt; from the condition.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Damage Report:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Characters deleted: &lt;strong&gt;14&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Days lost: &lt;strong&gt;15&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;AI egos bruised: &lt;strong&gt;4&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Extra code suggested: ~360 lines&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  The AI Autopsy 🔬
&lt;/h3&gt;

&lt;p&gt;After the win, I asked the AIs why they failed. Here’s the tea:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DeepSeek R1:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“We see code statistically, not in context. If three loading checks look valid, we don’t question them.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Gemini 2.5 Pro:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“We can’t &lt;em&gt;see&lt;/em&gt; the flicker. Timing issues are invisible to us.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;ChatGPT:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“We pattern-match bugs to common fixes, but miss the human intuition of ‘maybe this isn’t needed.’”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Claude:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Simple fixes don’t make it into our training data. We’re trained to sound smart, not be simple.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Lessons Learned 📚
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;For Developers:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start simple — try deleting before refactoring&lt;/li&gt;
&lt;li&gt;Question every condition&lt;/li&gt;
&lt;li&gt;Trust your gut&lt;/li&gt;
&lt;li&gt;Let AI design architecture, but debug with your brain&lt;/li&gt;
&lt;li&gt;Remember Occam’s Razor: simplest is usually right&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;About AI Limits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They love complex “impressive” answers&lt;/li&gt;
&lt;li&gt;They can’t perceive time-based UI glitches&lt;/li&gt;
&lt;li&gt;They miss root causes hiding in plain sight&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  The Hall of Shame Scoreboard 🏆
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🏆 Human: -14 characters → bug dead
❌ DeepSeek: +80 lines
❌ Gemini: +120 lines
❌ ChatGPT: +60 lines
❌ Claude: +100 lines
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Final Thoughts 🎯
&lt;/h3&gt;

&lt;p&gt;Sometimes the smartest code… is the code you don’t write.&lt;br&gt;
Next time AI tells you to rebuild your app to fix a flicker — maybe try deleting one line first.&lt;/p&gt;




</description>
      <category>ai</category>
      <category>programming</category>
      <category>nextjs</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
