Open damithc opened 1 year ago
I would like to share a bit about my story with Copilot. My friend joined Copilot beta before me, and once we were doing some online coding sessions together, I realized that he wasn't using it. I asked him why, and he said that he found the code generated to be not so reliable. I don't use Copilot now also. After the release of ChatGPT though, I did use it quite frequently, especially for checking new APIs.
I have several issues with Copilot that prevented me from using it:
I use ChatGPT as a "search engine" that helps me check APIs and gives me concrete examples of how certain APIs are used. It reduces the distraction of Github Copilot, and it is much faster than searching via Google. There are also many occasions when the APIs are poorly documented, and ChatGPT helps greatly with that. Further, because I generally don't use the code generated by ChatGPT, I feel more control over the code that's written.
I may not hold the popular opinion, but I don't believe, at least at the current stage, that AI can write good code. Perhaps they can write OK code, but I don't think that the code written by AI would be production ready in any sense.
It's more sort of like that Copilot/ChatGPT can get an algorithm implemented / an API correctly invoked, but they lack the structural knowledge of the codebase, and they don't know how to structure your code such that it is nice and clean.
they lack the structural knowledge of the codebase
I think this is spot on. LLMs (Large-Langauge Models) do not have the context about the high-level system architecture, thus it is only capable of producing short snippets (relatively compared to SE projects). Manual efforts are needed to adapt LLMs' outputs for the purpose of specific projects at hand. It's unlikely that we can get LLMs to generate code at scale.
I use ChatGPT as a "search engine" that helps me check APIs
I use it in exactly the same way. It sometimes works better than StackOverflow, as it only displays the most likely implementation of a certain functionality (in contrast, Google has many answers but many of them are just noise). I turn to GPT first if I think the function I want to implement is common and routine.
Just to be a bit more specific, the issue that I found with Copilot is that it tends to cause a lot of code duplication. When two chunks of code have very similar logic, it would just fill out the second part, without considering extracting the shared parts. Another problem that I found with Copilot is that it tends to create unnecessary features.
Thanks @wxxedu @BoAi01 for sharing your observations so far.
I've been using copilot for my coding (Python) for a few weeks now. There are times it gets in the way, but at times it saves me some typing, giving me possibly about 5% productivity gain. It might increase as the model improves. But every time I need to look at the suggested code closely and decide if it's the correct way to do it, which is the hard part of coding. The time saved on typing is only a minor gain in comparison.
To add on, these days Cursor looks promising too. Free alternative to Copilot, huh.
Tools like ChatGPT and GitHub copilot are likely to have a significant impact on how software engineers work. Although those tools are still in early stages, it is best for us to be at the cutting edge of what they can do. To that end, we would like to encourage you guys to try the following optional explorations:
a) Use AI on the iP: Try to use such AI tools to enhance the iP further. For example, to add more features to the iP, improve the code quality, write more tests, etc. You can push the enhanced version of the code to your fork, after tagging it
AiAssisted
. This work will not be considered in iP grading; but after some prelim work, if you are interested to do more in that direction, you can consider earning CS2103R credit for such work (see option C here).b) Use AI in the tP: You can try to use those tools in the tP as well. If it turns out that those tools can save you time without compromising your learning, it is fine to use them in the tP. In addition, learning what those tools can do for you has value too.
In both cases above,
i) do share your interesting experiences (positive as well as negative) in this thread so that others can benefit from them too (plus you get credit for sharing useful things in the forum).
ii) keep in mind that you need to declare non-trivial tP code segments generated by such tools as 'reused'.