Metafor: Translating Natural Language to Code
vivin writes "Computer programming is second nature to most of the Slashdot crowd. However, this is not true for the vast majority of people. Formal programming languages are not as expressive or flexible as natural languages. This becomes more evident when we try to translate user requirements into actual code. Researchers at MIT have come up with a program that bridges this gap. It's not so much a tool that turns English into code, as it is a program that translates requirements (in English) to code. When Metafor analyzes English, nouns phrases become objects, verbs become functions, and adjectives become object attributes (or properties). In addition to helping programmers visualize their program better, I think it also promotes writing concise (and therefore) requirements and descriptions. Metafor doesn't handle run-on sentences (or bad English) that well." Update For for the dupe. Not going well. Appreciate all the hate mail. Really encourages improvement.
Well, I doubt something like this would be used to write the next version of Gimp, but I can see its use in helping people to convey what they want a computer to do. Few people need to write programs and I don't know whether I'd want people who don't
understand computers to actually write them. But it would help when someone wants to make something like a 3D scene in Blender. It reminds me a lot of that episode of STTNG (Schizims) where Riker, Troy and Worf are telling the computer to replicate an alien room that they were in.
While this is a cute concept, I don't think you'll be seeing computer programmers disappearing any time soon. The natural language bent was the original point of high level languages. Early languages like COBOL, SNOBOL, and BASIC were all designed to abstract programming to a level of natural language. Save for BASIC's success as a beginner's language, none of them accomplished their goal. In fact, the "natural language" design of COBOL only served to complicate the language and cause a variety of errors due to missing periods, improper spacing, and other common typing mistakes.
;-)
It wasn't long before it was reul languages actually broke away from English and relied more heavily on easily-parsable, special characters to define structure. We can see the results of this in today's C/C++, Java, LISP, PERL (bleh), and Python languages. This new interface does nothing but try to perform some of the structural thinking done by the programmer. (Although I have my doubts as to its current real world ability.)
So the question that then comes to bear is, "Who would use this natural language interface?" Sadly, the answer is most likely "programmers". But why would a programmer use this interface if he has to be trained in computer logic in the first place? It would seem like an unnecessary level of abstraction that would only serve to hinder a programmer's natural abilities.
Of course, there is the documentation issue. Supposedly this interface will be useful for producing requirements in addition to code. But who produces the requirements? Not the programmer. That's usually the job of the business analyst, someone who may not even have experience with coding logic. And for code documentation, nothing quite beats the JavaDoc style documentation that has become popular in the last few years.
I think that research like this is interesting, but I doubt it will have many uses until AI and voice recognition improves to a level similar to that seen in Star Trek. Only about 300 more years and counting.
Javascript + Nintendo DSi = DSiCade
Verbs translated to functions?? Nouns to variables??
int jerk_at_counter, hottie_in_accountancy, dork_at_it;
kill(boss);
send(intern,hell);
Yeah, that will work...
how long until
Now all we need is a tool that will take a user's brain and turn it into solid requirements.
It is quite simple
Haiku should not be funny
Try a Senryu
Forget it being a tool for this crowd then!
I'm about to write a program that stops dupes:
"Don't allow dupes."
There, now I have to decide whether it will be FOSS.
"Make it possible for programmers to write programs in English, and you will find that programmers can not write in English."
t er .html
http://www.murphys-laws.com/murphy/murphy-compu
Yeah, I know my neighbor with an IQ of 7 would rather be writing code that parses XML work orders and turns them into statistical graphs than watching NASCAR. It's just that complicated Java syntax kicks his ass so he's kicking back with a 6 pack of Black Label waiting for this technology to come out.
I'm Rick James with mod points biatch!
I don't mean to sound pessimistic, but remember who comes up with functional specs; managers. As a consequence, this poor program may well come up with a framework that matches exactly what was requested, but once it's put together, the suits will say "it doesn't do this". When it's pointed out that that wasn't in the spec, the inevitable response will be "but it was implied; it should be obvious that we'd need it to do that." This is just a core dump waiting to happen.
Computer programming is second nature to most of the Slashdot crowd.
Maybe back in 1998, but haughty sniping is second nature to most of the Slashdot crowd now.
I wish that people spoke mathematically rather than poor and ambiguous languages that can now (supposedly) turn into (ambiguous) code. Can one really rely on translated 'code' like this. That's like sending an E-mail from speech-to-text recognition without proof-reading.
My Linux - (L)ove (I)s (N)ever (U)tterly eXPensive
How hard is it to change rules of treating the sentences? Can Metaphor learn Chinese, for example?
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
From Dijkstra's timeless "How do we tell truths that might hurt?":
Projects promoting programming in "natural language" are intrinsically doomed to fail.
He said that 30 years ago. People still don't listen.
A message from the system administrator: 'I've upped my priority. Now up yours.'
waiting...
waiting...
waiting...
Stupid computer doesn't do anything I tell it
Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
What truth?
There is no dupe
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
While the logic of the researchers' interpreter tackles only about 20 percent of the problem of full natural language programming, it achieves about 80 percent of the perceived rewards.
Ah, this old thing again.
The hard part about programming isn't turning basic English text in to half-assed code. If it were, then Google have built their company on just-out-of-college scripters and Visual Basic.
[Liu says] "Many subjects immediately identified the simplistic interpretation of the interpreter, and wanted the opportunity to rephrase their original wording to fix the error."
Yes, regular English is insufficient for programming. If a tool like this becomes popular, you'll need still need a special class of people to figure out what is needed and to figure out how to phrase the desire in the precise way that makes this guy's interpreter actually do what they want.
In other words, he hasn't invented a way to eliminate programming or programmers. He's figured out a way to make a programming language that is slightly easier to learn at first. But because it's removed from what computers actually do, much harder to use for anything serious. The hard part about programming isn't the month you spend learning Java syntax, it's the many years you spend learning to write code well.
Their theory appears to be that this will make programming easier to learn. I wish them the best of luck in that goal, but having seen over the years a number of graphical and natural-language programming tools vanish without a trace, I'm not holding my breath.
Javascript + Nintendo DSi = DSiCade
Firstly, people for whom programming is too complicated should not code at all. We need less programmers building better code, not more programmers adding to the crap heap that the software legacy is as of today.
Secondly, I think that what is needed is the other way around : automated analysis of code and production of natural language reports that designers could browse more easily than the code itself looking for bugs or designing extensions and additionnal feature. They would then intervene directly on the code itself.
Sort of a souped up version of Knuth's literate programming, only with a much more radical transformation of the code for its vizualisation, bringing up the essential and critical aspects.
Think of how a reasonably complicated mathematical proof, say within the formal set theory, would look like in a math paper or book meant to be read. Compare with how it would be coded in a theorem prover. Different. Yet the former can be automatically generated from the later.
No fears, he's issued an update:
Update For for the dupe. Not going well. Appreciate all the hate mail. Really encourages improvement.
Nice. Someone should go to customer service 101 and grow up a little. Yelling at the people who (indirectly) line your wallet. Not a good idea....
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
Update For for the dupe. Not going well. Appreciate all the hate mail. Really encourages improvement.
Ah, yes! Duping words next to each other, that is the new fad. Because duping articles is so yesterday's news
Open Source Java Web Forum with LDAP authentication
I've never been one to complain about dupes. I figure I already get way more than I pay for from this site (which is zero). But if people are frustrated about dupes, maybe it's because it's an exceedingly simple problem to solve, and the Slashdot editors give every appearance of not bothering to lift a finger to solve it.
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
To actually add content to my content:
How terribly difficult would it be to add a url checker. I can understand a dupe when its an article written differently by two publications, but a simple URL checker can state "this url was used in store XYZ [with link]," so the editor can determine if its a dupe story or just a url used in two different stories...
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
When a Harvard natural language parser was given the phrase "Time flies like an arrow," in the 1960s it identified the following five parse trees in reponse.
1) Time proceeds as quickly as an arrow proceeds.
2) Measure the speed of flies in the same way that you measure the speed of an arrow.
3) Measure the speed of flies in the same way that an arrow measures the speed of flies.
4) Measure the speed of flies that resemble an arrow.
5) Flies of a particular kind, i.e. time-flies, are fond of an arrow.
I would guess the source code for those five different interpretations would be, well, different. (The fifth one is my favorite.)
Education is the silver bullet.
Update For for the dupe. Not going well. Appreciate all the hate mail. Really encourages improvement.
/. years ago.
Taco, you asshole, you've been duping stories for years. You've known about them and yet you've done nothing to fix the problem. Don't pull this sentimental BS about not "encouraging" improvement. If the fact that if Slashdot is your creation, and is your job, isn't enough "encouragement" for you to fix the problem of dupes, I don't think anything will be. From all appearances, it looks like you've given up on
-------
"Every artist is a cannibal, every poet is a thief."
I like how he duped the word "for" in his comment: Update for for the dupe.
"No one likes working in a hamster wheel, and your shop smells of cedar shavings from here." - TaleSpinner
Update For for the dupe. Not going well. Appreciate all the hate mail. Really encourages improvement.
Is he drunk or something (For for??) At least we know he reads the hate mail, so send more. Ignoring stupid avoidable fuckups certainly doesn't work.
They can either
1) implement a simple function that compares the main words in the article with recent ones, particularly URLs (ignoring some obvious generic ones, like the home page of newspapers). (For extra credit, spellcheck the fucking thing, and check that any URLS exist.)
2)Read the mail that comes in from subscribers telling them they've duped (apparetly that's mostly ignored; when I send it in it often bounces, some editora apparently have invalid forwardnig addresses)
3)Or use their own brains and just type one relevant word into the Slashdot search box:
Search 'metafor'
Metafor: Translating Natural Language to Code
On March 30th, 2005 with 170 comments
vivin writes "Computer programming is second nature to most of the Slashdot crowd. However, this is not true for the vast majority of people. Formal...
English To Code Converter
On March 26th, 2005 with 52 comments
prostoalex writes "Metafor from MIT is a code visualization utility, capable of converting high-level descriptions into class and function (or method...
"Update For for the dupe. Not going well. Appreciate all the hate mail. Really encourages improvement."
/. anymore, and wouldn't be familiar with what's been posted).
At LWE in January, 2001, at a conference on Slashcode, someone asked us at Newsforge how our site had so few dupes compared to Slashdot. There were two reasons:
1) We had a smaller audience of people to see the dupes we did accidently post.
2) We searched our archives before posting any story. We searched by story URL, by story keyword. We also generally skimmed the site when we weren't working to be aware of what was being posted.
Clearly, #1 is something Slashdot doesn't have working in its immediate favour, but #2 is something that shouldn't be too hard. Zonk, Timothy, Cliff, Simonker, etc, don't post dupes nearly as frequently as CmdrTaco. Hemos doesn't post often, but he also seems to be pretty dupey (understandable as he's not really associated with
The worst example is something like the PSP dupe story: Taco didn't even check out the games section, which had that story right at the top! A simple search for "PSP" and "Browser" would've shown it even if he never reads sections.
CmdrTaco doesn't read his own site. What does this tell you about how he feels about it?
I don't read Kuro5hin much anymore for the same reason. Complaining about dupes will just drive him further away, even though he still has to work on it by contract.
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
It really bugs me that /. editors treat dupes as a sort of charming fact of life, as if dupes are among those imperfections that make life worth living. Dupes suck, if for no other reason, because they fork discussion, confuse the archive and make searches less precise.
/. crowd is able to code by second nature. How f-ing hard is it to have a dupe checker (even a simple on like what FortKnox is proposing). Why is it that a website that proclaims itself the bastion of all things FOSS has languished in mediocrity while thousands of competent coders are practically begging to write this feature into the site's backend? Of course, nothing will come of this, except more shoulder-shrugging and gee whiz, golly nonsense. I'm not trying to flame, but this sort of unprofessional, "friendly fuckup" attitude is what holds the public image of FOSS back.
It's especially annoying when the dupe article proclaims that the
> How terribly difficult would it be to add a url checker
These are paid editors who can't be bothered to read their own website. The problem is not technological, and doesn't require a technological fix.
I am no longer wasting my time with slashdot