Sergey Nivens - Fotolia

Kite boosts Python code completion with machine learning

Software development tools startup Kite applies machine learning models to help developers automate the process of completing lines of code in real time.

Kite, a software development tools startup, has devised a system to boost programmer productivity by using machine learning to predict the next string of code that Python programmers will write.

Kite's Line-of-Code Completions feature uses advanced machine learning models to cut some of the mundane tasks that programmers perform to build applications, such as setting up build processes, searching for code snippets on Google, cutting and pasting boilerplate code from Stack Overflow, and repeatedly solving the same error messages.

The system analyzes the entire source code base of open source projects on GitHub and applies that data to machine learning models trained to predict the next word or words of code as programmers write in real time. This smarter programming environment makes it possible for developers to focus on what's unique about their application.

"From the time I learned coding on a Commodore 64, I always found it nuts that so many talented coders are put off through having to deal with frustrating syntax errors," said Torsten Volk, an analyst at Enterprise Management Associates (EMA) in Boulder, Colo.

Kite isn't the only software development tools provider to offer code completion. For instance, the IntelliCode feature in Microsoft Visual Studio IDE is an AI-assisted tool with code completion capability. However, Kite's CEO, Adam Smith, said IntelliCode takes normal completions to predict the next word of code based on basic models, while Kite's tool uses more advanced models to analyze all of the open source code on GitHub and Microsoft.

"We've built much richer models, and we can predict further ahead," Smith said. "It saves you more typing, more thinking, and more back and forth."

Kite versus stock completions
Kite versus stock completions

When Microsoft launched IntelliCode last May at its Build developer conference, the company said IntelliCode used over 2,000 GitHub repositories and only supported C#. Microsoft has since added support for Python, JavaScript, TypeScript, XAML and Java.

"IntelliCode is good for a language you are already fairly fluent in, but it is not actually intelligent in that it guesses what you are trying to do," EMA's Volk said. "It just narrows your options down to the ones that could potentially be viable, but it does not at all know your intention."

Instead, Kite's Line-of-Code Completions service predicts programmers' intent -- similar to Google's Gmail Smart Compose feature, which predicts how users might complete a sentence as they compose an email, Smith said.

Kite currently only supports Python, with other languages in the works, Smith said. The system integrates with popular code editors and integrated development environments, including Atom, PyCharm, Sublime, Visual Studio Code and Vim.

Autocomplete versus autocorrect

Kite focuses on code completion, and not code correction, because programming code has to be exactly correct. Send a text with autocorrect errors, and the tenor of the message comes across. But mistype a single letter of code, and a program will not run.

The concept to advance autocomplete beyond intelligent suggestions of variables, functions, objects and other code components to entire code snippets is interesting, said Ronald Schmelzer, an analyst at Cognilytica in Washington, D.C. "It aims to both accelerate application development while reducing errors. Or, at least that's the promise," he said.

However, autocomplete can be unreliable, and it's up to the developer to make sure that the result is not code spaghetti, Schmelzer said.

"The idea of AI-assisted application development really hits home in low-code environments where many of the lower-level coding features are abstracted out," he said.

AI also can help with process development and discovery with automatic suggestions for workflows and process steps. It might also be helpful for script-type operations such as data cleansing and other tasks where the goal is to pipeline information, rather than build apps from scratch.

"There's definitely a future for AI-assisted app development, [but] there are also some significant hurdles to make sure that it doesn't develop the same reputation as autocorrect," Schmelzer said.

Dig Deeper on Software design and development

Cloud Computing
App Architecture
ITOperations
TheServerSide.com
SearchAWS
Close