News

Microsoft Boosts AI-Assisted Developer Productivity

While the question of artificial intelligence someday replacing computer programmers is still being debated, Microsoft is steadily using AI advances to boost their productivity, this week announcing whole line completions and refactoring.

Visual Studio developers get their AI boost from IntelliCode, which puts AI to work to bolster the code-completion functionality of IntelliSense. Machine learning models are used to analyze thousands of GitHub-hosted open source projects to place the most likely to be used constructs at the top of code-completion lists, even providing argument completion and inferring code style and formatting conventions, finding misused variables, identifying files most in need of code reviews and more.

At this week's Ignite 2019 conference, Microsoft unveiled two new capabilities: whole line completions and refactoring.

"IntelliCode now provides whole-line code completion suggestions mined from the collective intelligence of your trusted developer knowledge bases," said Amanda Silver, Partner Director Program Manager, Visual Studio and Visual Studio Code, in a Nov. 4 blog post. "This is like having an AI-developer pair-programming with you, providing meaningful, suggestions and whole-line code completions without disrupting your flow."

IntelliCode refactorings in Visual Studio IDE
[Click on image for larger, animated GIF view.] IntelliCode refactorings in animated action in Visual Studio IDE

Refactoring, meanwhile, was detailed in a Sept. 5 post by Mark Wilson-Thomas,Principal Program Manager, Visual Studio IntelliCode. He described refactoring, then in preview, thusly: "Under the hood, IntelliCode looks at each of your edits as you type. It uses PROSE (PROgram Synthesis by Example) to synthesize generalized edit scripts that can take your code from the 'before editing' state to the 'after'. When IntelliCode discovers that it can apply one of these scripts elsewhere in your code (which can be based on as few as 2 examples in your code), we let you know via the Visual Studio lightbulb in the margin or when hovering the affected code, and through green 'squiggles'. The lightbulb offers actions to apply the refactorings for you. The underlying technology is similar to the Excel’s Flash Fill feature and is described in this research paper."

Just a couple months later, the refactoring technology implementation has evolved further, as Silver this week detailed AI technology developed by the PROSE team called program synthesis, more specifically called programming-by-examples (PBE).

"IntelliCode watches code changes as they occur in the IDE and locally synthesizes, on demand, edit scripts from any set of repetitive pattern changes," she said. "It uses these edit scripts to produce suggestions, enabling you to apply repetitive changes quickly or create a pull request to apply the suggestion(s) for team review without distracting your current work. IntelliCode refactorings take the time-intensity and error-proneness out of routine tasks, such as introducing a new helper function."

Silver said developers can try out refactorings in Visual Studio C# projects by downloading the latest Visual Studio Preview.

At the end of her post, in response to a question posed today about using IntelliCode in the cross-platform, open-source Visual Studio Code editor, Wilson-Thomas chimed in to point to this VS Code extension, but he also noted that "the whole line completion and refactorings features shown at Ignite are not yet released; sign up at https://aka.ms/vsicsignup to be kept up to date as we make progress, and thanks for your interest!"

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube