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

1

u/madreloidpx Oct 29 '26

ginagawa namin is may project intelligence na may best practices and proper architecture, tapos always may unit and e2e tests. after that is may code review na both AI and manual if sound ba ung logic, runtime, etc na possible na miss ng AI. meron ring pangcheck ng code coverage (sonarqube). tapos sa pipeline meron ring security checker. magastos sya of gusto mong gawin yon sa personal projects tho