<?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: Yancan Chen</title>
    <description>The latest articles on DEV Community by Yancan Chen (@ican).</description>
    <link>https://dev.to/ican</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%2F3988622%2Fe6bb6f20-a792-4e36-850c-559240176f2d.jpg</url>
      <title>DEV Community: Yancan Chen</title>
      <link>https://dev.to/ican</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ican"/>
    <language>en</language>
    <item>
      <title>I stopped blindly trusting AI-generated code's Big-O — here's how</title>
      <dc:creator>Yancan Chen</dc:creator>
      <pubDate>Thu, 25 Jun 2026 03:02:02 +0000</pubDate>
      <link>https://dev.to/ican/i-stopped-blindly-trusting-ai-generated-codes-big-o-heres-how-5e32</link>
      <guid>https://dev.to/ican/i-stopped-blindly-trusting-ai-generated-codes-big-o-heres-how-5e32</guid>
      <description>&lt;p&gt;Last year I shipped a feature with a search function that Claude wrote for me. It worked perfectly in staging. In production, with real data, it turned our 300ms page into a 12-second timeout.&lt;/p&gt;

&lt;p&gt;The function was O(n²). I had accepted it without checking. Claude never mentioned it was quadratic.&lt;/p&gt;




&lt;h2&gt;
  
  
  The problem isn't that AI writes bad code
&lt;/h2&gt;

&lt;p&gt;Modern AI coding assistants write code that &lt;em&gt;works&lt;/em&gt;. That's actually the problem. When something runs without errors, your brain marks it as "done" — even if it's secretly going to fall apart at scale.&lt;/p&gt;

&lt;p&gt;AI assistants are trained to produce code that satisfies your immediate request. They're not trained to proactively say "by the way, this is O(n²) and there's an O(n log n) version." That would require second-guessing your requirements, which most of the time you don't want.&lt;/p&gt;

&lt;p&gt;So you get working code, no complexity disclosure, and a hidden assumption that you'll catch the performance issues yourself. Most of us don't.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why the usual fixes don't stick
&lt;/h2&gt;

&lt;p&gt;I've tried a few approaches:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Just ask Claude/ChatGPT about complexity after."&lt;/strong&gt; Works, but only if you remember to do it, only for code you're actively suspicious of. In practice I forget for 80% of snippets I accept.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Review every snippet manually."&lt;/strong&gt; I'm using AI to go faster. Manually reviewing every line for Big-O is slower than writing it myself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Run benchmarks."&lt;/strong&gt; Great for functions you already know are suspect. Doesn't help with the ones you don't know to benchmark.&lt;/p&gt;

&lt;p&gt;The issue is the friction. The check has to happen at the point of acceptance, not as a separate later step.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I made a Chrome extension — &lt;a href="https://chromewebstore.google.com/detail/lcfaenfeajomoombkjcoelpjmmhknlid" rel="noopener noreferrer"&gt;AI Code Explainer&lt;/a&gt; — that runs the analysis at exactly the moment you're reading a code block.&lt;/p&gt;

&lt;p&gt;Hover over any code block on ChatGPT, Claude, or GitHub for 1.5 seconds. A panel drops in below the code showing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Algorithm name&lt;/strong&gt; (e.g., "Binary search", "Depth-first traversal", "Sliding window")&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time complexity&lt;/strong&gt; (e.g., O(n log n))&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Space complexity&lt;/strong&gt; (e.g., O(1) auxiliary)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alternative&lt;/strong&gt; — if there's a meaningfully faster approach, it names it and sketches the idea&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You bring your own API key (Claude, GPT-4o mini, Gemini 2.0 Flash, Groq, or DeepSeek — Groq's free tier works with no credit card). Nothing routes through a server I run. Free tier is 10 analyses/day; Pro is $5 one-time, no subscription.&lt;/p&gt;

&lt;p&gt;The hover-trigger was a deliberate choice. A button you have to click is something you skip. A panel that appears while you're already reading the code intercepts you before you've scrolled away.&lt;/p&gt;




&lt;h2&gt;
  
  
  The checklist I use now
&lt;/h2&gt;

&lt;p&gt;Even if you don't use the extension, here's what I check on every AI-generated snippet before accepting it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What's the input size in production?&lt;/strong&gt; If the function touches a list, how long is that list at max load? Quadratic is fine for 100 items. Catastrophic for 100,000.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Does it nest loops?&lt;/strong&gt; Nested loops over the same collection are the most common source of accidental O(n²). Count them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Is there a sort hiding inside a loop?&lt;/strong&gt; &lt;code&gt;list.sort()&lt;/code&gt; inside a &lt;code&gt;for&lt;/code&gt; loop = O(n² log n). AI does this more often than you'd expect.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Does it rebuild a data structure per iteration?&lt;/strong&gt; Converting a list to a set inside a loop is O(n) work per iteration. Should be done once before the loop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ask for the alternative.&lt;/strong&gt; If you're not confident about complexity, ask the AI: &lt;em&gt;"Is there a more efficient version of this? What would the time complexity be?"&lt;/em&gt; Most of the time it knows — it just didn't offer.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The extension automates steps 1-4 for me. Step 5 still needs a human question, but it at least gives you the vocabulary to ask it well.&lt;/p&gt;




&lt;h2&gt;
  
  
  One example that changed how I use AI for code
&lt;/h2&gt;

&lt;p&gt;I was using Claude to write a deduplication function. It gave me something that iterated over a list and checked each element against a running list of seen items. Readable, obvious, correct.&lt;/p&gt;

&lt;p&gt;The extension flagged it as O(n²) and suggested a set-based approach — iterate once, check membership in O(1), total O(n). Two-line change. Same logic, 1000x faster on large inputs.&lt;/p&gt;

&lt;p&gt;I knew the set trick. I just hadn't thought to apply it because I was reading Claude's code, not writing my own. The check happened at the wrong time.&lt;/p&gt;

&lt;p&gt;That's the whole product: make the check happen at the right time.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;AI Code Explainer&lt;/strong&gt; — Chrome extension, works on ChatGPT / Claude / GitHub, BYOK, $5 one-time.&lt;br&gt;
Install: &lt;a href="https://chromewebstore.google.com/detail/lcfaenfeajomoombkjcoelpjmmhknlid" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/lcfaenfeajomoombkjcoelpjmmhknlid&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>chromeextension</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Token Watcher – see exactly what your Claude/ChatGPT conversations cost</title>
      <dc:creator>Yancan Chen</dc:creator>
      <pubDate>Thu, 18 Jun 2026 14:49:43 +0000</pubDate>
      <link>https://dev.to/ican/token-watcher-see-exactly-what-your-claudechatgpt-conversations-cost-1n14</link>
      <guid>https://dev.to/ican/token-watcher-see-exactly-what-your-claudechatgpt-conversations-cost-1n14</guid>
      <description>&lt;p&gt;Hi, I built this because I kept wondering "how much did that conversation&lt;br&gt;
actually cost me" when using Claude.ai / ChatGPT in the browser (not the API).&lt;/p&gt;

&lt;p&gt;Token Watcher intercepts the streaming responses client-side to read the&lt;br&gt;
input/output/cache token counts and computes cost against current Anthropic/&lt;br&gt;
OpenAI pricing — no API key, nothing leaves your browser.&lt;/p&gt;

&lt;p&gt;It also tracks MCP (Model Context Protocol) call health — total calls and&lt;br&gt;
error rate — which I haven't seen any other tool surface for the Claude.ai&lt;br&gt;
web UI specifically.&lt;/p&gt;

&lt;p&gt;Free tier: 7-day history, real-time cost + model breakdown, MCP monitoring.&lt;br&gt;
Pro ($9 one-time): 30-day history + CSV export.&lt;/p&gt;

&lt;p&gt;Happy to answer questions about how the token interception works or take&lt;br&gt;
feedback on what else would be useful to track.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Filflqmutekikei1ujlyf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Filflqmutekikei1ujlyf.jpg" alt=" " width="440" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why I Built a Tool to Diagnose Chrome Extension Rejections</title>
      <dc:creator>Yancan Chen</dc:creator>
      <pubDate>Wed, 17 Jun 2026 09:01:56 +0000</pubDate>
      <link>https://dev.to/ican/why-i-built-a-tool-to-diagnose-chrome-extension-rejections-1cij</link>
      <guid>https://dev.to/ican/why-i-built-a-tool-to-diagnose-chrome-extension-rejections-1cij</guid>
      <description>&lt;p&gt;I've been building indie software tools for the past year. Most of them are Chrome extensions.&lt;/p&gt;

&lt;p&gt;Last month, I was scrolling through Reddit's r/ChromeExtensions when I saw a post that stuck with me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"My extension got rejected again. Google just says 'violates policies.' I have no idea what's wrong. Should I just give up?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The replies were all the same: "Check your permissions. Add a privacy policy. Try again."&lt;/p&gt;

&lt;p&gt;But here's what bothered me: &lt;strong&gt;nobody really knew what the actual problem was.&lt;/strong&gt; Everyone was just guessing.&lt;/p&gt;

&lt;p&gt;That's when I realized — this isn't a skill issue. It's an information problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Developer's Nightmare
&lt;/h2&gt;

&lt;p&gt;Think about it from a developer's perspective:&lt;/p&gt;

&lt;p&gt;You spend weeks building a Chrome extension. You think it's solid. You submit it to Google Web Store.&lt;/p&gt;

&lt;p&gt;48 hours later: &lt;strong&gt;Rejected.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Google's email: &lt;em&gt;"Your extension violates Chrome Web Store policies. Please review our policies and resubmit."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That's it. No specifics. No "it's the webRequest permission" or "your description is misleading." Just... rejected.&lt;/p&gt;

&lt;p&gt;So what do you do?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read 50 pages of Chrome Web Store policy documentation (which one applies?)&lt;/li&gt;
&lt;li&gt;Check Reddit threads from 2021 (still relevant?)&lt;/li&gt;
&lt;li&gt;Delete random permissions (will this actually fix it?)&lt;/li&gt;
&lt;li&gt;Resubmit and hope (probability of passing: unknown)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This cycle can repeat 3-5 times.&lt;/strong&gt; Each time, you lose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;48 hours waiting&lt;/li&gt;
&lt;li&gt;Opportunity cost (could've been building something else)&lt;/li&gt;
&lt;li&gt;Confidence (is my code just bad?)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And here's the kicker: &lt;strong&gt;there's no appeal process.&lt;/strong&gt; You can't argue with Google. You just... try again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters (Especially to Indies)
&lt;/h2&gt;

&lt;p&gt;For enterprises, this is an annoyance. They have DevOps teams and compliance experts.&lt;/p&gt;

&lt;p&gt;For indie developers like me, this is a &lt;strong&gt;real blocker.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your Chrome extension is distribution channel + credibility + revenue. Without it, you're stuck.&lt;/p&gt;

&lt;p&gt;I started tracking rejections in the community. The numbers surprised me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;40% of first-time rejections&lt;/strong&gt; are due to "overly broad permissions"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;25%&lt;/strong&gt; are missing privacy policy or misleading descriptions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;20%&lt;/strong&gt; are due to unclear functionality&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;15%&lt;/strong&gt; are edge cases or genuinely confused rejections&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first three categories? &lt;strong&gt;They're 100% preventable&lt;/strong&gt; if developers knew exactly what Google was looking for.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Idea
&lt;/h2&gt;

&lt;p&gt;I thought: &lt;strong&gt;What if there was a tool that could diagnose rejection reasons in seconds?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A tool that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Takes Google's vague rejection email&lt;/li&gt;
&lt;li&gt;Analyzes your manifest.json and extension description&lt;/li&gt;
&lt;li&gt;Tells you exactly which policy you violated and why&lt;/li&gt;
&lt;li&gt;Suggests specific fixes with code examples&lt;/li&gt;
&lt;li&gt;Generates a professional appeal letter&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Not a guessing game. &lt;strong&gt;Actual diagnosis.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Chrome Extension Doctor
&lt;/h2&gt;

&lt;p&gt;I spent the last 3 weeks building exactly that.&lt;/p&gt;

&lt;p&gt;Here's what it does:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Upload Your Info&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste Google's rejection reason&lt;/li&gt;
&lt;li&gt;Paste your manifest.json&lt;/li&gt;
&lt;li&gt;Briefly describe your extension&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 2: AI Diagnosis&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analyzes against Chrome Web Store policies&lt;/li&gt;
&lt;li&gt;Identifies high/medium/low risk issues&lt;/li&gt;
&lt;li&gt;Explains why each one is a problem&lt;/li&gt;
&lt;li&gt;Suggests specific fixes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Generate Appeal&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates a professional appeal letter&lt;/li&gt;
&lt;li&gt;References specific Google policies&lt;/li&gt;
&lt;li&gt;Lists all your improvements&lt;/li&gt;
&lt;li&gt;Ready to send to Google&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The whole process takes 30 seconds instead of 3 hours of researching.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I'm Sharing This
&lt;/h2&gt;

&lt;p&gt;I could've just kept this as a side project. But I realized: &lt;strong&gt;this is exactly the kind of tool indie developers need.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It solves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Information asymmetry (Google doesn't explain rejections)&lt;/li&gt;
&lt;li&gt;✅ Time waste (hours of research → 30 seconds)&lt;/li&gt;
&lt;li&gt;✅ Emotional frustration (someone actually helps)&lt;/li&gt;
&lt;li&gt;✅ Increased success rate (you fix the real problem, not guessed problems)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;I'm launching &lt;strong&gt;Chrome Extension Doctor&lt;/strong&gt; this week.&lt;/p&gt;

&lt;p&gt;It's built on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Pure HTML/CSS/JS (no framework bloat)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Cloudflare Workers + Claude API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to use:&lt;/strong&gt; Free trial included, no credit card required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tool is live and ready to try. The first 50 users will help me refine it. Your feedback will shape what comes next.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bigger Picture
&lt;/h2&gt;

&lt;p&gt;This is part of a larger experiment I'm running: &lt;strong&gt;solving specific pain points for indie developers.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each tool is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tiny in scope (solves ONE problem)&lt;/li&gt;
&lt;li&gt;Fast to build (weeks, not months)&lt;/li&gt;
&lt;li&gt;Validated by real users&lt;/li&gt;
&lt;li&gt;Actually profitable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Chrome Extension Doctor is #3 in this series. #1 and #2 are already making money.&lt;/p&gt;

&lt;p&gt;If this works, I'll build more tools in this vein. Because I believe:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The best indie products aren't trying to replace enterprise software. They're solving the micro-problems that affect thousands of solo developers.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  For You
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you've ever built a Chrome extension, you know this pain&lt;/li&gt;
&lt;li&gt;If you've been rejected, you know it could've been easier&lt;/li&gt;
&lt;li&gt;If you believe in helping indie developers, let's chat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Have you been rejected by Google's extension store? What was your experience?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Comment below. I'm reading every reply.&lt;/p&gt;

&lt;p&gt;Next week, I'll write a deeper dive into how the tool works and share a live demo.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. — If you're an indie dev building your own stuff, I'd love to hear what other tools would make your life easier. Reply in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>sideprojects</category>
      <category>tooling</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
