Coming Soon: Autocomplete For Programmers

DARPA wants to find a way to avoid writing the same code over and over.

Technology often seems to anticipate our needs: your phone offers to complete your words before you’ve finished typing it, for example, or Google tries to figure out what you want to search for after just a word or two. It’s great if you’re writing sentences, but what if you’re writing code? An $11 million project at Rice University, sponsored by the Defense Advanced Research Projects Agency, wants to help software developers by providing “autocomplete” features for programming.

Dubbed PLINY, after the Roman natural philosopher and encyclopedia pioneer, the project’s aim is to catalog the corpus of open-source code available online and use it to build a database that can help anticipate the needs of software writers. Thus, when a programmer starts writing code that’s been written by perhaps hundreds or thousands of people before—a sorting algorithm, for example, or code that connects to a database—PLINY can search its database and find appropriate code, even adapting it to fit the correct programming language and methodology by scanning the programmer’s existing project. The system will even provide a variety of suggested options, in case the programmer doesn’t like the first proposed solution.

“We envision a system where the programmer writes a few of lines of code, hits a button and the rest of the code appears. And not only that, the rest of the code should work seamlessly with the code that’s already been written,” Swarat Chaudhuri, a computer scientist at Rice University and one of the principal investigators on the project, said in the press release.

PLINY could certainly speed up the development of code, which, as Chaudhuri points out, is still written largely by hand. And it could provide more seamless integration of open-source packages that programmers often use in their projects, potentially helping avoid bugs and security vulnerabilities through the use of its code analysis and adaptation.

Keep in mind that PLINY won’t have access to every piece of code ever created. Since it’s limited to open-source code, it won’t be able to build from proprietary software created by tech companies like Apple, Google, Microsoft, and so on. But many of those companies themselves rely upon open-source code, and this could help improve and speed the development of those key underlying projects.

And, of course, à la autocorrect on our phones, it could provide plenty of new opportunities for hilarious malapropisms.