DEV Community

Cover image for GitHub Copilot blew my mind on a code-along exercise

GitHub Copilot blew my mind on a code-along exercise

Damian Demasi on November 04, 2021

GitHub Copilot has surprised me beyond what I could have ever expected. I guess artificial intelligence is more capable than I thought initially, a...
Collapse
 
yoinx profile image
Joe Schubert

Wait... So all it took to impress you was for it to auto complete a code along exercise (which is very likely committed to someone's GitHub somewhere)?

I mean, I've been fairly impressed with CoPilot overall myself.... But you're basically saying "wow it was able to auto-complete code that I was about to copy from a lesson before I could copy it."

I don't get why that's impressive or article worthy.

Collapse
 
colocodes profile image
Damian Demasi • Edited

It’s impressive for me because I jumped from an auto completion of a single word (without using Copilot), to a fully featured Ruby method directly related to an online course I’m doing, and I just had to type four letters.

Collapse
 
yoinx profile image
Joe Schubert

Yeah. The difference though between it being "notable" and "meh" is that you were getting ready to type code that's already pre-existing, character for character. It's pretty impressive at what it does... The example that you gave though is an example of it giving you code that was probably used, verbatim, in it's AI training samples. Which honestly isn't all that impressive that it was able to guess that.

Thread Thread
 
colocodes profile image
Damian Demasi

πŸ™‚

What would you consider being a notable feature of this tool?

Thread Thread
 
yoinx profile image
Joe Schubert

I mean, the autocompletion features are notable. Just more notable if you're coding something fresh or "off the cuff". It suggesting premade code that you're typing off a guide ... Not as much.

Thread Thread
 
nssimeonov profile image
Templar++

Joe, it's been a while since you were a student, right? I was thinking to comment something like you, but when I do they call me a****le and I end up in pointless argues with students and juniors.

On a side note: TabNine and Codota are similar to CoPilot and I ended up uninstalling both. I still don't have strong opinion about CoPilot yet.

Thread Thread
 
colocodes profile image
Damian Demasi

Why did you uninstall them?

Thread Thread
 
nssimeonov profile image
Templar++ • Edited

Not much value when you are usually the person answering the questions on StackOverflow including your own. It was burning CPU cycles and slowing down my computer without anything that useful. Decided I like the classic-style autocomplete better.

Thread Thread
 
colocodes profile image
Damian Demasi

You are on a different level altogether! :D

Collapse
 
nombrekeff profile image
Keff

I just think of it as a smarter snippet tool/autocomplete. In my experience and for the use I gave Copilot, I was not impressed and it did not help me much.

I use TabNine and that works fantastic for me, copilot not as much.

I personally don't think it will replace us whatsoever, it will just support some of us like any other tool.

Collapse
 
colocodes profile image
Damian Demasi

Interesting! I’ve used Tabnine and I didn’t find it much helpful. I guess it will depend on the programming language we are using and the specific project maybe πŸ€·β€β™‚οΈ

I’m in the same boat as you. I think, in the end, this is just another tool, and the programmer will not be replaced by it.

Collapse
 
nombrekeff profile image
Keff

I too didn't find it that useful initially, but after using it for around 1 year os so it really started to understand my way of coding and the projects.

Thread Thread
 
colocodes profile image
Damian Demasi

I guess it won't hurt start using it again. I'll try it once more!

Collapse
 
beebase profile image
Maarten Berkenbosch

Keep on dreaming. Maybe programmers will stay, but they will become a hell of a lot more efficient. Like 1 programmer doing the work of 100 (or whatever). It's a pattern that arises in every field AI has entered.

Collapse
 
nombrekeff profile image
Keff

Yeah I somewhat agree. In the mid/long term probably yes, it will make most of us redundant, but we will not be replaced as the question in the post asked. I also don't think we should worry much still, at least not about copilot.

Thread Thread
 
beebase profile image
Maarten Berkenbosch

I also don't see it happening any time soon. However, AI has this exponential thing which makes our guess as good as anyone else's. We may still be on the shallow curve for years, but boy, when it steepens, I'm sure things will change rapidly.

Collapse
 
assayeassefa profile image
AssayeAssefa • Edited

Absolutely. Also, with efficiency comes the need to trim away the unneeded heads: entry levels, juniors and even some mid levels.

Collapse
 
spaceportdevelopment profile image
Spaceport Development

I use Tabnine and GitHub Copilot... A very strong combination ☺️

Collapse
 
colocodes profile image
Damian Demasi

Nice!

Collapse
 
jcolag profile image
John Colagioia (he/him)

My run-through and assessment---which I wrote up on my blog but haven't had time to republish here---was similar but less generous. If you're a fledgling programmer who writes (bad) comments along the lines of "sort the input array from low to high, using the mergesort algorithm," it works as an excellent assistant...but you're still the senior developer in the relationship.

However, once you try to put it to real work, you're suddenly stranded in a Douglas Adams novel, where the AI tries to tell you what you should do instead, then flubs that task, more often than not.

Collapse
 
drazisil profile image
Molly Crendraven

This! ☝️

Collapse
 
colocodes profile image
Damian Demasi

Agree. I started using it at my work, and so far is far from impressive.

Collapse
 
optimisedu profile image
optimisedu

I also like TabNine. I love autopilot for say "function fibonacciRecurively(n)" it will give me a recursive Fibonacci.
Or "const howManyPoke//autofils mon = 151" -- I don't think the second example is good.

These were known things that have been debated and evolved. A better example I am working with web audio API, and have a very orderly way or doing things to make a modular synthesiser. CoPilot can make sine wave oscillators. Great, but I can do that on autopilot myself and copilot doesn't use MY style.

In short copilot is great for coding challenges. As mentioned earlier many people will have deployed your courses code to git. For new functions with don't have a regonised pattern copilot stalls - or if you are extremely specific and lucky you might get what you need, or a commit somebody made years ago which just doesn't work.

Collapse
 
colocodes profile image
Damian Demasi

I agree with your oppinion. GitHub copilot can be helpful, but it's not perfect.

Collapse
 
turry profile image
Turry

For it to work, it needs code and that code is from us so it won’t replace developers until every sort of code is made in the world of programming.

Collapse
 
turry profile image
Turry • Edited

I have to admit that that’s the smartest thing I’ve said in a while πŸ‘€

Collapse
 
colocodes profile image
Damian Demasi

Agree! And as the world of programming is ever expanding, it will take it forever...

Collapse
 
drazisil profile image
Molly Crendraven

I'm glad you went the disable route. That was my first thought you said it filled in everything. Same reason they tell us not to copy and paste the code, we need to train our brains to be autopilot. Then we have space to learn more! 🀣πŸ€ͺ

Collapse
 
colocodes profile image
Damian Demasi

Exactly! πŸ˜…

Collapse
 
volker_schukai profile image
Volker Schukai

I have been working with copilot and intelliJ for 1 week now.
I am not really convinced yet. Let's see if this still becomes successful.

Collapse
 
colocodes profile image
Damian Demasi

I think using it on work related code is not as impressive. Maybe that’s because of the code being too customized to a specific need.

Collapse
 
volker_schukai profile image
Volker Schukai

that is possible.

Collapse
 
thesecuritydev profile image
David

I think Copilot is the perfect name. I'm still in control, but it helps me out on tedious or repetitive tasks. Where it really shines though is in writing code that I would have had to Google to do myself. It's probably saved me hours of work in cases like that. It's suggestions are often best practices and help me learn how to do things more efficiently. I love it so far!

Collapse
 
colocodes profile image
Damian Demasi

This! Improving the code quality is one of the best use case I can think of about this tech.

Collapse
 
ifierygod profile image
Goran Kortjie

I don't trust it.

Collapse
 
drazisil profile image
Molly Crendraven

"Deploy the firewall, Hal!"
"I'm sorry, Dave, it doesn't meet the average coding style"

Collapse
 
colocodes profile image
Damian Demasi

πŸ˜…

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

"I should disable this because otherwise, I won't be doing any code by myself, which is the whole point of the coding-along!"

Love that attitude!

Collapse
 
colocodes profile image
Damian Demasi

Thanks!

Collapse
 
troke12 profile image
I Made Ocy Darma Putra

Can't wait to use this, this is help me for tired searching an examples