this post was submitted on 13 Feb 2024
63 points (93.2% liked)
Technology
59374 readers
3586 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
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
That's not how I use it at all. I mean I started out doing that, but these days it's more like this (for anyone who hasn't used copilot, the grey italic text is the auto-generated code - tab to accept, or just type over it to ignore it):
Sure - I totally could have written the constructor. But it would have taken longer, and I probably would've made a few typos. And by the way it's way better than copying from Stack Overflow, because it knows your coding style, it knows what other classes/etc exist in your project, etc etc.
It's also pretty good at refactoring. You can tell it to refactor something to use a different coding pattern for example, and it'll write 30 lines of code then show you a git style diff.
Not to mention you can ask questions about your code now. Like "how has X been implemented in this 20 year old project I started working on today?" Or one I had the other day "I'm getting this error, what files might be causing that?" It gave me a list of 15 files and I was able to find it in a few minutes. The error had no context for me to figure it out.
I second this. GH Copilot for coding is an amazing tool, not just for boilerplate, but to fill complementary logic, brainstorm test cases, rewriting and refactoring, reducing typos or "copy and paste" errors, documentation, prototyping code from a human-written description, and probably several other things at different levels of competence.
Makes me wonder what people that don't find it useful are trying to do with it. Sure you'll probably need or want to change some things, but that's miles ahead of having to write it from zero.
Hell, if you start declaring a function with a good name and good names + types for the arguments, it'll often write an implementation that is mostly correct using the rest of the file as context.