With Apple’s Siri and other voice-recognition software becoming commonplace, you might take it for granted that we can now talk to computers. But as dependable as these systems have become, you will not get them to do anything that they are not already programmed to do. But Regina Barzilay and colleagues at the Massachusetts Institute of Technology have talked a computer into writing new software.
Their system takes a task described in natural language and automatically generates the computer code to carry it out – an important first step toward allowing people who are not familiar with computer code to program computers. “It won’t replace the need for programmers, but it can help with specific programming tasks,” says Barzilay.
The team focused on a common problem – writing software that reads the input given to a computer. By generating this code automatically, programmers are freed up to write the parts of software that require more creativity.
Code that checks input is at the heart of web forms, spreadsheets and databases. The challenge is to specify what kind of input is allowed. When you log in to a website, for example, software code checks that what you type matches the required format for a password or email address. An email address must consist of letters and/or digits, then an @ symbol, more letters and/or digits, and end with “.com” or “.co.uk” or similar.