Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Technology

The State of Natural Language Programming 387

gManZboy writes "Brad Meyers (and co) of the Human Computer Interaction Institute at Carnegie Mellon have written an interesting paper about the state of natural language programming. They point out that well understood HCI principles aren't finding their way into relatively new languages like Java and C#."
This discussion has been archived. No new comments can be posted.

The State of Natural Language Programming

Comments Filter:
  • by Camel Pilot ( 78781 ) on Tuesday November 16, 2004 @02:40PM (#10833150) Homepage Journal
    That was assessment also.

    However i did visit alice.org. I clicked on gallery and found no way to navigate back!

    Seems kinda of odd that a site dedicated to "natural programming" concepts would not take the time to employ "natural navigation". Hmmmmm.

  • by TheUnFounded ( 731123 ) on Tuesday November 16, 2004 @02:42PM (#10833164)
    Write a Natural Language Compiler and you'll find that programmers can't write in a Natural Language. Can you imagine what would happen when you have to understand, not the flow of the code, not the overall process of the application(s), but HOW the writer was THINKING when they wrote the code? I've worked on a couple interesting projects where the programmers originally were involved in the physical business process, and eventually ended up coding (don't ask). When I had to edit their code, there was NO way of understanding it unless you actually talked to them and realized how they were thinking about the problem. It's not that the code was so poor, but they wrote code based on how they'd seen the business operate, and that just didn't translate nicely into straightforward code.

    Personally, I don't see how creating a language that encourages this behaviour can be a good thing. Isn't this the point of learned programmers? The ability to translate real world situations into easy to understand processes? Then again, I'm no language development guru. :)
  • by Anonymous Coward on Tuesday November 16, 2004 @02:48PM (#10833262)
    I know that, being trained and experienced in traditional programming languages I am somewhat biased, but I don't quite see the point. We don't use natural language in other technical disciplines. There's no natural language math, physics, law, or biology.
  • Re:How about this? (Score:2, Interesting)

    by mmkkbb ( 816035 ) on Tuesday November 16, 2004 @02:49PM (#10833278) Homepage Journal
    How about an answer from someone more well-acquainted with basic human desires [everything2.com]?
  • Re:I don't buy it. (Score:5, Interesting)

    by Bastian ( 66383 ) on Tuesday November 16, 2004 @02:56PM (#10833374)
    One thing that I have noticed about any debate about what programming facilities will most help programmers to write more bug-free code or spend less time debugging is that the debate is based entirely around anecdote.

    I would love to see some numbers on the frequency and nature of bugs in software, and I want to see these numbers broken up by language as well as by appliction domain. I suspect that a comprehensive collection of such statistics doesn't exist, since I haven't seen any empirical data enter into the various debates to which they would apply.

    Until someone spends some more time researching this information, I doubt that the development of programmign technology will advance in a fashion any more directed or smooth than science and technology did back in the fourteenth century.
  • by ensignyu ( 417022 ) on Tuesday November 16, 2004 @02:59PM (#10833405)
    It might be a little rigid, but not necessarily that bad. HyperTalk goes:
    put the sum of var1 and var2 into varX

    or:
    set varX to the sum of var1 and var2

    or:
    add var1 and var2
    put the result into varX
  • by jellomizer ( 103300 ) * on Tuesday November 16, 2004 @03:03PM (#10833451)
    It Would be nice to send out the specs for the program and run it threw the parser and get the program you want but the truth is that normal Human Language wasn't designed for problemsolving espectilly in some of the details that programming requires. Things like nested Lists. (1,2,3,(2,4,3,2),5,2,(2,3,5,6)) Which are easy to learn to program and install are much harder with natural language.

    Make a List with the values 1, 2, 3, then this is a list of 2,4,3,2, now we are back in the first list with some more values of 5 then 2, now we get an other list inside this list as 2,3,5,6 Now we finish both list.

    As you see in english this is clumzy I am sure someone with a better master of english may be able to make it a little more percise but still just giving up and using the () makes it a lot easier to see and understand then using a bunch of words.

    Most human languages were made Thousands of years ago. And came from languages 10s of thousands of years old if not Millions of years old. They were not designed for micro processing of infromation. They were required for more common sience reasioning. Which we as humans often fail a lot at and imagin how poor a computer would be a common sience.
  • by javaxman ( 705658 ) on Tuesday November 16, 2004 @03:27PM (#10833767) Journal
    Dude, I have news for you, AppleScript is still a bit of a train wreck [apple.com].

    Not that it's not powerful and fairly easy to use ( you can do a *lot* of fairly amazing stuff with AppleScript that can't really be done otherwise ), but it is _not_ as straightforward as it should be... doing something relatively simple, like string manipulation, just isn't easy. How do you take a path name and add a few characters to it? It's kinda hard to figure out.

    Of course, you could blame some of AppleScripts' difficulty-of-use on the unstructured, somewhat here-and-there nature of Apple's documentation of AppleScript, such as the ton of useful, important stuff that appears only in an "AppleScript Additions" PDF ( unlike *any* other AppleScript documentation ).

    Something that really jumped out at me from the article is the notion that what's "natural" is defined very specifically by the problem area. Which makes sense... but doesn't lend itself well to general-purpose programming environments. Like some other poster said, oh god, COBOL... general purpose programming environments are going to require constructs and data structures which are well, general, flexible, and thus maybe not "natural" for some problems.

    Big deal. If you have a specific problem area, what do you do as a programmer? You write a set of APIs that are specific to that problem area, then use them again and again. You write those APIs in your general purpose programming language and go from there. These folks are trying to solve a problem that isn't as helpful to solve as they think, IMHO. Learning one language and several libraries of APIs is more useful to me than learning several different languages.

  • Re:Applescript (Score:5, Interesting)

    by MoneyT ( 548795 ) on Tuesday November 16, 2004 @03:30PM (#10833804) Journal
    Probably because it's too obvious. I ran into that problem a few months ago. Version 6 of matlab for OS X had a unique problem in that one needed to start X11 and then start Matlab before it could be run, there wasn't a single command to do both. Of course, this lead to confusion on the part of our users, and so the simple and obvious solution would be to write an apple script to do it. That was the easy part:
    tell Finder to open application X11
    tell Finder to open application MatLab
    The problem was, in the way that Matlab was setup, the helper app used to launch MatLab in the X11 environment never truely opens (it bounces in the dock for a while and then goes away having begun the true MatLab startup. The end result of this was that since Apple Script was not being notified that the application had finished opening, it was recieving an error that startup had failed and kept retrying the start. This resulted in an infinate loop of MatLab window creation.

    The solution of course was to tell Apple Script that regardless of what hapens, just issue the open application command and stop caring. I spent a good hour or so digging through documentation until I finaly found how to do this, and the answer is so blaringly obvious that it makes one feel stupid when they realize they should have known it all along:
    ignoring all errors
    tell Finder to open application MatLab
    That's it.
  • by Blakey Rat ( 99501 ) on Tuesday November 16, 2004 @04:36PM (#10834768)
    I'd love to see a Hypertalk-like language come back from the deadly. Applescript is *close*, but not quite there, and Hypertalk seems to be a very obvious no-brainer choice for visual programming.

    Is it slow? Yeah, it's slow... no doubt. What you'd do is put the power in the methods of the objects, and just let Hypertalk tie the objects together. (For instance, Hypertalk might be too slow to negotiate a fast FTP download, but it's certainly fast enough to contain a statement like "if startDownload is true then tell ftpSocket to start download and place the result at global downloadLocation"
  • by faragon ( 789704 ) on Tuesday November 16, 2004 @04:54PM (#10835057) Homepage
    To compare the natural language (Noam Chomsky tells that it is universal for every human language) with any programming language it is quite non-sense: programming languages tends to unambiguation, to be context free and deterministic. It's quite similar to compare an image versus a verbal description of it: the image it is finite and unambiguous, while the verbal description only can be arbitrary.

    I understand that the point of this thread is to find a way to remove or to light some "translation" between the "human idea" and the "human computerized/programmed solution". For me, as the years go by, C/C++ is another language built-in myself. I can convert problems into solvable ones via computing, quite on the fly (still planning and designing the solution, but the implementation itself comes in a natural way, like the water that falls down a river).
  • by TheRagingTowel ( 724266 ) on Tuesday November 16, 2004 @06:46PM (#10836480) Homepage
    Heck, that'll make a great quote... btw, a corollary - "a computer almost never do what you want it to do, but always do what you tell it to do"

Lots of folks confuse bad management with destiny. -- Frank Hubbard

Working...