惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
博客园_首页
C
Check Point Blog
小众软件
小众软件
博客园 - 叶小钗
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta
美团技术团队
Martin Fowler
Martin Fowler
Vercel News
Vercel News
D
Docker
罗磊的独立博客
B
Blog RSS Feed
The Cloudflare Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
雷峰网
雷峰网
博客园 - Franky

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
The 80/20 Rule of AI Code — Why the Last 20% Takes 80% of...
Harsh · 2026-06-23 · via DEV Community

AI wrote the first 80% of my feature in 10 minutes.

The code was clean. The logic made sense. The happy path worked on the first try. I ran it, saw it work, and felt that specific kind of developer pride that makes you lean back in your chair slightly.

I was impressed. I felt genuinely productive. I thought I'd be done in another 10, maybe 15 minutes.

That was Tuesday By Thursday evening I was still working on the same feature. Not because the AI had failed. Because it had succeeded at exactly the wrong thing the easy part and left the actual hard part entirely to me.

The edge cases. The error handling. The null checks. The situations that only surface when a real user does something the happy path didn't anticipate.

The AI didn't write those. It didn't even know they existed. It optimized confidently and completely for the world where everything goes right - and that world is not the one your users live in.

That's the 80/20 rule of AI code. The first 80% is fast, impressive, and kind of magical. The last 20% is where the real work actually lives. And it takes 80% of your total time.

Here's what I've learned about that gap, and why I think it matters more than the 10 minutes you saved on Tuesday.


The 80% - Fast, Clean, and Genuinely Impressive

I want to be honest about this part before I get into the frustration.

The AI is remarkable at the first 80%. You give it a clear prompt, it understands what the happy path looks like, and it generates code that works. Not kind-of works. Actually works, with reasonable variable names and logic that flows the way you'd expect.

The first time I saw it in action I genuinely felt like I'd cheated at something. Tickets were closing. The velocity graph was going up. I was shipping things faster than I had in years.

And that feeling is real - I'm not being sarcastic about it. The AI is fast because it's operating in familiar territory. The happy path is the well-trodden path. It's the version of your problem that exists in some form in the training data, that has been solved thousands of times before, that the model can pattern-match its way through with confidence.

The 80% is real. The speed is real.

The problem is that we've started treating the 80% like it's the whole thing. And it isn't.


The 20% - Where Tuesday Becomes Thursday

The AI wrote the happy path. Here's an honest list of what it didn't write:

The empty list. What happens when the user has no data yet? New account, nothing in the database, the list the AI assumed would always have items turns out to be empty. The AI didn't check. You find out from a user report three days after launch, spend an hour tracing back to the unhandled case, and add the check you should have written on Tuesday.

The error handling. The AI assumes the network responds. It assumes the API returns what you asked for. It assumes the third-party service is up. Every try-catch block, every fallback, every "what do we show the user when this fails" decision - that's yours. The AI left it blank because things going wrong wasn't part of the prompt.

The domain-specific edge cases. This is the one that surprises me every time. The AI doesn't know your business logic. It doesn't know that "empty" means something different in three different parts of your application. It doesn't know about the legacy data that's formatted differently. It doesn't know about the enterprise customer who uses the product in a way nobody expected. You know those things. The AI has never heard of them.

The performance cliff. The AI writes code that works for the examples it was given. It doesn't stress-test for scale. You find the bottleneck when the feature goes live and the page suddenly takes four seconds to load for users with large datasets. The code isn't wrong. It just wasn't written with real load in mind.

The maintainability tax. This one is the slowest to show up. The AI writes code that solves today's problem. Three months from now when the requirements shift slightly and you're trying to extend it, you realize the abstraction doesn't quite fit the new shape. Refactoring it costs more time than writing it from scratch would have.

Each of those items takes time. Together, they consistently add up to about 80% of the total effort on any feature I've shipped using AI-generated code.


The 30 Seconds That Cost Me 3 Hours

I was looking at a pull request recently - maybe 200 lines of AI-generated code that I'd prompted in about 30 seconds.

I spent the next 3 hours with it.

Not because the code was broken. The code was fine. I spent 3 hours adding everything the AI had quietly decided wasn't its problem: the error paths, the null checks, the comments explaining the decisions that weren't obvious, the edge case I found by actually thinking about what our users do.

During the 30 seconds I felt fast. During the 3 hours I felt slow.

But here's the thing I keep coming back to: the 3 hours was the actual work. The 30 seconds was the scaffolding. The AI didn't reduce the work - it relocated it. The time moved from writing the structure to making it real and making it real is slower because it requires something the AI genuinely doesn't have: context about your specific situation, your specific users, your specific history with this codebase.

That was the moment I stopped caring about how long generation took and started tracking something more honest: how long until it's actually ready to ship.


Why This Isn't a Complaint About AI

I want to be clear - the 80/20 split isn't a failure of AI. It's basically the design.

The AI is optimized for the common case. The common case is the happy path. Generating the common case quickly is genuinely useful; I'm not being dismissive of that.

The issue isn't with the AI. The issue is with how we've started measuring productivity around it.

We measure velocity. Tickets closed. Lines generated. Contribution graph. And all of those metrics capture the 80% beautifully - because the 80% is fast and visible and shows up as green squares.

The 20% is invisible to those metrics. Nobody's dashboard shows time spent adding error handling. Nobody's standup starts with "I spent yesterday on edge cases the AI didn't anticipate." It doesn't show up anywhere. But it's where most of the actual time goes.

The 80% is what gets you to a demo. The 20% is what gets you to production. And if you're not tracking how long the 20% takes, you're not tracking your real productivity - you're tracking how quickly you can type a prompt and feel good about it.


What I'm Actually Doing Differently

Not quitting AI. Not even thinking about it. But I've changed a few things:

I budget for the 20% upfront. When I estimate any task involving AI-generated code, I add roughly 4x to whatever the generation time suggests. The AI says "this is a 10-minute feature." I tell my brain it's a 40-minute feature and plan accordingly. It's not pessimism - it's just the pattern holding.

I prompt for the unhappy path explicitly. Before I even generate the main code, I add to the prompt: what should happen with empty input? What should happen when the API fails? What edge cases exist here? The AI won't think of them on its own. If I name them, it at least takes a pass at them.

I write the failing tests before the code exists. What would break this? What would a mischievous user do? I write those tests first so the AI has a target. It doesn't catch everything, but it catches more than the AI would find by itself.

I remember the 3 hours. When I'm tempted to push something quickly because it works in the demo I think about the 3 hours. The 30 seconds felt good. The 3 hours was the job.

None of this makes the 20% disappear. But it makes it predictable instead of surprising, which is the difference between managing it and being ambushed by it.


One Question

What's the longest you've spent on the last 20% of something the AI generated quickly?

I want actual numbers if you have them. The gap between how long generation took and how long it actually took to ship - that's the number I'm curious about.

My answer: 30 seconds to generate, 3 hours to finish.

What's yours? 👇


Heads up I used AI to help structure this post and refine my thoughts. The experiences stories and opinions are my own.