Thursday, November 07, 2019

AI-assisted Programming

As I said in yesterday’s blog post,Microsoft has been running their big MSIgnite event this week and making all sorts of announcements. One interesting announcement what improvements to what they call Visual Studio IntelliCode.  The idea is that they are using machine learning to help programmers with writing code. In the latest update are whole line completions and refactoring. Interesting.

I haven’t seen IntelliCode in use before and it is probably because it is not turned on by default. I did some searching and found that it can be turned on as an Extension (I had to search a bit under the Manage Extentions option) and then you can customize aspects of it from Tools –> Options –> IntelliCode. Oh, and you need Visual Studio or VS Code 2019 for this. I am using Visual Studio 2019 Community Edition which is free.

SO far I am not seeing obvious help from it but it may be that I have to do something more complicated in my code or write more code first. It does apparently take context into account for its suggestions and I may not have given it enough yet. But I’ll keep playing. And maybe I should look for some video demos online.

There are other things to think about though regardless of if it has been useful already. What is the training like? The write up I have seen says that it learns from examples on GitHub. Initially that scared me as literally anyone can upload to GitHub. One reference I found said  something about the 500 best repositories on GitHub. What ever that means. And what was the criteria for “500 best?”  What sort of standards will this learning suggest?

Some of the documentation talks about options for using other databases of code to train the system so that businesses can train the AI with their code and standards. As a teacher I wonder if there could be a training set for AP Computer Science A? I think Java is supported with IntelliCode in Visual Studio Code.

No doubt some will complain that it is “too much help” for beginners but I’m not sure about that. You still have to know enough to take or reject suggestions for one thing. And having the computer tell a beginner something like “you should make a method to reduce this redundant code” might be better received than the same comment from a human teacher.

Will this help students learn more or dumb down the process? I’m an optimist and think it will be a good thing. What are your thoughts and concerns?

2 comments:

  1. Garth6:40 PM

    I am just not sure what "too much help" for beginners is. I remember when the slide rule was the tool of choice and the calculator was going to ruin math. It may have but that did not stop us. If programming consists of remembering code that I have done something wrong for years. I try to save all the coding I do so if I need to do that task again I can copy it. If I do not know how to do it I Google it. I think tools like auto-complete and Intellisense only make sense. I remember doing square roots by hand in high school. I do not do that any more, I have a tool. The same goes for coding. If there is a tool I am going for it. I never was a fan of making things hard for beginners. It make them tough and willing to handle adversity, but it also chases them away.

    ReplyDelete
  2. Well - as always in education ;-) - it (namely what is too much help) depends a bit ...

    mentioning the slide rule: I recall a conversation with a senior professor of mechanical engineering (me being an (young) enthusiastic promoter of the usage of Computer algebra systems) : he said: I agree that using a slide ruler now it would be somehow ridiculous, but in those times students have much better sense on the magnitude of the result ...

    What I would like to say - with each tool we have to consider also the "side effects" of its usage and (as with slide ruler) if we observe some important skill or concept or ... (sense of the magnitude of the result of an math operation) is lost, device a way to bring this lost knowledge back in ... (probably not by prohibiting usage of the tool but with other means)

    ReplyDelete