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

Importing an external, tested, reliable dependency is completely different from anonymous non-checked untested code in your repository committed by someone who did not even read it.

Check out the memoize example. That fails as soon as you pass anything non-primitive but there’s no one documenting that.



> anonymous non-checked untested code

What? It's not anonymous, it's still committed by a dev. It can be non-checked and untested, that's true. But it's not any less untested than any other code. If you choose not to write tests for your code, this won't change anything.

The only issue I see with this is it being potentially unchecked. And the solution to that is reading all the code you commit, even though it's generated by AI.


It's about affordances. As presented, this tool streamlines copy-pasting random snippets. The easier something is, the more people do it.

Testing doesn't even enter the picture here, we're at the level of automating the stereotypical StackOverflow-driven development - except with SO, you at least get some context, there's a discussion, competing solutions, code gets some corrections. Here? You get a black-box oracle divining code snippets from function names and comments.

> the solution to that is reading all the code you commit, even though it's generated by AI

Relying on programmer discipline doesn't scale. Also, in my experience, copy-pasting a snippet and then checking it for subtle bugs is harder than just reading it, getting the gist of it, and writing it yourself.


> Programmer discipline doesn’t scale

Thank you for putting this so eloquently. This has basically been the sole tenet of my programming philosophy for several years, but I’ve never been able to put it into words before.


> As presented, this tool streamlines copy-pasting random snippets.

It synthesizes new code based on a corpus of existing code.


Yes. Given how it does it, this makes it even more dangerous than if it was just trying to find a matching preexisting snippet.


>Tests without the toil. Tests are the backbone of any robust software engineering project. Import a unit test package, and let GitHub Copilot suggest tests that match your implementation code.

It looks to me like they're suggesting you use Copilot to write the tests.


Who wrote that snippet? Who knows? That’s anonymous. Just because I committed it it doesn’t mean I wrote it. There’s no link to the source, so it’s anonymous, even if committed by me. This is 100% equivalent to copying a whole function from StackOverflow but without placing a link to the answer for context.


A programmer who commits untested sloppy code of their own writing, will do it regardless of having access to such a service. Nothing will make me commit the generated code without testing it. I think this tool could take care of the boilerplate and the rest will still be on the programmer. At least in the near future.


anonymous non-checked untested code is problematic in all cases. This doesn't change that.




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

Search: