AIē¼ēØę¶ä»£ļ¼ä»£ē 蓨éä¾ē¶č³å ³éč¦
Source: Thoughtworks
By NanĀ Yu
AI-assisted coding has been increasingly adopted over the last 12 months. AI-powered tools like Cursor and GitHub Copilot, along with products such as ChatGPT, can now generate working code within seconds. Many software engineers already spend more time reviewing AI-generated code than writing it manually. This transformation leads to people asking a common question: If AI is writing most of our code, do we really need to care about codeĀ quality?
The answer is, of course, a resounding yes. This is because although AI can accelerate the production of code, it canāt eliminate the need for clarity, structure and correctness. If our code is the most precise representation of a system available to us, itās one that requires human stewardship in the form of reviewing, testing and maintaining code.
Arguably, then, code quality is more essential than ever in an age of AI coding. In this blog post Iāll take a closer look at why thatĀ is.
Software is a precise form of knowledge
Software isnāt merely a sequence of instructions. Itās a formal representation of rules, behaviors, workflows, domain concepts and constraints. Itās the most precise, unambiguous expression of how a system actuallyĀ works.
Natural language simply canāt reach this level of precision. When a software engineer writes codeāāāwhether itās produced manually or through AI assistanceāāātheyāre essentially shaping business logic into a strict, coherent and executable structure. Itās vital that structure remains clear and accurate. While AI may be able to do that sometimes its nondeterminative nature means it canāt be trusted to do it all the time. Human oversight isĀ needed.
Programming languages are engineered for precision
Programming languages exist because human systems are complex. They help express ideas in ways thatĀ are:
- Structured
- Typed
- Consistent
- Explicit
- Unambiguous
- Predictable
Features like types, classes, interfaces, functions and modules are not arbitrary. They were developed so humans could express complex ideas safely and coherently. Modern high-level programming languages strike a highly effective balance between machine precision and human expressiveness. AI doesnāt reduce the importance of this balance; if anything, it reinforces it.
You canāt simply describe an entire system in natural language and let AI handle theĀ rest
Some imagine a future where requirements are written in a plain Word document, fed to an AI and instantly turned into a complete, maintainable system. This idea is appealing, but unrealistic.
Natural languageĀ is:
- Ambiguous
- Context-sensitive
- Contradictory
- Imprecise
- Impossible to executeĀ directly
Even humans struggle to interpret natural-language specifications consistently. AI, cannot magically resolve ambiguity where clarity does not exist. Eventually, all system intent must be transformed into a formal, machine-understandable representation. Programming languages remain the best tool we have today for thatĀ purpose.
The history of programming is a search forĀ balance
Early software engineers worked in Assembly. This was perfect for machines but nearly impossible for humans to understand and process at scale. Thatās why higher-level languages emerged; they were designed to make programs more understandable while also preserving the precision required by machines. Natural language is too vague; machine language is too rigid. High-level programming languages sit in the pragmatic middle.
AI doesnāt shift this balance dramatically. Instead, it emphasizes how essential that middle ground still is. We continue to need languages that bridge human thinking and machine execution. AI operates most effectively when that bridge is clean and well-formed.
AI is a semantic engineāāānot a replacement for structured code
AI models operate as semantic engines: they understand intent, interpret natural language, and help us reason about system behavior. But this doesnāt mean they replace the need for structured, deterministic code. Software systems donāt run on āmeaning.ā They run on formal, precise, executable instructions.
Requirements and goals hold the intent of a system, but theyāre often incomplete, ambiguous, or outdated. Code is where that intent becomes unambiguous and enforceable. If we want to know what the system actually does today, the codebaseāāānot a document, not a conversation, not a promptāāāis the single reliable source ofĀ truth.
AI can describe code, refactor it, or help generate it, but it cannot define the systemās guarantees: invariants, constraints, type safety, concurrency behavior, or security boundaries. Those guarantees come from the structure of the codeĀ itself.
So while AI dramatically expands our ability to work at the level of meaning, the role of code does not disappear. Code remains the formal anchor that ties intent to deterministic behavior. AI changes how we write code, not what code fundamentally is. It augments the semantic layer, but the system still depends on a precise, maintainable codebase beneathĀ it.
In the AI era, code quality becomes moreāāānot lessāāāimportant
The counterintuitive truth is that when AI writes your code, code quality becomes even more critical. This is because AI reliesĀ on:
- Your existingĀ codebase
- Your abstractions
- Your architectural patterns
- Your naming consistency
- Your domainĀ model
- Your tests
If the current codebase is messy or inconsistent, the AI will absorb and amplify thatĀ mess.
Good code helps AI reason clearly, while bad code confuses both humans and AI. AI will also unfortunately propagate confusion at scale. A clean codebase is more than good engineering practice, itās a strategic advantage for human-AI collaboration.
Code is the best documentationāāāfor both humans andĀ AI
For decades, engineers have said, āThe code is the documentation.ā In the AI era, this becomes operating reality. Your codebaseĀ is:
- The main reference
- The knowledge source
- The AIās contextĀ window
- The guide for future modifications
- The foundation for automated reasoning
AI tools analyze your code to understand how the system works. That means high-quality code isnāt just good for software engineersāāāitās good for AI. The clearer the code is, the better AI can helpĀ you.
AI wonāt eliminate codeāāāit makes good code the foundation of futureĀ software
The fantasy of casually describing a system in natural language and having AI build it end-to-end is, for now, just thatāāāa fantasy. Real software systems capture real-world complexity. That complexity requires formal expression.
What AI changes is how we spend our engineering effort:
- Less typing, more reviewing
- Less boilerplate, more architecture
- Fewer syntax details and more conceptual clarity
But one thing will not change: code remains the most precise, durable, and reliable form of system knowledge. AI can generate code, but only we define what good code is. That will be true in every future where humans and AI build software together.
Originally published at https://www.thoughtworks.com.