Quick Answer
Yes. AI can write working code.
We have used it to create and modify code across real website and automation projects, and many of those changes worked exactly as intended.
The more useful question is not whether AI can code. It is what conditions make the generated code dependable.
Our best results came from bounded tasks with visible inputs, relevant surrounding code, a clear expected behavior and an outcome we could actually test.
“Write Code” Covers Very Different Problems
Creating a small isolated function is not the same problem as modifying a mature website.
A new component may give AI freedom to choose its own structure.
A change to an existing system may have to preserve CSS, plugins, naming conventions, database assumptions, responsive behavior and code the model has never seen.
That is why broad claims that AI is either “good at coding” or “bad at coding” are not very useful.
The environment matters.
Where It Worked Best for Us
Our strongest coding tasks shared several characteristics:
a specific feature;
a known language or platform;
relevant existing code supplied;
a visible error or clear starting state;
an explicit expected result;
and a testable definition of done.
Those constraints give the model something concrete to solve.
“Make this button align correctly on mobile without changing the desktop layout” is a much better engineering problem than “improve the website.”
Where Reliability Dropped
Problems became harder when the requested change depended on a large amount of unseen context.
“Fix the whole site.”
“Improve everything.”
“Add this feature without affecting anything else.”
Those instructions can hide dozens of dependencies.
AI may produce technically reasonable code for the part it can see while missing a relationship elsewhere in the system.
A Convincing Code Block Is Not a Test
Generated code can look professional.
It can use sensible names, comments and familiar patterns.
That still does not prove it works.
The code has to run in the real environment.
This became one of our recurring AI lessons: plausibility and correctness are separate properties. NIST's generative-AI risk profile likewise warns that generative systems can confidently produce erroneous content. For code, execution gives us an unusually strong way to challenge that confidence.
Testing Changes the Relationship
Coding is one of the areas where AI becomes more useful because the result can often be tested directly.
Does the page load?
Does the function return the expected value?
Does the error disappear?
Does the feature work at the required viewport?
Did anything else break?
Those questions move the evaluation away from whether the explanation sounds right and toward observable behavior.
The Definition of Done Matters
We get better results when the task contains its own acceptance test.
Instead of:
“Build a contact form.”
we want requirements such as:
the fields that must exist;
what happens on submission;
what validation is required;
what success looks like;
what must remain unchanged;
and the environment in which it will run.
Now both AI and the human reviewer know what completion means.
AI Is Often a Very Fast Implementation Partner
When the problem is well bounded, AI can remove a surprising amount of mechanical work.
It can draft boilerplate, explain unfamiliar code, propose a focused patch, generate a first implementation and help interpret failures.
That can shorten the distance between an idea and a testable version dramatically.
The important word is testable.
Worthy Trying Verdict
Worked: Yes
Best at: Clearly scoped, testable changes
Reliability with unseen dependencies: Lower
Human testing: Required
Best improvement: Define the expected behavior before generation
The lesson: AI coding improves dramatically when “done” means something we can test rather than something that merely looks like good code.
