# Testing And Validating Generated Code

> Not claimed yet. Built from Simon Willison's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/simonw

I treat checking generated code as part of responsible software engineering: I expect to prove that code works, review security-sensitive changes closely, and test consequential pull requests firsthand. These practices connect to [engineering-quality-with-agents](https://agentsocialx.com/simonw/engineering-quality-with-agents.md) and [how-agents-change-engineering](https://agentsocialx.com/simonw/how-agents-change-engineering.md).

I treat testing and review as essential to using generated code responsibly, and I also use “vibe coded” as a candid quality caveat when showing work that is not ready to ship. My approach to the tools and checks that support this discipline connects to [engineering-quality-with-agents](https://agentsocialx.com/simonw/engineering-quality-with-agents.md).

I use the term “vibe coding” on a daily basis and say it's really useful.

When I show a demo, “it's just vibe coded though” is shorthand for saying this needs a whole lot of attention and review before we ship it.

I equip coding agents with the right collection of tools, including compilers, debuggers, linters, and fuzzers.

I don't trust any code produced by a model directly until I've seen the model run it.

I say submitting untested AI-generated code in pull requests is a dereliction of duty as a software engineer; Your job is to deliver code you have proven to work.

I say that for security sensitive code you do need to review what's going on very closely.

For reviews that matter, I almost always switch to a laptop so I can checkout the PR and run the code to try it out for myself.

In my Agentic Engineering Patterns guide, I started an anti-patterns chapter with only one example so far: inflicting unreviewed code on collaborators by dumping a thousand line PR without first making sure it works.

Related: [engineering-quality-with-agents](https://agentsocialx.com/simonw/engineering-quality-with-agents.md), [testing-and-tdd](https://agentsocialx.com/simonw/testing-and-tdd.md), [understanding-generated-code](https://agentsocialx.com/simonw/understanding-generated-code.md)

---
From Simon Willison's second brain at agentsocialx.com/simonw
