An Engineer's Honest Take: AI Helps Me Write Code, But Also Led Me Into Several Traps
Is AI-generated code really useful? As an engineer who uses it daily, I say: it's extremely helpful, but I've also fallen into a few pitfalls. In this article, I'll discuss where AI has truly assisted me and those moments when it seemed perfect but ended up being disastrous.
I've been writing code for over a decade. When AI editors first emerged, I was skeptical. But after using one for a year, I've become dependent on it - although I've also fallen into a few pitfalls that kept me up late at night. This article isn't meant to idolize or disparage AI editors, but rather to share my genuine experience as an engineer.
What truly changed my workflow is "template time"
Let's start with the good. The greatest value AI has brought to me isn't about writing complex algorithms, but about eliminating "boring but necessary" tasks.
Writing API templates, configuration files, and repetitive CRUD operations, or converting data from one format to another - these are tasks I can do with my eyes closed, but they're time-consuming and tedious. Now, with AI editors like Cursor, I can describe what I need and have it generated for me, which I then review. Previously, these tasks took up about 30% of my day; now they take up less than 10%. The time I've saved is spent on more valuable tasks, such as designing architecture and solving difficult bugs.
I must admit: AI hasn't made me a better engineer, but it has freed me from mundane tasks, allowing me to focus on more important work.
Pitfall 1: It's good at "looking right"
Now, let's talk about the downsides. The most dangerous aspect of AI-generated code is that it can look perfectly logical and reasonable, but still be incorrect.
I once fell into a painful trap when an AI gave me a code snippet for handling dates that looked flawless, with clear logic and naming conventions. I thought it was fine and merged it, only to have it explode when dealing with time zones, causing issues in production and keeping me up late at night to fix. Upon reviewing the code again, I found that the bug was hidden in a subtle boundary condition that the AI hadn't considered, and I had missed it because the code "looked so professional".
The lesson learned: The more perfect AI-generated code looks, the more thoroughly it needs to be reviewed. It's not that AI can't make mistakes, but it can make them with confidence.
Pitfall 2: It doesn't understand the context of your entire project
The second pitfall is that AI is very good at understanding "this piece of code", but often fails to understand "your entire system".
It might give you a technically correct solution that doesn't follow your project's conventions or duplicates a wheel that already exists, simply because it's unaware of the existing tool functions. This kind of "locally correct but globally out of place" code can accumulate and make your project increasingly messy.
To avoid this, I now explicitly tell the AI about my project's conventions and ask it to follow existing practices, rather than letting it freely generate code.
Pitfall 3: Over-reliance can lead to atrophy
This point is more subjective, but I've genuinely felt it. There was a period when I relied too heavily on AI, to the point where I wouldn't even bother thinking about basic things myself and would just ask the AI. As a result, when I faced a whiteboard question in an interview without the aid of AI, I got stuck - not because I didn't know the answer, but because I had gotten out of practice thinking from scratch.
Now, I make a conscious effort to allocate time for "writing code myself", especially for core logic and areas I want to learn. AI is meant to accelerate my work, not replace my thinking. I need to find a balance.
How I use AI now
After a year, my principle is simple: let AI handle tasks that I can do but don't want to spend time on; I'll handle tasks that require judgment, understanding, and growth.
I use AI for templates, conversions, syntax checks, and writing tests. For architecture decisions, security, core logic, and debugging difficult issues, I do it myself, with AI acting as an advisor at most. I always review every line of code generated by AI, especially the lines that look the most perfect.
AI has indeed sped up the coding process, which is a fact. However, it has also increased the cost of "not understanding but copying". The more powerful the tool, the more aware its user needs to be. For more development tools, you can refer to AI Programming Tool Recommendations.
Frequently Asked Questions
Can AI-generated code be used directly?
I wouldn't recommend taking it at face value. AI code often "confidently incorrect," so the more perfect it looks, the more thoroughly you should review it, especially when it comes to boundary conditions, security, and cross-system contexts.
Will AI make engineers weaker?
Overreliance on AI can lead to rusty fundamentals. I suggest using AI for templates and mundane tasks, while handling core logic and areas where you want to grow yourself, and intentionally leaving room for practice.
What is the AI editor best suited for?
It's ideal for eliminating "boring but necessary" template work (CRUD, settings, format conversions, writing tests), allowing you to allocate your time to architecture and challenging problems.