Of course, I'm saying this without actually having used it for programming, so I might be way off base, but the feedback from coworkers who rely even on the now basic GitHub Copilot is that it greatly improves their productivity. I'm envious, of course, but I'm not willing to sacrifice my privacy for that.
It is not just a tool for students to write assignments. In experienced hands it can easily double your productivity.
Here is an example where it helps. I tried to initiate a connection to a Mongodb server using Python. While i have used many databases before, I have never used Python and MongoDB together. So, i knew i would have to have some kind of MongoDB library, a connection Factory and a connection string. I could have googled all of these things.
I did the following in VS Code using CoPilot. def get_db():
"""Initialise a MongoDB connection to a local database"""
It then automatically filled in the rest. db = getattr(g, '_database', None)
if db is None:
db = g._database =
MongoClient('mongodb://localhost:27017/') return db
Notice above, that it knew i was using a flask environment and added the line getattr.Why this is a productivity boost is that i did not have to alt-tab to a browser, search for "pythong mongodb tutorial example" and then type it out. I was able to do the whole thing from VS Code and since i use vsvim, i could do this without taking my fingers off of the keyboard.
This is the next jump since autocompletion. I like it.
Sure it may take a bit more time to get going, but then you'll get it right the first time and learn something along the way. Your copilot example is just another iteration of copy-and-paste some random snippet from StackOverflow in the hope that it will work, but without having seen its context, like from when is the post and what comments, good or bad, did it get.
I'd actually be pretty afraid of a codebase that is created like that.
We have 50+ years of software engineering wisdom to deal with these issues. Testing, Fuzzing, version control, code reviews, the whole gauntlet.
I can't know that my code will be free of critical flaws, but I do understand the common sources of flaws and techniques to avoid them, and I'm quite confident I can build small features like this that simply aren't vulnerable to SQL injection, on the first try and without requiring fuzzers or code review: https://infosec.exchange/@malwaretech/110029899620668108
But I have a feeling for both, which is one of the key components of the skill in our trade.
For idionmatic code, I know the degree to which I'm following how things "should" be done or are "usually" done in a given language. If I'm uncertain, I know that. GPT won't tell me this. Worse, it will confidently claim things, possibly even if presented with evidence to the contrary.
For critical flaws, I know the "dark corners" of the code. Cases which were not obvious to handle or required some trick, etc. I'll test those specifically. With GPTs code, I have no idea what the critical cases are. I can read the code and can try to guess. But it's like outsourcing writing tests to a QA department. Never donna be as effective as the original author of the code. And if I can't trust GPT to write correct code, I can't trust it to write a good test for the code. So, neither the original author of the code (GPT) nor somebody external (me) will be able to test the result properly
Yes because tutorial info on some rando's webpage is never out of date. /s
Essentially, GPT is that rando's webpage but with the metadata stripped away that allowed me to make judgement calls about its trustworthyness. No author, no time, no style to see if somebody is trolling.
"response has issue A" -> point out issue A to GPT "response has issue B" -> point out issue B to GPT
GPT replies with the response that had issue A ...
This is not a tool that is going to be good at performing generic tasks. It just isn't.
Specifically, I was using this to support the statement "In very near future your IDE will send the whole codebase as context to LLMs." I'm not talking about loops or accuracy.
It can't even explain small code to me unless it is something that it has been trained on. Often it gets even simple things wrong, either obviously, or worse, subtly wrong.
I still think we will get useful things from scaling up current models though. I've already got a lot of value out of Copilot, for instance, and I'm looking forward to the next version based on GPT-4. Recently, I've been using the GPT-3 Copilot to write a lot of pandas/matplotlib code, which is fairly straightforward and repetitive, but as mainly a Java developer, I just don't have the APIs at my fingertips. Copilot helps a lot with this sort of thing.
Right, but it's no more known than before GPT models IMO. It's the same unknown.
I don't mean to imply these language models are not impressive. They are pretty impressive.
Identifying hose problems will bring a LOT of value - but it isn't going to program and do general problem solving for you! It just has no signs of being able to do that.
But, it will be a tool - it won't be something that will solve general problems for you. It won't make an average programmer a great programmer.
- https://news.ycombinator.com/item?id=35236275
Not faster or slower but at what quality?
At least every time I've tried to ask GPT 3 & 4 to write anything it's always missing things or not even close to the optimal way that I have to look up the docs and fill in the gaps, which often takes just as long as starting from scratch.
> now basic GitHub Copilot is that it greatly improves their productivity
Perhaps it depends on what you're working on. If it's quick iterations that isn't that concerned about what code goes in and whether it's maintainable then sure.
It's impressive but for now still has lots of gaps. However it is over confident and often misleading.
When I tried it I'd often have to go back to it and keep telling it to use a different way of doing things because the world moved on. By that time there wasn't much point.
I see praises by those that have never coded in a language. They try ChatGPT, see it produce "ok" output and call it a day. If that's where we're going the web will be even more bloated than Electron and everything will be 10x worse. It's like low code but even lower (in quality).
[1] https://github.com/topics/go https://github.com/topics/rust
At work we have really worked hard to minimise boilerplate and manually-written/repetitive tests, so I don't write much of that. Getting GPT to write it would certainly be worse: we would still have the deadweight of boilerplate/repetition even if we didn't have to write it, and some of it would be incorrect. Maybe this varies a lot by company — if you're often writing a lot of repetitive code, and for whatever reason you can't fix the deeper issues, then something like GPT/Copilot could be a godsend.
About documentation lookups, I don't know if this varies by language, but I've had very little luck with using GPT for this. For the languages I use regularly, I can find anything I need in the documentation very rapidly. When I've tried to use GPT to answer the same questions, it occasionally gives completely wrong answers (wasting my time if I believe it), and almost always misses out some subtlety that turned out to be important. It just doesn't seem to be very good for this purpose yet.
There's boilerplate in any codebase, even if you make an effort to minimize it. There are always patterns, repeated code structure, CI and build tool configuration, etc.
If nothing else, just being able to say "write a test for this function", which covers all code paths, mocking, fuzzing, etc., would be a huge timesaver, even if you have to end up fixing the code manually. From what I've seen, this is already possible with current tools; imagine how the accuracy will improve with future generations. Today it's not much different from reviewing code from a coworker, but soon you'll just be able to accept the changes with a quick overview, or right away.
Dismissing them on the basis that they just save you typing time is not seeing their full potential.
- https://news.ycombinator.com/item?id=35236275
- https://news.ycombinator.com/item?id=35248704
- https://news.ycombinator.com/item?id=35228808
And this is with the GPT-4 limitation of 32k input tokens. Imagine what will be possible in the next generation that increases the context size.
In practice the stuff it will suggest to me is sort of random, it may or may not be the best choice for the task at hand, but it's a form of discovery I didn't have previously. The fact that when it tells me about e.g. a new library it can also mock up some sample code that might or might not work is a pleasant bonus.
I suspect the people who find this amazing tech don't program much or are using this very differently than we are. Or program very differently than us.
In my experience these things need a little nuance communicated as a part of the problem, but GPT can't get there. It just starts looping over incorrect solutions (rather than modifying them slightly to get it right like a person would).
These aren't crazy advanced things, either. I'm not a genius. I solved the problems when GPT couldn't. I was just trying out GPT4.
If you're only expecting it to solve your hard problem completely and from scratch entirely from a prompt that's probably not going to succeed, but I can't see how you're possibly faster typing 80-90 extra characters of a log statement than a Copilot user who just presses tab to get the same thing. Those little things add up to significant time savings over a week. Same for mocking services in a test, or manipulating lists of data or any number of things it autocompletes where you'd previously need to author a short script to perform or learn advanced vim movements and recording macros to emulate.
I've played around with ChatGPT and Copilot a little, and found that they often are subtly, but very confidently wrong in their output when asked to perform a programming task.
Sure you could spend ages refining the prompt etc, but its going to be faster to just write the fucking code yourself in the first place most of the time.
Then there's the privacy/security concerns...