HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Can GitHub Copilot do well with existing codebases, unit tests and writing documentation?

glich · Youtube · 54 HN points · 0 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention glich's video "Can GitHub Copilot do well with existing codebases, unit tests and writing documentation?".
Youtube Summary
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work. GitHub Copilot draws context from comments and code, and suggests individual lines and whole functions instantly. GitHub Copilot is powered by OpenAI Codex, a new AI system created by OpenAI.

This is the second episode of a series dedicated to answering questions about GitHub Copilot. In this episode I'm introducing a feature to an open source project and demonstrating how Copilot behaves in an existing code base, with writing unit tests and documentation.

I have to apologise for the sound quality, I'm still figuring out my audio setup, please bear with me 🙇‍♂️

▬▬▬▬▬▬ Resources & References 📕 ▬▬▬▬▬▬
- Copilot: https://copilot.github.com/
- Episode 1: https://youtu.be/F5IAZs8QklY
- Intro for this channel: https://youtu.be/kYKbGJp2VZg
- Watson: https://github.com/tailordev/watson

▬▬▬▬▬▬ Timestamps 🕐 ▬▬▬▬▬▬
00:00 - Intro to the episode
00:40 - Announcements
02:08 - Watson overview
08:13 - How Watson works
11:16 - Code discovery
20:10 - Writing a new feature with Copilot
32:01 - Writing unit tests with Copilot
46:57 - Copilot and documentation
49:00 - Conclusion

▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬
- Twitter: https://twitter.com/bassemdy
- GitHub: https://github.com/link-
- LinkedIn: https://www.linkedin.com/in/bassemdghaidy/
- Blog: https://blog.bassemdy.com
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Aug 15, 2021 · 54 points, 11 comments · submitted by Link-
None
None
psvj
it would be interesting if copilot could generate the code based on your unit tests
postalrat
Would that be more desirable than building your tests from your application?

Seems to me that once you can go either way then you just proved the other redundant.

h0l0cube
The central thesis of this diatribe is that in order to have a 'complete' unit^ test, you need something at least as complicated as the original code:

https://rbcs-us.com/documents/Why-Most-Unit-Testing-is-Waste...

^ where the 'unit' is basically a function. i.e., to test a function fully, write a test as complicated as the function

AYBABTME
Is there a TL;DR?
hdjjhhvvhga
It's mediocre. Sometimes it's plain wrong, sometimes right but not exact and so on.
yourapostasy
Was Copilot's value proposition that it gets better over time as more developers use it over a longer period?
hdjjhhvvhga
But the value for who? Last time I checked the consensus was that using it in any project that is not for private use can get you in legal trouble. So for me it's completely useless, even if technically it could be improved with time (which may or may not happen).
yourapostasy
> But the value for who?

Presumably value "unlocked" for GitHub investors, by leveraging the ML model that drives some product based upon Copilot like a next-gen IDE. I agree it's not a good risk to assume for the users of Copilot.

None
None
byteface
He seems to know the codebase and works out the problem for about 30 mins sometimes fastfowarded. Then at about 28 mins copilot smashes the answer instantly when he types a method name at the bottom of a utils file. he doesn't like it though as he seems to know the api really well and wants the util to use his api instead. so deletes the copilot answer and types out a different answer using the api which he knows.

then creats a few unit tests.

This was an interesting watch and useful to see other peoples setups.

Tcc1
He probably spent more time figuring out if the suggestions are usable than he would have needed to just implement those manually.
whbrown
https://xkcd.com/1205/
byteface
I guess if he wrote tests first it would have said. no method called x in util. TDD helps take a lot of thinking out of problems.
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.