Can artificial intelligence be employed to understand the context of computer code and write its own? There have been impressive strides being made in this direction, promising to make the work of developers more productive, and more focused on the business at hand. 

Last year, Intel, in conjunction with the Massachusetts Institute of Technology and Georgia Institute of Technologyannounced the creation of an automated engine designed to learn what a piece of software intends to do by studying the structure of the code and analyzing syntactic differences of other code with similar behaviour. Justin Gottschlich, principal scientist at Intel commented:

“The goal of the effort “is to democratize the creation of software. When fully realized, machine programming will enable everyone to create software by expressing their intention in whatever fashion that’s best for them, whether that’s code, natural language or something else.”

OpenAI GPT-3 (Generative Pre-trained Transformer) also can be employed to automatically generate computer code. Vincent Tabora also commented:

“A development manager could start things off in the project using a tool with GPT-3 features to build the foundation of the application. By this, I mean the skeleton from which the rest of the application will be built upon. The manager can simply type their requirements and the tool will generate what the manager wants. This saves project requirements for additional staff who would otherwise be responsible for building the initial application. After the skeleton has been generated, more advanced developers can come in with the rest of the project requirements to complete the application.”

Along with creating new applications, AI for coding may also smooth the way for moving applications and systems to modern platforms. In a recent interviewMaja Vuković, an IBM Fellow at the company’s Watson Research Center, explained how a client was struggling with millions of lines of code, and her team was able to employ AI to assist in migrating the code to new platforms. She relates:

“Their mission-critical application has ballooned to over 1.5 million lines of code. Decades of adding migrations combining different systems. Moreover, this evolution of the code happened by multiple development teams, some of which moved out to different roles or are not even in the organization anymore. And there may not even be any documentation left.”

It took the company’s IT team more than two years of struggling with the legacy code, with no results, Vuković says.  Not only did AI help the IBM team recommend suitable business-function-driven microservices.

“We can also use AI to help generate code for target microservices, further simplifying the time. It saves time and effort for the developers. It can also tell you where the gaps are, what else needs to be done to make those microservices fully executable. This simplifies and accelerates the entire application refactoring process tremendously — our clients have thousands of applications in their portfolio.”

This demonstration project was for one application with 1.5 million lines of code that took two years to do manually, Vuković emphasizes.

“Imagine if you had to modernize thousands of applications. You want to compress that time from a multi-year effort to something that you can do in months, or weeks.”

Along these lines, IBM launched an initiative called CodeNet intended to facilitate the application of AI to code snippets, she says. Her team is making more than 14 million samples of code available as part of the open-source dataset available on GitHub. The project is intended to provide for code what ImageNet, with its database of 14 million images, provided developers and researchers with identified image.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Nikoleta Yanakieva Editor at DevStyleR International