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
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
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.
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!
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.
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....
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."
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...
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