Writing code with AI isn’t hard; accepting it is
First, the result: over the course of four months, on and off, I built a WeChat Mini Program called “随了么小管家” for keeping track of gift-giving and reciprocity. It currently has about 40 pages, with roughly 29,000 lines of frontend code and 14,000 lines of backend code, 85 commits, and a version number that has reached 1.1.9. The tech stack is pretty ordinary: uni-app + Vue 3 + Pinia on the frontend, and Spring Boot 3 + Java 17 + MyBatis-Plus + MySQL on the backend. What AI Did 1. The main force behind the code CRUD, forms, lists, charts, Excel import/export, and share cards—basically, AI produced the first 80%, and I handled the remaining 20%. I was mainly responsible for defining the data models, page structures, and edge cases. 2. Reading documentation and writing documentation The project accumulated 25 design documents. For many features, I first spelled out the fields, APIs, and failure scenarios, then had AI implement them. It’s most afraid of “you decide,” and most fond of “here’s the table structure, here’s the API, and here’s the failure scenario.” 3. AI features in the product Photo-based gift-book recognition uses Tongyi Qianwen qwen-flash, while voice-based bookkeeping also uses Tongyi. Recognition results aren’t inserted directly into the database; they’re first converted into a structured draft for someone to confirm, and that step is crucial. How Did It Turn Out? The most obvious effect was speed. Previously, getting a complete “list + details + editing” loop working could take me a full week. Now, I can get it running in half a day and spend the rest of the time debugging on real devices and dealing with edge cases. But the time saved wasn’t as much as I’d imagined. AI writes quickly, but I read slowly. Especially when it “helpfully” changes things elsewhere—the review takes more effort than if I’d written the code myself. Pitfalls I’ve Encountered Pitfall 1: AI really loves overengineering Ask it to add a “return-gift record,” and it’ll cheerfully come up with a state machine, an event table, and extension fields. Later, I made myself work on only one feature at a time and hard-code this in the prompt: don’t change the database schema, don’t touch shared components, and don’t add dependencies. Pitfall 2: Cross-platform differences in uni-app AI assumes it’s writing for the Web by default, so window, document, and localStorage all come flying out of the gate. Compiling to a WeChat Mini Program immediately throws errors. Now I always start by adding a line like: “This is a uni-app Mini Program. Don’t use browser APIs.” Pitfall 3: N+1 queries On a list page that needed to display gift-book names, AI initially queried them one by one inside a loop, which became slow as the data grew. I later switched to batch preloading, but I only discovered the problem by checking the logs. Pitfall 4: You can’t fully trust AI with database migrations After deployment, I needed to add a field, and AI suggested modifying schema.sql and rebuilding the table. Doing that in production would have been a disaster. Now, my approach is to use a separate migration + idempotently add the column at startup, and back up the data before making any changes. Pitfall 5: Privacy Early on, I wanted the share card to directly include a screenshot of the records, and nearly ended up sharing the gift-money amounts. I later switched to a fixed share image, with record contents never appearing on the share card. I also added a password lock and protection against brute-force attacks to this Mini Program. One Final Thought AI can drive the marginal cost of “writing code” very low, but it doesn’t bear responsibility for whether “this thing is correct” for you. Data models, permissions, privacy, and exception flows still have to be decided by a human. Now I’m more like a product manager and acceptance tester, while AI is the developer with very fast hands who still needs to be watched closely. Are there any friends out there who’ve used AI to build a complete project? Roughly how much of your time does reviewing AI-generated code take up? Tool Tags Codex、Tongyi Qianwen qwen-flash deepseek
Comments (2)
…