Technology Review - Published By MIT
Advertisement

77 Mass Ave.

Continued from page 2

By MIT News Staff

July 2005

smaller text tool iconmedium text tool iconlarger text tool icon

Speaking the Same Language
A Media Lab project makes programming more natural
By Lisa Scanlon

Hugo liu '01, Mng '02, a doctoral candidate at the Media Lab, remembers a particularly grueling introductory programming class he took as an undergrad: it was "pretty hellish," he recalls. This was partly because programming languages, he says, are "rigid and unaccommodating to people's natural input." Liu, who is interested in cognitive linguistics, wondered whether he could make programming more intuitive by having a computer derive code directly from natural language. The result was an interface, called Metafor, that translates English sentences into fragments of code. For example, noun phrases are interpreted as program objects, and verbs are interpreted as functions. Although Metafor doesn't produce complete programs, it can be used as a brainstorming tool to teach students how to write better code and to help programmers outline large projects, Liu says.

To use Metafor, programmers simply type in sentences--such as "Pac-Man is a character who loves to run through a maze and eat dots"--that describe the programs they want to write. Metafor parses the sentences into verbs, subjects, and objects and then translates those pieces into series of properties, functions, and if-then rules. By seeing how their sentences translate into code, students learn how to rephrase their statements to result in more-efficient programs, Liu says. In a paper he presented earlier this year, Liu described how Metafor could help beginning and intermediate programmers code faster.

Comments

  • how to inprove skill and company
    please tell me the mistake in the game,how to correct it. footwork,poise,top line,music,et. make friends with me. i love freedom live and imaging mind in the ballroom dance. my web is www.seehaha.com/who/4278 , my email: xiaqing1964@hotmail.com my home phone:08602558818439 warm welcome may be you shall tour round china ,i can help you.
    Rate this comment: 12345
    Guest (xiaqing)
    05/07/2006
    Posts:1

Log In

Forgot your password?     Register »
Advertisement

Videos

Laser-Triggered Chemical Reactions
Advertisement
Advertisement
Advertisement
Subscribe to Technology Review's daily e-mail update. Enter your e-mail address

TECHNOLOGY RESOURCES

More Technology News from Forbes

Advertisement
MIT Massachusetts Institute of Technology © 2009 Technology Review. All Rights Reserved.