3 ms·
While the fact that github is unclear about all thisis true and the legality of both training copilot with licensed code and using it's output is even less clea
by LelouBil 4y ago
While the fact that github is unclear about all thisis true and the legality of both training copilot with licensed code and using it's output is even less clear, in my opinion copilot can still be a usefull tool when you know when and how to use it.
> Developers may wonder: is this AI that generates code, or AI that searches the web for open source code that might be suitable?
Developers who wonder this never tried/researched about copilot.
What it's actually usefull for is to generate code thightly integrated into yours, or doing boilerplate/repetitive stuff based on what you have already written.
Example :
I have a base exception class and classes that inherit this class all with different names.
I'm writing error handling logic and only wrote the case for the first error class, with an error message and everything.
Copilot is able to generate the cases for all the other classes, with unique and descriptive error messages for each one.
If you only use it for this kind of stuff, it saves time and you don't have to worry about licenses/code laundering for simple cases like this.
- dns_snek 4y agoThis is my takeaway from using Copilot as well. Given my domain and language of choice, Copilot's suggestions range from non-idiomatic to completely broken when it comes to any kind of feature work. I don't think of it as a tool that solves problems for me, I see it as a glorified autocomplete that understands code and is skilled at applying patterns from previous lines (e.g. in config files) and other files in your project in a way that usually makes sense. This is a contrived example, but just to illustrate the kind of pattern matching I'm talking about, say I'm writing the following code: VAR_PROJECT_A_VAR_A=$(curl http://localhost/PROJECT-A/VAR-A http://localhost/PROJECT-A/VAR-A) VAR_PROJECT_A_VAR_B=$(curl http://localhost/PROJECT-A/VAR-B http://localhost/PROJECT-A/VAR-B) VAR_PROJECT_X_VAR_Q5_X= It will auto-complete it with the following, as expected: $(curl http://localhost/PROJECT-X/VAR-Q5-X http://localhost/PROJECT-X/VAR-Q5-X) It feels like Copilot understands the context in variety of programming languages and configuration formats. If you're writing a Docker Compose file and define a Redis service that contains the flag `--port 8888`, it will automatically offer to autocomplete your exposed ports with 8888:8888. Without the --port flag it will suggest 6379, which is the default port for Redis. These examples are trivial, but I find that these savings really add up and cut down on the amount of boilerplate and otherwise uninteresting busywork you have to do. Of course the copyright-violating aspects of Copilot are inexcusable, but I still find Copilot to be useful in other ways.
- joshstrange 4y agoSame here, I find CoPilot super useful for boilerplate, repeated variable definitions, similar functions, etc. I've quite literally never had it spit out more than 3-4 lines of code and it's always been trivial code. That's where it shines. On their own the suggestions are "trivial"/"simple"/"obvious" but like you said, it adds up and makes me smile every time I don't have to type out something basic, that alone is worth $10/mo.