5 ms·
I'm sceptical of the implication that there's no downside there, even if it's a more limited use of the technology. If it introduced a subtle mistake (e.g. wro
by MaxBarraclough 2y ago
I'm sceptical of the implication that there's no downside there, even if it's a more limited use of the technology.
If it introduced a subtle mistake (e.g. wrong variable) there's a chance the programmer could miss it, but would not have made the same mistake themselves.
There's also a chance the machine-generated code might lack a bug that the programmer would have introduced if writing it themselves. Overall though, I get the impression these tools are generally harmful to code quality.
edit As ekianjo points out, they specifically mention Copilot as unacceptable.
- nextaccountic 2y agoRegular autocomplete (from jetbrains IDEs for example) can produce small mistakes as well
- soulofmischief 2y agoIt'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.
- MaxBarraclough 2y ago> 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.
- lawn 2y ago> 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.
- Dylan16807 2y agoDo you feel the same way about normal autocomplete?
- rgoulter 2y ago"write code" isn't a uniform task. Sometimes writing code involves having built a good mental model of the domain problem & parts of the codebase. Sometimes writing code involves fairly straightforward manipulation of tools you might not be so familiar with. For some tasks, (e.g. "take the sample code from this blog post / answer, adjust it to use the variables available in this context"), I'd expect an LLM to save time over not.