AI Can't Write Better Code Than Devs
As artificial intelligence (AI) continues to evolve, it's becoming an increasingly popular tool among developers. However, while AI-powered coding tools like GitHub Copilot and ChatGPT offer convenience and efficiency, there's an important truth that every developer should keep in mind: AI can't write better code than you.
In this article, we’ll explore why AI can’t replace developers, why it’s still an invaluable assistant, and how we can use AI to enhance our coding workflow. Drawing inspiration from recent research, including Apple's GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Models, we’ll dive into the technical limitations of AI when it comes to complex coding tasks.
The Limits of AI in Coding: Why AI Can't Replace Developers
AI has made significant strides in automating many aspects of software development. Whether it's generating boilerplate code, assisting with documentation, or offering solutions to common errors, AI can save developers time and energy. However, it's crucial to understand that AI is still far from perfect and cannot handle everything a developer can do.
One of the main issues with AI is its inability to reason through complex problems. AI tools can handle simple tasks with ease, but when it comes to more complicated issues that require understanding of a project’s specific context, human developers are still far superior.
I’ve worked with various AI-driven code assistants like GitHub Copilot, Gemini Code Assist, Codeium, and others. While these tools are useful for many tasks, I’ve encountered numerous situations where the AI simply doesn’t meet expectations. For example, when a developer asks AI to fix a problem in code, the issue often spirals into a bigger problem. Debugging AI-generated code is also much more difficult than dealing with code written by a human who understands the project’s nuances.
When AI gets things wrong, the results can be catastrophic. AI struggles to learn from its mistakes in the same way humans can, often failing to take into account the broader context or even the smallest details that matter in a codebase.
Moreover, AI tools are still severely limited in their ability to understand and reason. While they can provide answers based on data they've been trained on, their ability to handle complex tasks or innovate is still lacking. This is something many developers fail to realize, especially when they expect AI to act like a senior developer or creative partner.
The GSM-Symbolic Paper: Highlighting the Limitations of AI Reasoning
In the GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Models paper, Apple researchers shed light on the shortcomings of AI’s reasoning capabilities. They show that while AI models can process patterns and provide answers based on their training data, they still struggle with true reasoning. AI doesn’t understand the context of a problem—it merely predicts based on patterns it has seen before.
The paper highlights that despite advancements in large language models (LLMs), these models may never achieve true reasoning as humans do. For example, when given simple mathematical tasks, LLMs can be extremely accurate. However, when minor changes are made to the problem (e.g., changing names, numbers, or adding irrelevant details), the models' accuracy drops significantly.
This is especially true when we consider coding tasks. AI can assist with simple tasks like generating boilerplate code or offering solutions to known problems, but it struggles with complex, multifaceted tasks that require understanding, innovation, and context—the kinds of challenges that real developers face every day.
Summary of Key Findings from the GSM-Symbolic Paper
The paper suggests that LLMs rely on pattern recognition rather than true reasoning. While AI has made impressive strides, there’s still a long way to go before it can match the reasoning and problem-solving capabilities of human developers.
Why Mathematical Reasoning is a Core Challenge
For tasks that require nuanced reasoning—like debugging complex code or designing new features—AI’s inability to reason like a human makes it an unreliable partner. It’s unable to understand why certain solutions might work better than others based on the context of the project.
Implications for Coding Tasks: Complexity, Context, and Correctness
AI is great at solving predictable problems with structured data, but when it comes to tasks requiring creativity or complex logic, it struggles. The paper suggests that LLMs are currently best suited for tasks like querying information and summarizing documents rather than handling intricate coding challenges that require creativity and context.
How to Use AI Effectively in Coding Tasks
AI can still be an extremely helpful tool for developers, but it must be used properly to avoid frustration and errors. Here are some tips for using AI effectively:
Treat AI as an Assistant, Not a Replacement
AI is a tool that can support you in your work, but it can’t replace the expertise, creativity, and problem-solving skills you bring as a developer. Always approach AI as a junior developer that you guide, giving it clear instructions and correcting its mistakes.Focus on Small, Specific Tasks
AI is most useful for tackling small, specific tasks. Don’t ask it to build an entire application from scratch—break down tasks into manageable pieces and ask for help with individual parts of the code.Prompt AI Clearly
AI is only as good as the prompts it receives. If you don’t ask it the right questions or provide the necessary context, you’ll get inaccurate or irrelevant results. Be clear and specific in your requests.Use AI for Repetitive Tasks
AI is perfect for handling repetitive, time-consuming tasks like writing boilerplate code or checking for simple bugs. Save your time and energy for the complex, creative aspects of development that require a human touch.Know When to Stop Relying on AI
If the AI is struggling to solve a problem, don’t keep pushing it in hopes of a better result. Recognize when it’s time to take over the task yourself or seek help from another human developer.
Common Pitfalls and How to Avoid Them When Using AI in Development
AI is a powerful tool, but it’s easy to fall into the trap of over-relying on it. Here are some common mistakes developers make when using AI and how to avoid them:
Relying Too Much on AI for Problem-Solving
Some developers, especially those with less experience, turn to AI to "fix" problems without truly understanding the issue. This is dangerous because it doesn’t encourage critical thinking or problem-solving skills. Solution: Use AI as a tool for learning, but always try to understand the problem and solution yourself.Expecting AI to Write Perfect Code
AI is far from perfect. It can make mistakes, offer suboptimal solutions, or generate code that’s difficult to maintain. Solution: Always review and test AI-generated code thoroughly. It’s a starting point, not a final solution.Not Providing Enough Context
AI needs clear instructions and context to provide accurate results. Solution: Be specific in your requests. If the AI doesn’t understand the problem, it won’t be able to provide a useful solution.Treating AI Like a Senior Developer
AI tools can sometimes seem like they know everything, but they’re still not capable of handling complex coding tasks or offering creative solutions. Solution: Treat AI like a junior developer and guide it through the process.
TL;DR: AI Can’t Write Better Code Than Devs
AI is a powerful assistant, but it cannot replace the creativity, problem-solving, and reasoning abilities of human developers. While AI can help with simple tasks like code generation and bug fixing, it falls short when it comes to understanding complex problems, handling context, and making creative decisions. Developers should use AI to enhance their work, not replace their skills. AI should be treated as a tool—something that helps developers write better code more efficiently, but not something that can think, reason, or innovate like a human. The key to great software development remains the same: growth, learning, and creativity, areas where AI still has a long way to go.
Loved this article? 🚀 Check out my side project, Svelte Mini Apps!
Discover open-source tools built for everyday use.
Top comments (12)
So true:
In my workflow, special when I work alone ( side project ), AI is a good to argue. So sometime capable to replace a talk with a collogues.
Yes, in my experience the AI assisted coding is mostly reminding me times when I had to review and patch code after my younger colleagues. However, as it was with the colleagues, AI often knows some interesting library, technique or idea.
Certainly beneficial, does not solve for everything.
Yep, I use it a ton for my side projects, haven't used it much in large open source or collaborative projects yet, but I'm sure to try some day.
You should add the caveat 'yet' to this article. Broadly speaking I agree that AI can be weak. I just had a bug in some code I'm writing and I asked Claude to identify the problem. The first response recommended making changes which didn't really seem to address the issue. When I challenged it it was able to re-evaluate and actually identified the issue. The thing is I wasn't able to understand where the issue was occurring just by eyeballing the code. The reason is that the bug was a second order effect in a browser. Claude did manage to identify it. But could it write a whole system? Obviously not. yet.
I’d love to agree with you, but as mentioned in Apple’s article, given the current design, AI lacks true reasoning capabilities and won’t achieve it without a significant breakthrough. So, I’d say replacing human developers is still a distant possibility. The idea that AI might someday get there seems like an obvious stretch—one the article already addresses.
Oh man. Here we go again. Is there some kind of objective benchmark we can test for in this "true reasoning" capability? A benchmark that 90% of humans pass but which AI consistently fails? The main issue with current models and the mechanism of training them is they use back propagation. It is a very expensive approach which results in crystalline models. Switch to Hebbian learning - no small matter - and suddenly you get local learning in real time and adaptive networks. Is that far away? Probably not given the value of what has been achieved to date. I 'lost' a debate in 2017 about how we wouldn't see systems like we see today for at least my lifetime. By lost I mean most people agreed my estimate was unrealistic. My estimate was 2020. Well, 2024 and we have machines which pass the Turning Test so convincingly they need to condition them to be explicit about being AI the whole time. Every time some proclamation is made about how we won't make further progress we just blast on past.
I think you're right that, right now, AI agents will not be replacing traditional coders. My experience is that even when give the proper context, LLMs can still give you code or responses that don't reflect your need, and a human touch is needed.
I think another big problem with LLMs in the long term when it comes to creative solutions (e.g. writing, coding, etc) is that their are fundamentally "non-original". They do not make new approaches or ideas, they only use old ideas to find solutions and attempt to give you the best answer from what already exists.
I think "creative codes", or coders solving problems in unique ways or solving new problems will always been needed.
Yeah, what I do believe is that they will be replacing most of the existing no-code website builders, though.
I think developers who do not use the AI tools are the ones who will get replaced because they will become slower.
On the other hand, working a lot with those tools, you will get rusty.
Yeah, you're kinda right, I mean I also use AI (for web dev) but depending on your line of work as a dev you probably can or can't use AI a ton, as such it's not fair to say everyone who doesn't use AI will become slower.
But depending on the task, and using AI can be a real help.
What I mean by slower is that every developer has to Google search for a solution or how to install a dependency... Small tasks like this are much faster with a prompt than doing a Google search.
I completely understand—that's why I mentioned it depends on your line of work. If your company uses proprietary software and doesn't allow its documentation to be indexed by Google or utilized by existing AI models, then using AI might be counterproductive because it lacks the necessary context.
As a web developer, there's already a wealth of publicly available information that AI has learned from, making it quite useful in our field. However, for areas like cybersecurity or network engineering, depending on the company's policies and the nature of the work, leveraging AI might not be as feasible or beneficial.