I've heard this from many people now but I cannot relate at all. Copilot has changed my entire strategy of programming (which I have been doing for 20 years)
It writes lots of code before I even think about what I was going to do in that file. Half the time it just works outright, and if not, with minor changes.
It is fantastic when I have to build functionality in languages I am not great at.
I regularly copy and paste code from my colleagues PR's and paste it into GPT-4, it explains it perfectly and gives tips on how to improve it (which I add as comments to my PR review)
It's comments like these that make me wish I could stand behind the chair of the people who get these results because I feel like there's something lost in translation. I don't know if I'm taking your comment too literally but this part confuses me:
> It writes lots of code before I even think about what I was going to do in that file.
If you haven't even thought of what you want to do in the file, how are you prompting Copilot to write the code you need? Am I understanding correctly that Copilot not only generates the correct code, but it's also able to deduce what code you meant to ask for without any input from you? I don't see how this is possible except in the uncommon case where you are bringing a file to be more in line with other files in your code base that have a similar structure.
I do think Copilot can be useful, but I'm confused at how different my experience is from what others are getting out of the tool.
ChatGPT 4 is amazing! I use it when I’m blocked to get unstuck. I don’t need perfectly functioning code, just something to get my gears turning. I use it to review my own code. It often has pretty good suggestions, or can validate my approach. And I use it to sketch out unit tests for me. I still have fill in pieces, but it’s absolutely improved my output. It’s like having an egoless programming partner. Yeah, it makes mistakes, but I treat the AI like a programming buddy, not a flawless code wizard. It doesn’t solve problems for me, but we come to solutions together.
> Am I understanding correctly that Copilot not only generates the correct code, but it's also able to deduce what code you meant to ask for without any input from you?
You can know what you want to program, but not how you would approach the code. "Hey ChatGPT, how do I draw a curved line plot in JUCE?"
If I just ask it "Can you write me a script that gathers the current stories on the front page of hacker news and sorts them by number of comments, then prints the title and number of comments?" it writes a script in Python using requests and BeautifulSoup4.
I wonder if it's a language difference thing (I use C# mostly), but my experience with Copilot has been nothing short of mind-blowing.
It's not writing every line, and when writing truly new feature code it's less useful. But here are two patterns that I've noticed it is especially and consistently good at as a potential place to look for initial value if you are skeptical:
- If you have any kind of repeated pattern, even very complex ones, like performing a set of operations on a set of objects, or initializing a set of things, or whatever, it will guess everything else after the first line 90% of the time. This stuff is almost always plumbing/wiring/boilerplate-type code, so pure time gained. Think about Excel filling incrementing numbers down a column, but for pattern-matched lines or blocks of code.
- For any reasonably testable class, if I write the name of the unit test, Copilot will write the entire unit test perfectly 90% of the time, down to variable names and //Arrange//Act//Assert comments that I stylistically prefer. Seriously, it's sort of scary how good it is at this.
I've used ChatGPT and Copilot with Javascript & Typescript and a bunch of frameworks. Python, C, C++, C#, Go, 6502, Z80, ARM and a few other languages so far. They've all worked pretty good. I wish it had a wider breadth of APIs and documentation, but it is pretty good so far.
Meh. My coworkers do what you’re doing, and then I end up rewriting their stuff. (AI generated stuff generally passes code reviews because it gets the benefit of the doubt.)
Meh. I started coding professionally in the age of AI. My productivity is way higher than it should be. I don't let the AI "write" the code for me. I use it as a companion that I asked question of and suggestions.
It suggests solutions to problems, I add the complexity. So far my code has been both clear and performant. This should not be the case at my level.
> I started coding professionally in the age of AI.
What does this mean?
Copilot was released in March of this year. ChatGPT 4, which the community considers to be the only version of ChatGPT to be competent enough at coding tasks, was also released in March.
My guess is that you didn't mean that statement to be a fancy way of saying "I've been coding professionally for around 6 months", but I don't know what else you mean by the "age of AI".
I feel like using suggestions for line by line composition might lend itself to better review by programmers.
As opposed to ChatGPT which spits out dozens of lines of code based on a request and therefore requires more involved editing after the fact to understand what’s happening.
Yes, GPT is an aid not a programmer. You should still be doing the programming while ChatGPT gives you quick solutions to problems without having to look up Stack Overflow.
I can understand using chatgpt 4 but copilot??? copilot can barely autocomplete... and half the time it does it incorrectly when variables and other stuff are involved
It writes lots of code before I even think about what I was going to do in that file. Half the time it just works outright, and if not, with minor changes.
It is fantastic when I have to build functionality in languages I am not great at.
I regularly copy and paste code from my colleagues PR's and paste it into GPT-4, it explains it perfectly and gives tips on how to improve it (which I add as comments to my PR review)