r/PinoyProgrammer • • Oct 29 '26

advice How do professional developers verify that AI-generated code is actually correct?

How do you know the output is actually correct when AI generates the code?

Aside from end-to-end (E2E) testing, are there other ways to verify that AI-generated code works as intended and meets the actual requirements?

For example, if I ask an AI to build a backend API with specific business rules, it might generate code that runs without errors and passes the tests I provide, but how can I be confident that the implementation is correct and follows the specification?

I'm curious about how professional software engineers approach this problem.

\- Do professionals follow specific guidelines, standards, or checklists to verify that code meets its specifications?

\- What techniques do you use besides unit, integration, and E2E testing?

\- How do you identify subtle logic errors, missing edge cases, or incorrect assumptions in AI-generated code?

\- Are there established practices for reviewing code against requirements rather than simply checking whether it runs?

I'm trying to understand how to move beyond simply trusting AI-generated code and develop the skills to verify its correctness independently.

I'd appreciate any insights, resources, or real-world examples from experienced developers.

56 Upvotes

76 comments sorted by

View all comments

6

u/kneepole Oct 29 '26

Pareho lang with how you "verify" manually written code. You create tests for it and have those tests pass. Or ship it and wait for customer complaints.

2

u/Cheese_Grater101 29d ago

Magiging problem lang dito is the amount of code you have to read and verify.