this post was submitted on 15 Jun 2023
42 points (100.0% liked)
Experienced Devs
125 readers
1 users here now
A community for discussion amongst professional software developers.
Posts should be relevant to those well into their careers.
For those looking to break into the industry, are hustling for their first job, or have just started their career and are looking for advice, check out:
- Logo base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I am an avid user of Copilot. I don't have statistics, but I'd say it writes about 10-50% of my code. It's not providing great ideas about what the code should do, it mostly just automates away the obvious stuff.
It works especially great if your code is well documented and everything has sensible naming. Which is a state you want to be in anyway.
On the other hand, it helps you document the code and create useful error messages, since writing verbose text is much easier with it, and it can often generate useful text from just a few characters, given the surrounding context.
I also use it as an adhoc docu search when working with libraries that I am not very familiar with. What's the arguments called for turning the label text green? Just add a "green text" comment on the line and use the suggestion that copilot spits out. This works very well with popular libraries in Python, which usually don't have great type hints.
Another thing I find it useful with is math. Did you know that Copilot can even generate derivatives of math functions? Not a 100% correct every time, but when I have to do some "quick maths" like doing coordinate transformations or interpolating keyframes in an animation, I get the correct formula given the variables I have, in 90% of the time, autocompleted in about a second.
All in all, copilot saves me a bunch of time and keystrokes. If you write your code in an explicit, explainatory way, it just does what's obvious, leaving you to think and elaborate instead of typing that all out.
As for ChatGPT, it is sometimes useful to figure out what API I might need in a specific situation, or explain error messages. I don't use it as often, especially not to generate a bunch of code I want to use in my project. That's Copilot's job. But ChatGPT can explain a lot of things, and you can describe your problem much broader than with Copilot.
Also GPT 4 is much better. But with twice the price of Copilot (in my country), it doesn't bring as much bang for the buck, at least for my kind of usage.
I was thinking that one effect copilot-like tools will have in projects is more comments describing the code. Because copilot can both help with the code if you document it well as it can document code well with descriptions and their parameters.
Hope one of the functionalities we get from this is a comment linter, making sure code and comments are in sync.
If we don’t codebases will be filled to the brim with confusing and incorrect comments. Probably would be better to strip and re-generate them.