For the vast majority of humans, writing code is akin to learning a new language – but researchers from Intel and MIT are on a mission to change that. And the solution they are coming up with is to build code… that can code.
Called machine programming, the field that the researchers are looking at is concerned with automating software development. And the team has just revealed a new tool that takes developers one step closer to the prospect of, one day, having machines that can program themselves.
- Coronavirus: From startups to supercomputers, how tech is trying to help tackle COVID-19
- Programming language Julia: Version 1.4 is even faster and brings these new features
- Visual Studio 2019: Now IntelliSense linter for C++ programming language cleans up code
- Hackathons: Best practices and winning strategies (ZDNet YouTube)
- The Best Web Hosting Providers (CNET)
- How to get a developer job (TechRepublic)
MISIM (Machine Inferred code Similarity), the new technology invented by Intel and MIT’s labs, effectively studies snippets of code to understand what a piece of software intends to do. The system can then build a database in which software codes that have similar outcomes are given similarity scores.
Based on this catalog of pre-existing code, MISIM can understand the intent behind a new algorithm, and help engineers working on software by suggesting other ways to program, or offering corrections and options to make the code more efficient.
For now, Intel plans to use the tool internally, to assist developers with mundane tasks such as debugging, which is currently believed to take up to half of programmers’ time. It is no surprise, therefore, that the company expects huge amounts of developer excitement as MISIM starts being deployed.
Ryan Marcus, scientist at Intel Labs, told ZDNet: “Our goal with MISIM is to aid developers with nitty-gritty choices like ‘what is the most efficient way to use this API’ or ‘how can I correctly validate this input’. This should give engineers a lot more time to focus on the elements of their job that actually create a real-world impact.”
Known as a “code similarity system”, the principle that underpins MISIM is not new: technologies that try to determine whether a piece of code is similar to another one already exist, and are widely used by developers to gain insights from other existing programs.
Facebook, for instance, uses a code recommendation system called Aroma, which, much like auto-text, recommends extensions for a snippet of code already written by engineers – based on the assumption that programmers often write code that is similar to that which has already been written.
But most existing systems focus on how code is written in order to establish similarities with other programs. MISIM, on the other hand, looks at what a snippet of code intends to do, regardless of the way it is designed. This means that even if different languages, data structures and algorithms are used to perform the same computation, MISIM can still establish similarity.
The tool uses a new technology called context-aware semantic structure (CASS), which lets MISIM interpret code at a higher level – not just a program’s structure, but also its intent. When it is presented with code, the algorithm translates it in a form that represents what the software does, rather than how it is written; MISIM then compares the outcome it has found for the code to that of millions of other programs taken from online repositories.
Once it has established links to other snippets of codes, MISIM can act as a recommendation system for engineers, by suggesting alternative ways to perform the same computation, which might be faster and more efficient.
Justin Gottschlich, the lead for Intel’s machine programming research team, told ZDNet that as software development becomes ever-more complex, MISIM could have a great impact on productivity.
“The rate at which we’re introducing senior developers is not on track to match the pace at which we’re introducing new chip architectures and software complexity,” he said. “With today’s heterogeneous hardware – CPUs, GPUs, FPGAs, ASICs, neuromorphic and, soon, quantum chips – it will become difficult, perhaps impossible, to find developers who can correctly, efficiently, and securely program across all of that hardware.”
But the long-term goal of machine programming goes even further than assisting software development as it stands today. After all, if a technology can assess intent and come up with relevant snippets of code in response, it doesn’t seem far-fetched to imagine that the algorithm could one day be used by any member of the general public with a good software idea.
Combined with natural language processing, for example, MISIM could in theory react to verbal clues to one day let people write programs simply by describing them. In other words, an Alexa of sorts, but for software development.
Gottschlich explained that software creation is currently limited to the 27 million people around the world who can code. It is machine programming’s ultimate goal to expand that number and one day, let people express their ideas in some other fashion than code – be it natural language, visual diagrams or even gestures.
Does the idea sign off the role of developers entirely? Not so fast, said Gottschlich. Machine programming will always require some data in the form of code, and professionals to manage the more specialized aspects of programming. The difference, however, is that millions more people will be trying their hand at creating software – generating, if anything, even more work for traditional coders.
“When machine programming is fully realized, we believe it will not eliminate jobs, but instead create them – possibly millions of them,” said Gottschlich.
Automated software development as imagined by the team behind MISIM is still a long way off. But as is the case with many innovations, it is not too early to think of the implications the technology could have, for the better and for the worse.
Intel and MIT’s labs are examining those philosophical and ethical questions at the same time as they are addressing the technical challenges posed by machine programming. Talks are already underway to mitigate the negative usage of the technology – and it’s unlikely that the researchers will run out of topics to debate anytime soon.