Is code completion bad for learning?

I noticed that, at least in the Responsive Web Design and Basic JavaScript curriculum, Github Copilot knew both the problem and solution before I had finished pasting the setup code into my editor.

I was able to complete the first 50 or so tasks in the Basic JavaScript section with just a few comment lines to instruct Copilot (sometimes even that wasn’t necessary). Here’s an example:

ezgif.com-gif-maker (1)

How much did you understand and create that solution? Getting the answer really isn’t the point in these challenges. It’s the practice problem solving.

1 Like

That’s bad if you really didn’t learn it. Could you go back and redo those exercises without copilot? If not, then you probably should not use it.

1 Like

The idea of code completion is to speed up program development process, which basically favor’s intermediate to pro developers but not for beginners.

Reasons being that, as a beginner;

  1. Getting a good grasp of the basics of a language is key to your success with that language.

  2. You need to be confident in your ability to write code in a language of choice in the absence of code completion or snippets.

There are many reasons why its a bad idea, but for now, focus on getting the basics and become confident , then code completion will come later to make life easier.

1 Like

To be honest, I had to turn it off. It was providing me with solutions before I had time to work them out myself, which is unfortunate because I enjoy Copilot’s code evaluation/debugging features.

Yh. Github Copilot is awesome , tho some of its code completions require your review

Is code completion bad for learning?

No, not normally with other code completion tools. If the completion UI shows a list of functions or methods, with documentation, or shows previously-used variables, or shows types available, etc etc, that’s really useful and can really help.

But in this case, with Copilot , yes it is bad for learning, a million times yes [though obviously YMMV].

Copilot isn’t a code evaluation tool or a debugging tool. It’s a smart completion tool. You aren’t really going to learn, it’s just going to do the entire curriculum for you. You’re really just learning what hints you should give to an algorithm so that it produces output that passes some tests. That’s all.

It works based on a corpus, and that corpus has hundreds (if not thousands) of correct examples of code for these challenges, because people put that stuff in GitHub. So as soon as you start typing something that matches any of those examples, you’ll get the rest filled in immediately. That’s kinda useful IRL – it’ll fill in simple stuff and boilerplate without any problem whatsoever. That’s pretty good for things like unit tests! It’s also kinda not useful – it won’t do business-specific logic (which is most useful stuff IRL) very well. It’ll often get quite close, but quite close isn’t great because it actually increases the amount of manual fiddling needed to make things work properly (it generates heaps of code where everything looks fine at first glance). If you know what you’re doing and you know what you’re looking for, that’s sometimes ok, if annoying. If you don’t, which is where you’re at, then you’re just guessing, it’s just trial and error.

It is a very useful tool at times, but you need to be very careful with it and understand what it is. If you have basic needs (eg you are following a beginner curriculum & you want it to give you the answers!) it will probably be able to write the code for you. If you are very careful about how you structure your code and give it very specific hints, you can get it to write quite complex things. But without a base knowledge of how code works, you are just hoping that the [very dumb!] machine will write things that fulfil the tasks you’ve been given, and that it won’t mess things up.

If you get someone/something else to do the work of learning for you, then it’s unlikely you’re going to learn anything. To get information into your brain, to learn these skills, you normally need to do it yourself, to write code. It’s the process of writing it that gets it stuck in your head, not looking at code that’s already been written. Like writing notes: it’s not the notes themselves, it’s the process of writing the notes that’s the important bit.

1 Like

I figured it had something to do with fCC code being in thousands of Github repo’s.

Copilot isn’t a code evaluation tool or a debugging tool.

What I meant was, if you have an assignment written, or a boolean, Copilot will run that code and display the output for you, as a comment - that part I found extremely useful!

You can check out the Quokka extension for code testing.


But yes as said, having Copilot write the code for you when you are practicing solving coding challenges is not going to do you any favors.

1 Like