Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's funny how most people just assume engineers aren't checking the output of Copilot's suggestions.

Reading code for correctness takes only a moment, you either know how to verify its correctness or you don't; writing the code yourself doesn't change that.

Furthermore, code which is meant to be depended upon should come with tests, and if those tests pass with bad code, the tests are wrong.



> It's funny how most people just assume engineers aren't checking the output of Copilot's suggestions.

I didn't say that.

I'm assuming the engineer is checking Copilot's output, but that they will sometimes fail to catch bugs in Copilot's suggested code.

> Reading code for correctness takes only a moment, you either know how to verify its correctness or you don't; writing the code yourself doesn't change that.

I don't buy this framing. I think it's entirely possible for a programmer to miss an error when reviewing code, that they would not have made if writing the code themselves.

I've encountered this many times when copying+pasting+updating my own code to use in a slightly different context. It's easy to miss small mistakes, like failing to find+replace a variable name, despite that I wouldn't have made that mistake if writing the code afresh.

> Furthermore, code which is meant to be depended upon should come with tests, and if those tests pass with bad code, the tests are wrong.

Test suites should improve code-quality regardless of your policy on use of AI tools. Using AI tools may still degrade code-quality.


> Reading code for correctness takes only a moment

It absolutely does not, especially when you take a step outside the simplest code.

Even if I know how to verify it, that can take longer than writing it myself because there might be many different ways to solve the problem, with different logic, trade-offs and failure states.

> Furthermore, code which is meant to be depended upon should come with tests, and if those tests pass with bad code, the tests are wrong.

You can't "fix" bad code with tests. Even if you could get a perfect test coverage for bugs (you can't), there's no test that capturers soft attributes like readibility and maintainability.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: