Slashdot Mirror


The State of Natural Language Programming

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

387 comments

  1. Proposal by Anonymous Coward · · Score: 5, Funny

    If
    Natural Language is not making its way into Programming
    Then
    Programming should make its way into Natural Language
    Else
    Continue

    1. Re:Proposal by azav · · Score: 1

      I LOVE Director's Lingo and the "verbose" syntax.

      Why? It takes no thought to figure out what is going on when you eyeball the following line of code:

      myColor = the color of myObject

      adding some programming styles gives you:

      myColor = the pColor of gGameObject

      easy to eyeball = what you see just makes sense easier and more naturally. No semicolons. The line ends when you press return unless you tell it otherwise. No brackety weirdness or "When do I use a { ??" These issues may not be an issue to you BUT they do not flow naturally for many and thus get in the waqy of actually getting the programming done untill/if the programmer gets used to them.

      I WOULD use C++, Java, Javascript, etc..., IF I could get used to the darn syntax. Too much of the syntax (with natural exceptions of course) just feels to unnatural and cumbersome to get work done easily and effieicntly.

      : [

      --
      - Zav - Imagine a Beowulf cluster of insensitive clods...
    2. Re:Proposal by Anonymous Coward · · Score: 0

      It takes no thought to figure out what is going on when you eyeball the following line of code:

      myColor = the color of myObject


      It takes no thought to figure out what's going on in "myColor = myObject.color", either. Except for those pointless and patronising "my" prefixes, of course. (My hatred for the 'my' keyword is one reason why I never use Perl by choice.)

      The line ends when you press return unless you tell it otherwise.

      That's supposed to be a good
      thing?

      Oops, syntax error after "good".

      This is one case where the C way is closer to natural language. Ever notice how natural language permits line breaks wherever you like, but each sentence ends with a punctuation mark?

  2. Other languages... by 10100 · · Score: 1

    Maybe I didn't RTFA closely enough, but what about languages like Python, C++, or Perl? It seems that most developers are more likely to use these (at least the ones I know).

    1. Re:Other languages... by jilles · · Score: 1

      I think that is the problem they are trying to address.

      --

      Jilles
    2. Re:Other languages... by 10100 · · Score: 1

      Good point...thanks.

    3. Re:Other languages... by Anonymous Coward · · Score: 0

      You're saying C++ and Perl are examples of natural language programming??

      Maybe if you speak in 13375|*43| all the time.

    4. Re:Other languages... by Anonymous Coward · · Score: 0

      Or maybe you haven't been exposed to natural language enough to understand what he's saying.

  3. the only code that matters... by bgeek · · Score: 0, Offtopic

    10 print "slashdot rocks" 20 goto 10

  4. Doesn't seem to say much. by BigZaphod · · Score: 2, Funny

    The article seems like some kind of summary. Unless I missed something important, like, a second page or something. But basically, it seems to suggest that, even after all these years, we still aren't any closer to having a natural way to program. Huh.

    1. Re:Doesn't seem to say much. by Camel+Pilot · · Score: 2, Interesting

      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.

    2. Re:Doesn't seem to say much. by MORB · · Score: 1

      Well, it *is* natural navigation. In real life there's no back button that takes you back in time.

    3. Re:Doesn't seem to say much. by fossa · · Score: 1

      Your browser probably has a back button, yes? A duplication of the functionality of this button will waste your time as you decide whether to use the browser's back button or in-page navigation. Of course, you're now so familiar with in-page navigation (probably because browser navigation is lacking), and waste even more time wondering why in-page navagation isn't there. AHHHHHHHHHH!

  5. Programming in english sucks anyway by Qzukk · · Score: 4, Insightful

    Inevitably you end up with an artificially rigid language structure that sounds like something that nobody would EVER say. Perfectly easy to read, after all, who wouldn't understand what "ADD VAR1 TO VAR2 GIVING VARX", but who the hell would use the word "giving" in such a way. It's a nightmare to learn or write, at least for English-speaking people who would have to constantly fight years of learning to speak real English to make up for the fake english in the language.

    --
    If I have been able to see further than others, it is because I bought a pair of binoculars.
    1. Re:Programming in english sucks anyway by Anonymous Coward · · Score: 4, Insightful

      Witness--why everyone hates legalese in EULA's. Achieving unambiguous precision with English is HARD.

    2. Re:Programming in english sucks anyway by rewt66 · · Score: 2, Insightful

      You mean like Cobol?

    3. Re:Programming in english sucks anyway by ensignyu · · Score: 2, Interesting

      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

    4. Re:Programming in english sucks anyway by Cro+Magnon · · Score: 1

      Looks good to me. Maybe I've been using COBOL too long.

      --
      Slow down, cowboy! It has been 4 hours since you last posted. You must wait another few hours.
    5. Re:Programming in english sucks anyway by prell · · Score: 1

      Once they can make a translator that works, I'm thinking that they could make an NL compiler fairly easily. It would probably require proper grammar, but I think that you could easily rearrange words, split infinitives, etc. It seems to me that the Japanese language would be the easiest to process for tokens: it seems to be a pretty rigidly-structured language.

      I don't know that an NL compiler would be necessarily useful, though. Programming languages are meant to bridge the gap between the human and the computer. I'd imagine that there would be plenty of errors that either resemble classical programming errors, or are completely new; I don't think using NL would necessarily make programming easier. After all, we all misspeak, and unless the compiler is staggeringly intelligent, it won't be able to correct errors for you. NL libraries would be useful though, I imagine, for end-user applications such as speech interpretation. NL for searches may be useful, but I have a very high success rate with Google as it is.

      I'd rather see "Error: undefined symbol near 'fuck you gcc.'" than "I'm doing my best :'(" Poor gcc.

    6. Re:Programming in english sucks anyway by Anonymous+Brave+Guy · · Score: 1
      Perfectly easy to read, after all, who wouldn't understand what "ADD VAR1 TO VAR2 GIVING VARX", but who the hell would use the word "giving" in such a way.

      You're right. I prefer "yielding" myself, or perhaps "motivating" on a light day.

      Then again, on the principle of never using a word where a polysyllabic construct will do, we could employ "entering the result into".

      Then again again, if I may misquote Disraeli, perhaps I'm just inebriated with the exuberance of my own verbosity now.

      Hmm. Friday must be early this week.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    7. Re:Programming in english sucks anyway by Pxtl · · Score: 4, Insightful

      imho, natural language programming languages are awful because they add a tiny bit of verbal legibility in exchange for a) losing nice obvious visual cues like { and } and b) missing something painfully obvious:

      We learn math pretty friggin' soon after learning to spell. And at that point, you never write "one plus one equals two" ever again, if you ever did.

      The fact is that comptur language has a closer relationship mentally to math than to english. So why not use mathematical language? Its even better, as its not tied to a single human language (who wants to translate "plus" into Swahili?)

      IMHO, modern commercial languages do suck for not learning from their more academic peers (Java, I'm looking in your direction - inner classes rock, but they're no excuse for all the missing stuff).

      But for "englishoid" languages, I learned VB first and then Java, and I have to say the first thing I loved about Java was the unambiguous { and } blocking.

      I'm all for using natural english in the parts of programming where it belongs - like flow control, function calls, class definitions, etc. But having unambigous "this is a block" characters helps mental consistency, and using mathematical syntax helps people understand the more mathematical concepts (although the C = as assignment thing is an abomination - := pwns it).

    8. Re:Programming in english sucks anyway by gstoddart · · Score: 1
      You mean like Cobol?


      I believe the author was pointing out that even though COBOL was intended to be readable by non-coders, the sheer verbosity of the language doesn't actually increase readability.

      The whole 'add to' and 'giving' construct is just way too much crap to work with.

      --
      Lost at C:>. Found at C.
    9. Re:Programming in english sucks anyway by truthsearch · · Score: 3, Insightful

      "Real" natural language processing means the computer can interpret what you're trying to say no matter how you say it. As long as grammer is correct, there can be a variety of ways of saying things. NLP tries to be smart at figuring out sentances it's never seen before by learning from past conversations. Of course with the complexity of natural language this is difficult and doesn't always work, but we've learned enough about how to do it that we should already have ways for computers to "understand" more natural instructions.

    10. Re:Programming in english sucks anyway by Jonner · · Score: 1

      This article isn't talking about NLP, it's talking about Natural Programming, which sounds like an entirely different beast. I was fooled at first too.

    11. Re:Programming in english sucks anyway by Blakey+Rat · · Score: 2, Interesting

      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"

    12. Re:Programming in english sucks anyway by shawn(at)fsu · · Score: 1

      Good call, If we chose to go down this path with programming languages what we end up could look very much like legalese. I wonder if programming can make it's way in to language, maybe then those EULA's would be easier to understand.

      This is one of the most insightful AC posts I've read.

      --
      500 dollar reward for tip(s) leading to the arrest of the person(s) who stole my sig.
    13. Re:Programming in english sucks anyway by Raffaello · · Score: 0

      Just a reality check from the 90+ % of humanity that doesn't read and write code daily - '{' and '}' are not "nice obvious visual cues" to most readers - they are line noise. This is why one almost never sees them in prose. In NL, we use paragraphs for block structure, and, more rarely, quotes, parentheses, and indentation (the preferred notation for long quotes, for example).

      Your addition example is a red herring - there's no reason why both versions wouldn't be accepted by a decent NL compiler (i.e., both "3 + 2 + 1" and "three plus two plus one.")

      As for "englishoid" languages, neither VB nor Java are vaguely NL. You want to look at HyperTalk and AppleScript, both from our friends in Cupertino.

    14. Re:Programming in english sucks anyway by squidfood · · Score: 2, Insightful
      And at that point, you never write "one plus one equals two" ever again, if you ever did.

      This is true for primatives.

      But for even slightly more complex tasks ("Find all the people who live in New York, and add their votes."), natural language is about as good. As the tasks get more complex, natural language ("Look for your friend in this picture, then see who's standing next to him.") quickly describes things that are formal language headaches.

    15. Re:Programming in english sucks anyway by wmshub · · Score: 5, Informative

      Did you two (the parent & grandparent of this) really read the article? It's not about programming in English, it's not about syntax, it's about structure.

      For example, they pointed out that people think about tasks in an event-driven way, their example is "when pac-man is out of lives, the game is over". But they must program by finding where in the program the number of lives goes down, and inserting the code there. An event driven language would simplify.

      Their other example was that most languages make people think in loops, when they really want to operate on a group. Saying "for (i = 0; i len; ++i) { x[i] += 10; }" it a really clumsy way to express what people thought, which was "add 10 to everything in x".

      Anyway, I agree that parts of the article don't sound too helpful, but they aren't talking about writing in English; they're talking about changing the structure of languages to more closely match what people think.

    16. Re:Programming in english sucks anyway by lakeland · · Score: 1

      Which is of course why it isn't done that way (any more). I was shown a demo of a NL project a few _years_ ago (and it was nearing the end of the project then, so no doubt there are better things now). Anyway, in the demo you write in natural english and a seperate version in the awkward syntax you just described turns up in the bottom half of the screen, much like a chat window. See, most people can read that syntax, they just can't write it.

    17. Re:Programming in english sucks anyway by Oligonicella · · Score: 1

      It's not the only way one can phrase it.

    18. Re:Programming in english sucks anyway by Anonymous Coward · · Score: 0

      The fact is that comptur language has a closer relationship mentally to math than to english

      Good for you huh? ;) j/k

    19. Re:Programming in english sucks anyway by truthsearch · · Score: 1

      I was thinking that while a compiler needs to be completely predictable, it might be flexible enough to understand a limited set of our natural languages. I realize they weren't strictly speaking about NLP, but it might relate.

    20. Re:Programming in english sucks anyway by Hanji · · Score: 1

      You want to look at HyperTalk and AppleScript, both from our friends in Cupertino.


      Virtually every single programmer I know of who has ever had to work with AppleScript hates it with a passion. The best any of us can say is that the functionality it provides is awesome for controlling other apps, but that we've never managed to write an AS script longer than 5 lines without resorting to modifying an existing example elsewhere.
      --
      A Minesweeper clone that doesn't suck
    21. Re:Programming in english sucks anyway by Anonym0us+Cow+Herd · · Score: 1

      I've used both HyperTalk and AppleScript.

      The languages are artificially rigid. They are read-only. The simplest things you want to write require you to consult documentation on the proper syntax. What property is available, etc. Your natural english tendancy leads you to frequently want to use the wrong syntax or property name. It has been a very long time now, but I seem to recall... you must understand detailed rules to properly choose whether to use a construction such as "the FooBar" or "FooBar of Baz". (Remember, it has been a long time, I'm just repeating how I vaguely remember my experience with both languages of long ago.)

      Once written, the code reads (mostly) like natural english. But at what cost to write!

      Now, I very much take the position that code should be written to be read, and that readability is more important than the effort to write it readably. You only have to write it once. But that code, in its lifetime will be read many times.

      That said, the typical punctuation and syntax of non-english-programming languages are much more readable (and writable) for anyone who can understand and maintain the program. If someone cannot alter the program, then is it that important that they can read it and loosly follow it? Even well written non-english-like code can be readable by a non-programmer.

      --
      The price of freedom is eternal litigation.
    22. Re:Programming in english sucks anyway by SlowMovingTarget · · Score: 1
      An event driven language would simplify.

      State machines aren't easier, they're just different.

    23. Re:Programming in english sucks anyway by Just+Some+Guy · · Score: 1
      Their other example was that most languages make people think in loops, when they really want to operate on a group.

      There's a pretty strong reason for that, though: computers themselves operate in loops. With the exception of specialized vector operations, most computer code involves repeating an operation across a list of values or executing a list of commands. It's sometimes convenient to think of abstractions that don't directly correspond to iterating across lists, but their probably implemented that way at the lowest levels anyway.

      For example, in Python you could implement your operation like so:

      x = [value + 10 for value in x]
      which creates a new list of all the values in x with 10 added to them. The dangerous part is that new programmers see non-obviously-looping structures and think that by using them instead of explicit loops they're writing faster code. After all, my example is one single instruction, right?

      Adding that kind of expressiveness to a language is useful, but primarily for people who already know how computers work. To the uninitiated, it represents a leaky abstraction that can cause unexpected operation.

      I guess I'm old-school, but I truly think new programmers would be better off learning a very low-level language to gain an understanding of the logic structures before they migrate to higher level systems. If you don't know how the silicon works, then it's going to be very difficult to design algorithms that execute efficiently on it.

      --
      Dewey, what part of this looks like authorities should be involved?
    24. Re:Programming in english sucks anyway by Anonymous Coward · · Score: 0

      It seems to me that the Japanese language would be the easiest to process for tokens: it seems to be a pretty rigidly-structured language.

      Spoken like someone who knows no Japanese. FYI, Japanese is no more logical or rigidly structured than English. In fact, parsing Japanese correctly requires more reference to context than parsing English correctly - and context is the thing computers are WORST at.

      You should be able to figure that out by yourself by comparing the results of modern machine translation from Japanese to machine translation from a European language. If Japanese were easier to parse than European languages, you would expect to get more accurate results. In fact, you get less accurate results. This is not because the people who write Japanese translation software are less competent than the people who write French translation software - it's because the problem is harder.

    25. Re:Programming in english sucks anyway by CanadianCrackPot · · Score: 1

      So legalese is a resounding failure right?

      --
      Good programmers drink beer to relieve job stress.
      Great programmers drink hard liquor and work best hungover.
    26. Re:Programming in english sucks anyway by Anonymous Coward · · Score: 0

      You misunderstand the purpose of legalese. Like any jargon a large part of its purpose is to create an artificial barrier to entry for the uninitiated. A EULA written in plain english can be both precise and clear.

    27. Re:Programming in english sucks anyway by Anonymous Coward · · Score: 0

      The fact is that comptur language has a closer relationship mentally to math than to english.

      It's not just that; the Curry-Howard isomorphism tells us that types in computer languages correspond directly to mathematical proofs. There are languages like lambda calculus that are amazingly compact yet still Turing-complete; using them really makes one realize how closely math and computer science are tied.

    28. Re:Programming in english sucks anyway by StikyPad · · Score: 1

      The thing is, the computer inherently requires that the concepts be broken down into primitive tasks. If you've created a program that can understand "Find my friend in the picture, then see who's standing next to him," you've got artificial intelligence on your hands and you, my friend, are a wealthy person*.

      *Provided a large government or commercial entity doesn't a) steal your idea, or b) kill you for it.

    29. Re:Programming in english sucks anyway by Jonner · · Score: 1

      Unfortunately, the article didn't really reveal any details. There may be connections between Natural Programming and Natural Language Processing. I need to try the Alice thing to see what it's like.

    30. Re:Programming in english sucks anyway by Anonymous Coward · · Score: 0
      Lost: Pet sig. Insightful yet humorous. If found, call 555-5555.

      Here it is, I think:
      "...and what's the deal with those black boxes anyway? I mean, why don't they make the whole plane out of 'em?"

      Is that the one?

    31. Re:Programming in english sucks anyway by Anonymous Coward · · Score: 0

      OH, I don't know. Borland did a good job way back when with the EULA for Delphi 1.

      Courts and lawyers hate simple language that says broad, simple common sensical things.

    32. Re:Programming in english sucks anyway by mcrbids · · Score: 1

      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


      Which could be more rapidly written as
      $varX=$var1+$var2;

      or
      $varX=$var1+$var2;

      or
      $varX=$var1+$var2;

      (Didn't I just make your code more readable by minimizing the permutations to getting something done?)

      Earlier in this thread, I saw somebody mention sheetmusic as a specialized language. Like it or not, a computer is *not* a person. Why try to negotiate with one as though it were?

      It took years to learn to communicate well with other people. It takes substantial effort to learn to read sheetmusic, or algebraic notation,or chemistry formulas.

      Why should computing be any different?

      There are different languages emphasising different approaches to structuring and manipulating data - when faced with a problem, choose languages that will be effective at solving your specific problems and use them!

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    33. Re:Programming in english sucks anyway by Anonymous Coward · · Score: 0

      I think the biggest thing is that programming (and math and other domain-specific languages) are just about "doing". Probably the only human-domain language that is probably equivalent to writing code would be Klingon. Klingon is probably about as direct and un-nuanced as interpreted C.

      Programming is not a very emotive activity (although the developer may commonly have various fits of emotional outpouring during the process).

      If we only wrote First grade-level English, then maybe someone could make a point. But even First Grade-level english is probably more subtle and nuanced than even a very expressive language (i.e., one that has a variety of constructs and keywords that accomplish the same task, er, express the same notion).

      Even when learning a different language, one runs across completely orthogonal ways of expressing the same thing.

      In English, the waiter asks you about your food, and you politely reply, "it's great!" or "I like it".

      In Spanish, it's more along the line of "se mucho gusto!" (it makes me happy).

      In SQL you say, "select * from mytable where id=54". In every other procedural language that doesn't have good hooks down to SQL, it's something like:

      while ((!r.EOF) && (r.id != 54)) {
      r->getrow();
      }

      On the flip side, using a recursive function is pretty natural and relatively cheap computationally compared to what you typically do with SQL and hierarchical datasets, extensions or not.

      Programming languages, being more or less formal languages, will never be "complete", i.e., able to express every possible thing in the world purely with the syntax of the language.

    34. Re:Programming in english sucks anyway by Anonymous Coward · · Score: 0

      Event-driven programming goes only so far. Compare writing database apps in VB to Access. Because Access is so tied to the database concept, it has a pretty rich set of events related to underlying datasets, their states, etc. But not in VB.

      VB is a general-purpose language, but it's not as focused on writing.

      OK, Access and VB maybe not so good for most people. Compare then VB and Delphi. Delphi's databound controls have a VERY rich set of data-related events and handlers (plus, it's easy enough to generate your own events).

      My experiences with PeopleSoft scarred me as well. It seemed like while using familiar concepts, everything had some margin of difference to the rest of my experience set and thus it was very frustrating to deal with what was to me a very obtuse development methodology.

    35. Re:Programming in english sucks anyway by foobsr · · Score: 1

      Achieving unambiguous precision with English is HARD.

      To me, this seems hard in any language, programming languages included.

      IIRC, even the representation of such simple sructure as ALGOL60 in BNF was ambiguous.

      CC.

      --
      TaijiQuan (Huang, 5 loosenings)
  6. Is it any wonder? by Tackhead · · Score: 5, Funny
    > They point out that well understood HCI principles aren't finding their way into relatively new languages like Java and C#."

    Well, duh! That's because if, according to the article...

    > The goal is to make it possible for people to express their ideas in the same way they think about them.

    ...most ideas just don't work that way.

    #include // Do What I Mean

    thingy main (thingy list) { Sort thingy
    No, like this
    With the guy's name on the right
    No, I guess the middle initial deserves its own column. No, I didn't think of that.
    But don't print the middle initial.
    No, not like that.
    Eew, that font sucks.
    Yeah, like that.
    No, like it was before.
    Yeah, no--wait. I gotta talk to my boss.
    He said to do it like this. // wave hands
    But he didnt like it.
    Fuck this, I'll pay some guy in India to do it.
    }

    1. Re:Is it any wonder? by Hortensia+Patel · · Score: 1

      It's a crying shame that this post is already moderated to +5 Funny; it richly deserves an Insightful or three.

    2. Re:Is it any wonder? by foobsr · · Score: 1

      Hmm, once upon a time there was a system ->

      Donald A. Waterman, Allen Newell: PAS-II: An Interactive Task-Free Version of an Automatic Protocol Analysis System. IEEE Trans. Computers 25(4): 402-413 (1976)

      which, considering the state-of-the-art then (it was PDP 10) times was performing not too bad (as I thought then).

      Starting from there, I think it would be feasible today to come up with s. th. conforming to "HCI-ideas" more than particularly java which could tackle the DWIM-problem a little better than this ancient one (C-c d - For ACL only, does a "Do What I Mean" eval/compile (see function documentation for eli-lisp-eval-or-compile-dwim).)

      CC.

      --
      TaijiQuan (Huang, 5 loosenings)
    3. Re:Is it any wonder? by MikeBabcock · · Score: 1

      That's much clearer thinking than some programmers too ... based on the resulting code I've seen from them at least.

      --
      - Michael T. Babcock (Yes, I blog)
  7. Not gonna work by JohnGrahamCumming · · Score: 5, Funny

    Given the state of natural language on /. this isn't going to work :-)

    John.

    1. Re:Not gonna work by bgeek · · Score: 0

      instead of goto, we would have goatsecx ;)

    2. Re:Not gonna work by Anonymous+Brave+Guy · · Score: 1

      What are you saying? Natural language on /. is da bom. L337sp33k R0x0rz m8!

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  8. Closest I've found to Natural Language... by PortHaven · · Score: 2, Insightful

    Is Macromedia's ColdFusion syntax. As it continues to become less tied to HTML it will be interesting to see where this goes.

    But natural language requires more typing than say C syntax.

    A EQUALS B
    A = B

    But does the thought process get speeded up. If so one needs to know how the gains and loss affect overall development.

    1. Re:Closest I've found to Natural Language... by ebyrob · · Score: 1

      But does the thought process get speeded up.

      You mean like: Hey, that's a nice piece of code, maybe it'll help me out here <clickety>. Or something moore complex like envisioning the interworkings of a whole system in your head and trying to turn that into something useful based on recalled behaviour of snippets of symbols...

      I just don't think natural language meshes well with solution space. At best it might be useful for high-level specification.

    2. Re:Closest I've found to Natural Language... by vallette · · Score: 1

      I use ColdFusion and would have to say at best CF is the worst of both worlds. For instance, to set a value you use '=', to check for equivalency you have to use 'eq'. Not sure how that qualifies as being close to natural language. In my mind they should be interchanagable. The most natural language like progamming environment I ever used was HyperTalk. A little verbose but it was very easy to read and teach yet powerful enough to do some fairly sophisticated projects.

  9. The natural debugger by Anonymous Coward · · Score: 0

    - Hypothesizing what runtime actions caused failure;
    - Observing data about a program's runtime state;
    - Restructuring data into different representations;
    - Exploring restructured runtime data;
    - Diagnosing what code caused faulty runtime actions; and
    - Repairing erroneous code to prevent such actions

    If I had all that in a debugger, why would I need programmers? It be cheaper to pay the debugger.

  10. I don't buy it. by vontrotsky · · Score: 5, Insightful

    I disagree with the article's assumption that interesting programming errors are due to people being unable to express themselves "naturally" in code. Rather, I find that almost all errors worthy of debugging come not understanding the problem domain correctly.

    jeff

    1. Re:I don't buy it. by Bastian · · Score: 4, Interesting

      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.

    2. Re:I don't buy it. by ebyrob · · Score: 1

      The problem is: Define "bug" and "bug impact level". How do you do that fairly and objectively? Just getting a set of very basic terminology figured out is going to be a drawn out flame-war. (Or is going to marginalize you into a specific niche which moots the whole point from the get-go.)

      Basically it comes down to two things: time and money. Developers aren't going to spend the time to study their own bugs and development models, except when and where it helps them write better software faster. Standardization and sharing this bug-information just doesn't pay off in an obvious and immediate way. (Or more specifically it doesn't necessarily pay off to those putting in the effort.)

    3. Re:I don't buy it. by Bastian · · Score: 1

      The project should be shielded from flame wars and unwilling developers because the people it falls to to conduct this study are folks like the faculty at the HCI research group at CMU who are trying to study how we should be programming.

      Besides, we shouldn't be working from case studies in corporations, because that would make it darn hard to do any sort of experimental controls. On the other hand, it would be easy at CMU because they have a big stinkin' pile of undergrads that they can force or pay to sit around and program as research participants.

    4. Re:I don't buy it. by roman_mir · · Score: 1

      and I partially agree with you. I do believe though that the real problem is that we want just too darn much from our current applications. These programs are so complex, that describing them with any language, be it English, French, Russian, Chineese, Java, C++ or VB is a very time consuming task and a very much detail oriented task. High level design can be described in a natural language or in pseudocode or in UML but the details of implementation should be done in the most concise way, and most often that does not mean a natural language.

      For example: take this string and add it with that other string. Isn't it easier to say: "str1" + "str2" ?

    5. Re:I don't buy it. by Monkelectric · · Score: 1
      Yep. I kissed off the article after reading the first few paragraphs where they claimed looping structures were responsible for a lot of errors... If you're unable to understand the most fundamental concepts of computer languages such as the do/while, while, and for loops, you just shouldn't be a programmer.

      This is a crappy area of research admonoshing people for not drinking their koolaide.

      --

      Religion is a gateway psychosis. -- Dave Foley

    6. Re:I don't buy it. by the+morgawr · · Score: 1

      You'd be surprised how easy it is even for very experienced programmers to accidentally code in an off by one error. While I don't have any research data to back me up, I'd say that in sheer number of errors such loop mistakes are the majority. However in terms of time and money spend on finding and fixing it (which is what I'd say is the real question), I wouldn't think so.

      --
      The policy of the United States is worse than bad---it is insane. -- Ludwig von Mises, Economic Policy(1959)
    7. Re:I don't buy it. by Bastian · · Score: 1

      If I'm looping through a list, I frequently forget to handle a special case (the first element in the list needs some slightly different caretaking, something like that) the first time around. In that sense, loops are where a lot of my errors lie.

      On the other hand, if I've been getting enough sleep, I immediately realize what I did wrong. In that sense, loops aren't a source of problems because fixing fencepost errors and the like doesn't take up much of my time.

      All in all, if I had to make a call, I'd say that worrying about how to figure out those sorts of problems is a great example of spending a grand to save a buck. I'm much more interested in figuring out what kinds of languages allow a programmer skilled in that language to get to the finished project the most quickly rather than obsessing over certain kinds of problems.

    8. Re:I don't buy it. by legirons · · Score: 1

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

      One theory is: the less code you have, the less likely it is to contain mistakes. So the most powerful language available (the one which solves your problem in the least amount of code) is going to have the least mistakes, because (a) you've had more time to think about each line, (b) the code is more likely to be close to the problem domain, and (c) most estimation methods find a certain number of errors per x lines of code.

    9. Re:I don't buy it. by ebyrob · · Score: 1

      I was thinking you meant "industry wide" classification of development methodologies...

      The problem with the "small study" method is that you're relegated to niche tasks that may not correlate well with the industry at large. (And such efforts have been made, but they are usually targetted at creating some new programming/engineering methodology rather than studying existing methods in detail.)

      In any case, I suppose you have to roll over before you learn to crawl.

    10. Re:I don't buy it. by Anonymous Coward · · Score: 0

      I kissed off the article after reading the first few paragraphs where they claimed looping structures were responsible for a lot of errors... If you're unable to understand the most fundamental concepts of computer languages such as the do/while, while, and for loops, you just shouldn't be a programmer.

      You're an idiot if you can't see the difference between "X is responsible for a lot of errors" and "X is too difficult, I want my mommy".

      What the article actually says, as you would know if you had bothered to read it instead of glancing at it to try to confirm your prejudices, is that loops are responsible for a lot of errors when they're being used for things that humans don't conceptualise as loops.

      For example, adding one to every element of a list. Doing it with a for loop is introducing a needless chance for an off-by-one error. If your language provided a "do X for every member of this list" function, might you not consider using that instead? (Hint: many modern languages do provide that sort of thing. The people who use them are not normally imbeciles.)

    11. Re:I don't buy it. by Monkelectric · · Score: 1
      Yea, when I did a lot of assembly programming I had a number of "slogans" written on my monitor which said things like "Dec for len" (reminding me to decrement a "length" before using it in a loop), truth tables, etc etc ... I don't think these guys are onto something.

      If they *REALLY* want to improve programming ... come up with methodology for designing unifrom API's.

      --

      Religion is a gateway psychosis. -- Dave Foley

    12. Re:I don't buy it. by StikyPad · · Score: 1

      I would love to see some numbers on the frequency and nature of bugs in software...I doubt that the development of programmign technology will advance...

      While I have no empirical data to back me up, I have a sneaking suspicion that typos play a large role.

    13. Re:I don't buy it. by Anonymous Coward · · Score: 0

      Or there is an understanding of the problem domain for only a small set of (ideal) scenarios, due to lack of other information, bad assumptions, etc.

      Like designing a database with a flat table, knowing in your gut that it needs SOME sort of normalization, but your boss says, "keep it simple!", and THEN you start getting real data, and, well, it's completely fucked at that point.

    14. Re:I don't buy it. by Anonymous Coward · · Score: 0
      As other people point out, even experienced programmers make errors with loops.

      To my mind, if your language requires you to write explicit looping logic all the time, it's just not providing you with good abstractions. If you find yourself writing "for i = 0; i++; i < n { foo(i) }" repeatedly, it's a sign that your language isn't expressive enough to abstract generic loop logic patterns into function definitions, and supply the bodies as arguments. This means that instead of defining in one place how to loop over somethinf n times, you end up repeating the same code over and over in your program.

      In a language with proper, first class anonymous functions, you hardly ever write explicit loops like that. Your "loops" are functions that take other functions as arguments. Thus, in Ruby, the above is "n.times { |i| foo(i) }"; the looping logic is inside the definition of the "times" method, and the loop body is passed as an argument to it.

  11. HCL, HCl, or HCi? by tepples · · Score: 2, Informative

    HCL (Hilbert Class Library) has little if anything to do with HCi (Human Computer Interaction) or HCl (hydrochloric acid). The article is about HCi.

    1. Re:HCL, HCl, or HCi? by foobsr · · Score: 1

      I might seem a little pedantic but it was and still is HCI indeed.

      Evidence here

      CC.

      --
      TaijiQuan (Huang, 5 loosenings)
  12. ROFL! by BigZaphod · · Score: 1

    Ha! There is a page 2. Heck, even a page 3.

    *sigh*

    Well I feel dumb. This is why I need a sign above my computer that says, "Absolutely no Internet posting before caffeine intake."

    1. Re:ROFL! by TwistedSquare · · Score: 1

      Actually, I still agree with your point having read all three pages. Not enough specific examples of problems in languages and what the better way would have been.

  13. Hmmmm by Profane+MuthaFucka · · Score: 3, Insightful
    The article wasn't really that clear on exactly what NLP is, but they pointed at something called Alice.

    On that site, there's http://www.alice.org/whatIsAlice.htm which says
    Rather than having to correctly type commands according to obscure rules of syntax, students drag-and-drop words in a direct manipulation interface. This user interface ensures that programs are always well-formed. In addition, Alice reifies object-based programming by providing animated, on-screen 3D virtual objects.

    So, this is just like Visual Basic. I know that can't be true, or else Microsoft would be marketing VB as NLP. So what am I missing?
    --
    Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    1. Re:Hmmmm by fzammett · · Score: 1

      What your missing is an understanding of what VB, Delphi and their ilk offer, and what NLP is. I don't mean for that to sound offensive in any way, please forgive me if it does.

      VB makes creating GUI-based applications quicker (and easier, many say) by allowing you to create the user interface in a visual fashion and then attach code to the visual elements. You still have to get down there and type code though to make the application do anything aside from some "canned" interface functions.

      Alice, OTOH, is allowing you to form an application completely in a visual way, although the visual elements are actually words. It's sort of like in VB how you can have a form and drag a button and a textbox onto it, which saves you time and effort, but you then have to write:

      text1.text = "hello" ...and attach that to the onClick event of the button (pardon me if the syntax is wrong, it's been a couple of years since I've touched VB).

      In Alice, maybe you have a palet ot words instead of visual components, and maybe one of them is "copy text ____ to ____". You drag this to the editor interface, then enter a string of text in the first ____, then drag the word TEXT1 into the second. Your forming the "program" in an English phrase, without having to code anything.

      Note that I'm not too familiar with Alice aside from a quick glance at the link you referenced, but I think that's the general idea.

      It's kind of funny because Cobol was something of a NLP language, and everyone hated it! To be able to type:

      Copy array 1 to table 2 ...in a program is kind of the overall idea of LNP. That's a dream at this point, no need to write "arcane" code that doesn't have much relevance to the end-user who's telling you what the system should do in plain English, hence the need for the "translation" the author of the article mentioned, which really is what programming is these days.

      We should have stuck with Cobol and developed it further! (I'm saying that sarcastically of course, yet the underlying thought is serious).

      --
      If a pion (n-) collides with a proton in the woods & noone is there to hear it, does lamdba decay into the source pa
    2. Re:Hmmmm by Anonymous Coward · · Score: 0

      In VB you don't actually manipulate code/process elements visually. You only manipulate the visual appearance/placement of UI elements. There's a huge difference. This Alice thing seems like an idea I had not long ago of creating an IDE that would allow you to write code modules directly in your preferred language, but on higher levels you could interact visually with the code elements. The representation would ideally be "skinnable", but my original idea was to have a 3D viewing field on the scren, and to use spheres for objects. And when you need to call a function, a panel would pop up from the sphere, with labeled slots where you could drag the visual representation of your variable to the slots and drop it in. The code element you were focused on would be connected to other code elements in the viewing space by thin lines that you could click on and have the view zip along it from one end to the other.

    3. Re:Hmmmm by TheGavster · · Score: 1

      VB (and Delphi and C#) is a normal programming language with a GUI designer attached. You can write a program in VB that handles GUI objects just like a C++ application does by calling Windows API, its just harder that way most of the time. The only NLP element that VB uses that C++ does not is the word 'Then' in if blocks.

      --
      "Because Science" is one step from "Because old book". Try "Because of my experiment testing my falsifiable assertion".
    4. Re:Hmmmm by StikyPad · · Score: 1

      Ahh.. I thought Alice was referring to a different venture into real-language comprehension.

      http://www.alicebot.org/

  14. Oh NO! Not Again! by kaalamaadan · · Score: 3, Insightful

    Cobol, anyone?

    Multiply x by y to get something or the other ...

    1. Re:Oh NO! Not Again! by Tablizer · · Score: 2, Insightful

      Cobol, anyone?

      (Or SQL for that matter. We managed to finally obsolete COBOL more or less, but SQL is still with us.)

      Anyhow, the idea behind the COBOL Natural Language push was to rid the need for programmers or at least greatly reduce their training. However, it was found that somebody with some training could translate business logic into something that the computer could understand better than amatures. In other words, with some training productivity was so much higher than some manager trying to be precise enough.

      Further, regular human speach is vague. To learn not to be vague takes a some training itself. And, many have discovered that English is not geared well to being precise. Rather than bend English to be precise, it appears better to toss English with something meant for precision. In other words, there is a bigger payback in efficiency to bend the human to be more like the computer (or at least use better language structure) than the other way around.

      Further, non-programmers often have a horrible time with "normalization". They tend to duplicate stuff in ways that comes back to haunt the design down the road. In the real world making copies of papers is the norm, for example. If you do this in the computer, then you have to remember to change all the copies and know where they are.

      Thus, if the training effort involves issues not just related to language to do it right, then it is worth it to integrate a more precise language into the training rather than futz with english.

      Otherwise, it is like putting training wheels on motorcycles. It pays to get the prerequisites right first.

      Maybe on a small scale, natural language will be okay. However, scaling this to production systems would probably be a mess. Even with languages more precise than English, we still make some ugly bugs. The problems would probably jump an order or two of magnitude if a hacky amature system based on the naturally vague English language is applied.

  15. How about this? by lucabrasi999 · · Score: 1

    "Computer?"

    "Working"

    "Program the holodeck to look like the inside of a seedy 1920's era Jazz Club. We need to write another time machine episode."


    1. Re:How about this? by mmkkbb · · Score: 2, Interesting

      How about an answer from someone more well-acquainted with basic human desires?

      --
      -mkb
  16. Natural language programming. by Adhemar · · Score: 5, Insightful
    The virtue of formal texts is that their manipulations, in order to be legitimate, need to satisfy only a few simple rules; they are, when you come to think of it, an amazingly effective tool for ruling out all sorts of nonsense that, when we use our native tongues, are almost impossible to avoid.
    - Edsger Wybe Dijkstra, "On the foolishness of natural language programming".
    An interesting read.
    1. Re:Natural language programming. by Moofie · · Score: 2, Funny

      I don't think that anybody who spells their name like that gets to talk about "natural language".

      (it's a joke, people!)

      --
      Why yes, I AM a rocket scientist!
    2. Re:Natural language programming. by Hanji · · Score: 1

      For the record, Dijkstra also advocated formal provability as the sole criterion for demonstrating program correctness. A nice idea for a theorist, perhaps, but utterly unimplementable in the general case.

      Just wanna point out Dijkstra's view on CS in general, not necessarily to discredit his argument, but to point out that his conception of computer science and programming differed radically from the realities of today.

      --
      A Minesweeper clone that doesn't suck
    3. Re:Natural language programming. by meburke · · Score: 1

      You are correct: It is an interesting read.

      I tend to agree more with Dijkstra on the nead for abstraction. It was actually a coincidental familiarity with symbolic logic (First Order Logic specifically) that made it easy to move from being a Pascal/Modula/Oberon evangelist to being an Object-Oriented thinker.

      Programs are not meant to express Universal Truth (at this time) but to act as the instructions for a complex set of machine switching instructions.

      Furthermore, Natural Language (and English specifically) are a poor substitute for mathematical descriptions. Almost every word in the natural language is used to describe a mathematical concept, but as it does so it creates non-mathematical ambiguity.

      (If mathematics = measure, space, relationship, then:

      Almost = measure (relationship)
      every = measure (quantity)
      word = OBJECT
      in = relationship (space)
      the = measure (quantity)
      natural language = object
      is = relationship (identity)
      used to = relationship (change)
      describe = process (relationship)
      a = measure (quantity)
      mathematical concept = OBJECT (relationship)

      And, speaking of non-mathematical abiguity, a look at the "is of identity" (and it's relatives such as are, be, to be, were, was) have caused a group of symanticists to propose an alternative to standard English called E' (E-prime).

      Lastly, the actual symbolic language of computers is binary arithmetic. Binary symbology saves a huge amount of complexity and saves space overall. (How many symbols must be reserved to express 1024 in decimal?...40. How many symbols must be reserved to express 1024 in binary?...18.) IMHO, the high-level languages are an abstraction tool we can almost understand used to produce an abstraction we have great difficulty understanding.

      The article does bring up a good point, though: I really like the idea of studying the inefficiencies in our current programming paradigm to see if the interface or the language could remove some of those. I love the graph at the bottom of the WhyLine that shows the process and causality of results in execution.

      Mike

      --
      "The mind works quicker than you think!"
    4. Re:Natural language programming. by meburke · · Score: 1

      I strongly disagree. His ideal reality was highly developed in the context on CS 30 years ago, but the reality and goals are fundamentally the same. Another tool, OOP, has somewhat replaced his development of structured programming, but that doesn't negate the quality or the brilliance of his work.

      Brad Meyers was in charge of the Amulet Project (now evolved into Open Amulet) which was an enviroment for producing quality OO code. One of my friends was working on that project, and we were talking about a meeting they had where the general conclusion of the Amulet group was that (at that time) OOP offered no major advantage over Dijkstra's concept of Structured Programming. Since that time, about 15 years ago, we have seen a little progress in OOP, but it would be hard to convince me that Visual C++ is significantly better than Oberon, including both the OS and the language.

      As for provability, James Martin wrote a terrific book, "System Design from Provably Correct Constructs" which, IMO, should be read by everyone attempting OOP.

      Mike

      --
      "The mind works quicker than you think!"
  17. Write a Natural Language Compiler by TheUnFounded · · Score: 5, Interesting

    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. :)

    1. Re:Write a Natural Language Compiler by Anonymous Coward · · Score: 0

      I agree. Programmers are good because they can think in a structured formalized syntax. NLP would serve to alienate real programmers and make it easier for non-programmers to develop programs.

      Let programmers do their job and non-programmers do theirs.

    2. Re:Write a Natural Language Compiler by truthsearch · · Score: 1

      Personally, I don't see how creating a language that encourages this behaviour can be a good thing.

      I think what they're trying to say with natural language programming is the inverse. The computer should better understand what the person is trying to say if the person tells it in a more natural way. With the many nuances of language this is very difficult, so they question why we're not applying some of the techniques already learned to make programming languages more natural.

      You're right, it may encourage more wasteful and misleading behavior. But if one day the computer can completely understand almost anything we tell it then it'll be able to interpret it in a smart way.

    3. Re:Write a Natural Language Compiler by Fortran+IV · · Score: 1
      But if one day the computer can completely understand almost anything we tell it then it'll be able to interpret it in a smart way.
      And by then we'll be unnecessary, since the computer will be smarter than most of us. Can you understand "almost anything" your users tell you?
      --
      I figure by 2030 or so my 6-digit UID will be something to brag about.
    4. Re:Write a Natural Language Compiler by Anonymous Coward · · Score: 0

      "interpret it in a smart way" will always mean one thing to one developer (or user) and another.

      Just look at people interacting with each other, for crissakes, especially people of one level of "niceness" interacting with people of a different level of "niceness". They both speak the same language, they're both humans, but they see the world and respond to it in almost completely opposite ways.

    5. Re:Write a Natural Language Compiler by lachlan76 · · Score: 1

      There is a feature in almost every language to help in that situation. It is called comments.

  18. People think in their languages. by Mr.Spaz · · Score: 3, Insightful

    One of the big problems this approach will have to overcome (in my opinion) is that people generally tend to order their thoughts in a manner specific to their native language. A development environment that seems intuitive and easy to use to a native English speaker might be backwards or obtuse to a person who natively speaks another language. To clarify; I'm not speaking strictly of grammatical structure of language, but of a seemingly inherent difference in the way people learn things based on what language is used in the teaching. For this reason it has always seemed better to me for programmers to learn a new, common language (that of the higher-level compiler they are interested in) so that when they work with others, everyone is on the same page (similar to scientists and doctors using Latin nomenclature).

    I'd imagine that a "natural language" system could be developed with different approaches based on the native tongue of the programmer, but I would think this would damage the benefits of commonality that other languages now enjoy.

    1. Re:People think in their languages. by Chundra · · Score: 1

      "For this reason it has always seemed better to me for programmers to learn a new, common language (that of the higher-level compiler they are interested in) so that when they work with others, everyone is on the same page"

      Yeah, like maybe the programming language itself? Maybe it's just me but I think in whatever programming language I'm using. It's so much harder to try to convert data structures and algorithms to a natural language, or vice versa. The best we can hope for (in my opinion) is people using good, terse, descriptive function/method, and variable names. Of course, that'll never happen. :)

    2. Re:People think in their languages. by Mr.Spaz · · Score: 1

      Yeah, like maybe the programming language itself?

      Actually, that's precisely what I was referring to (see the following sentence in parentheses).

      Maybe my natural language wasn't clear enough. ;)

    3. Re:People think in their languages. by Fortran+IV · · Score: 1

      Good Lord, that's the truth. Most people I know have no idea how restrictive English grammar is, and how much variation there can be with other languages. English speakers (at least the grammatical ones) are familiar with a handful of verb inflections -- singular vs. plural; present or past tense -- but Old English actually inflected the nouns of a sentence as well, to indicate the subject and the predicate. You could say either "Dick hit Jane" or "Jane hit Dick" and the noun inflection, not the word order, determined who actually got hit. I'm no linguist, but I believe there are contemporary languages with similar features.

      That's a vast conceptual shift, that a person's name can be said differently according to whether he's the subject or the object of an action. How would "natural programming" be different to a person for whom word order is not significant, but individual word structure is? That's a complete shift from classic programming languages (although methods and attributes could be thought of as "noun inflection" in languages like Java or VB, you still can't just put your variable names anywhere you want in a statement).

      There are no natural ways of thinking; thought patterns are learned and largely cultural. For "natural programming" to really work, the system would have to be tailored to each native language and culture it would serve. At least with FORTRAN you didn't have to worry that a programmer from Sweden and a programmer from Hong Kong will expect the plus sign to mean two different things.
      --
      I figure by 2030 or so my 6-digit UID will be something to brag about.
    4. Re:People think in their languages. by Haeleth · · Score: 1

      English speakers (at least the grammatical ones) are familiar with a handful of verb inflections -- singular vs. plural; present or past tense -- but Old English actually inflected the nouns of a sentence as well, to indicate the subject and the predicate. You could say either "Dick hit Jane" or "Jane hit Dick" and the noun inflection, not the word order, determined who actually got hit. I'm no linguist, but I believe there are contemporary languages with similar features.

      Such as Perl, for example?

    5. Re:People think in their languages. by brpr · · Score: 2, Insightful

      English speakers (at least the grammatical ones) are familiar with a handful of verb inflections -- singular vs. plural; present or past tense -- but Old English actually inflected the nouns of a sentence as well, to indicate the subject and the predicate. You could say either "Dick hit Jane" or "Jane hit Dick" and the noun inflection, not the word order, determined who actually got hit. I'm no linguist, but I believe there are contemporary languages with similar features.

      Well yes, of course there are contemporary languages with similar features.

      That's a vast conceptual shift, that a person's name can be said differently according to whether he's the subject or the object of an action.

      No it isn't. What you're missing here is that the underlying argument structure of natural languages is pretty universal: inflection and word order are just two different ways of encoding the same agent-patient-theme hierachy. A parser could extract the same semantic information from two languages which on the face of it appear to be quite different. The hypothetical natural language programming system would interpret sentences based on their argument structure rather than their syntax per se.

      There are no natural ways of thinking; thought patterns are learned and largely cultural.

      Says who? Certainly not modern cognitive science, or indeed modern linguistics. What is a "thought pattern", anyway? If it's any technique for thinking which is learned, then, by definition, anyone who isn't already familiar with it can...learn it. Problem solved.

      For "natural programming" to really work, the system would have to be tailored to each native language and culture it would serve.

      Obviously the system would have to be tailored to each language, but this would just be a matter of rewriting the parser and vocabulary (and in fact it should be possible to share a lot of the parsing infrastructure between languages). There's no reason to expect any "cultural" issues would extend further than this.

      As a linguist, I'm very sceptical of the general utlity of NLP. While it's perfectly possible to parse natural language, it's an impossible problem to reliably extract meaning from it. This is because most meaning in a natural language sentence is not encoded -- it is infered by the hearer based on assumptions about the attitudes, knowledge and intentions of the speaker. Clearly, for a computer to do this it would require a massive encyclopaedic knowledge, and (more or less) a fully functioning human-like mind. I doubt we'll be seeing this any time soon.

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    6. Re:People think in their languages. by Fortran+IV · · Score: 1

      While it's perfectly possible to parse natural language, it's an impossible problem to reliably extract meaning from it. This is because most meaning in a natural language sentence is not encoded -- it is infered by the hearer based on assumptions about the attitudes, knowledge and intentions of the speaker.

      That's a good deal of what I meant by, "Thought patterns are learned and largely cultural," and "The system would have to be tailored to each. . .culture it would serve."
      --
      I figure by 2030 or so my 6-digit UID will be something to brag about.
    7. Re:People think in their languages. by brpr · · Score: 1

      "That's a good deal of what I meant by, "Thought patterns are learned and largely cultural," and "The system would have to be tailored to each. . .culture it would serve."

      Hmm, it isn't obviously what you meant because the only concrete example you gave involved syntax, which has virtually no effect on the structure of thought. It's also not the case the infering the attitudes, knowledge and intentions of the speaker will necessarily require much cultural background (unless you want "say something funny" to be a well formed program...) With someone who's writing a program, most of the assumptions you make will have nothing to do with their culture (e.g. the assumption that they want the program not to crash or go into an infinite loop). Presumably no-one would expect their programming system to know that bears shit in the woods or that red wine is served at room temperature. After all, any system which knew as much as the programmer could program itself.

      Of course, this does not change the fact that mind-reading is a hard problem, even if it doesn't require a great deal of information about the speaker in certain artificial situations. Humans do it almost effortlessly most of the time, but it'll be a very long time before machines can come close to our ability. Cultural differences are the least of our worries -- it's not like we have perfect NLP systems for English speakers which we can't adapt to Swahili.

      Unfortunately if you use a vague phrase like "thought patterns", it's easy to say stuff which sounds good but which is actually completely unfalsifiable. Your statement that thought patterns are learned and largely cultural is virtually meaningless, so it's difficult to criticise.

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
  19. I didn't RTFA... by GillBates0 · · Score: 3, Insightful
    The goal is to make it possible for people to express their ideas in the same way they think about them.

    That's about as far as I got. I guess he didn't really express his ideas in the same way that I wanted to think about them.

    Which nicely illustrates the point that there's always a "semantic gap" associated with natural languages, which builds up because people have different ways of thinking. The semantic gap is even wider when one of the entities being communicated to happens to be a machine. There's a reason why traditional programming languages are precise and exact...it's so that the gap is reduced - the machine will do exactly what you tell it to do...even then we have a disconnect between what the programmer's thinking, and the code that he's writing.

    --
    An Indian-American Hindu committed to non-violent thought/speech/action alarmed by the global explosion of radical Islam
    1. Re:I didn't RTFA... by ILikeRed · · Score: 1

      I think they are really looking for a modification of Perl... where the goal is to think like Larry Wall. If they could think better than Larry, they would have their own language. (I think it is no mistake that Larry Wall is a linguist.)

      --
      I have come to a conclusion that one useless man is a shame, two is a law firm, and three or more is a congress -J Adams
    2. Re:I didn't RTFA... by Khelder · · Score: 1
      That's about as far as I got. I guess he didn't really express his ideas in the same way that I wanted to think about them.

      I don't understand your point. Why did you stop reading? Because you didn't understand what the authors were trying to say? Or because you disagreed with the authors? Or some other reason?

      You're right that there is a semantic gap. But the authors suggest that we might be able to bridge it by moving the language closer to what humans naturally use than it currently is. I don't think they expect to have an English (or pick your favorite NL) compiler any time soon (if ever).

  20. Natural Language isn't for Serious Programming by I_Love_Pocky! · · Score: 3, Insightful

    Natural language isn't precise enough for serious programming. I personally wouldn't enjoy typing so much for no added benefit. It seems like this sort of thing only has value amongst people who are learning to programming. Why would a mainstream language like Java or C# cater to this bunch?

    1. Re:Natural Language isn't for Serious Programming by alw53 · · Score: 1

      The article didn't seem to suggest that people try to program in English. The only example I saw was that of adding up a bunch of numbers in a set, and I thought it was spot-on about that issue. Everything in Java and C happens at the element level. But Lisp has a MAP function, and APL has reduction, and even BASIC can add A+B, where A and B are arrays. The higher-level operations that eliminate most of the explicit looping structures have been available for years but noboby ever builds them into new languages. In fact, language design seems to be moving backward as all three of those languages were designed in the 1960's.

    2. Re:Natural Language isn't for Serious Programming by Anonymous Coward · · Score: 1, Insightful

      Natural language isn't precise enough for serious programming.

      What do you mean by "serious programming"? This strikes me as someone that learned assembly mocking those that knew C, which mock those that use Java.

    3. Re:Natural Language isn't for Serious Programming by I_Love_Pocky! · · Score: 1

      I'm not trying to belittle the idea of an extremely high level programing language. When I said serious programming, I had in mind a programmer who writes code daily. It seems to me that the closer to natural language a programming language becomes, the more typing there will be required to express the same thing. If you are familiar with programming, what benefit is there to a more "natural" language?

      By the way, I program in all three of the languages you mentioned (not that "assembly" is really a language, so much as a class of languages), and they are all useful for different tasks. I would never suggest that Java isn't a quality language simply because it is easier to use. I just don't think natural language would be easier to use in programming, just easier to learn.

    4. Re:Natural Language isn't for Serious Programming by micromoog · · Score: 1

      That's what functions and operator overloading are for. Building every mathematical or logical construct ever devised into the language is not a good idea, but giving the programmer the ability to do so is.

    5. Re:Natural Language isn't for Serious Programming by alw53 · · Score: 1

      Doing a Lisp MAP in Java is pretty painful, as is doing pretty much anything that treats functions as first-class datatypes, allowing composition, maps, reduction, etc, etc. Write me a Java function that takes two Java functions f and g, and returns their composition f(g(x)) as a Java function...

    6. Re:Natural Language isn't for Serious Programming by ebyrob · · Score: 1

      Write me a Java function that takes two Java functions f and g, and returns their composition f(g(x)) as a Java function...

      So you want this generalized:
      public static RetType fg(x) {
      return f(g(x));
      }

      It can certainly be done ike this:
      public static Value composite(Operation f, Operation g, Value x) {
      f.execute( g.execute(x) );
      }

      Where f and g implement the Operation interface, and Value represents some generic data type that can be passed in and out of Operations. (Note this could probably be done better with the Java 1.5 additions, but I haven't played with them enough to whip it out off the top of my head.)

      The thing about Java is, it isn't that hard to do what you're asking for, but it doesn't come *free* with every function ever written. This is somewhat inflexible but also promotes a certain degree of safety.

      Of course. Calling:
      Util.composite( Foo.f, Bar.g, x ); //f and g being Operation variables in this case

      Instead of using:
      Foo.f(Bar.g(x)); //f and g being functions in this case

      seems silly and over-complicated. In large applications this could even be expensive and dangerous. Every Java programmer knows what f(g(x)) means at a glance. If you call a custom written function: composite(f,g,x) you'd have to look at the code to know what actually happens there (and/or worry about someone "enhancing" it on you).

  21. Ah, I see the problem... by Nijika · · Score: 2

    "The goal is to make it possible for people to express their ideas in the same way they think about them." There's your problem right there :) I think they're probably not being adopted because in the world of programming convention is the key to interoperability. Human thought and language aren't so strictly tied to convention.

    --
    Luck favors the prepared, darling.
  22. Remember Apple Script by brw215 · · Score: 2

    It seems to me that the steps in the Natural Programming approach are not at all novel and certainly not as useful as they appear. The authors seemed to have forgotten the train wreck that was AppleScript. The authors state that syntax in program languages are too complex. I would argue that the syntax of a programming language needs to be more complex then the syntax of a natural language. The sad fact is that English (and other natural languages) were not designed with enough precision for things like programming languages. For example: If in some natural programming someone were to state "if x or y do z" Does this statement mean that x and y need different values or can they both be true? One can't tell from looking at the statement.

    1. Re:Remember Apple Script by Anonymous Coward · · Score: 2, Insightful

      > The authors state that syntax in program languages are too complex. I would argue that the syntax of a programming language needs to be more complex then the syntax of a natural language.

      I think you really mean the opposite of what you said. The syntax of natural language is bogglingly complex. You can express the syntax of even perl with a few kilobytes of EBNF. Noam Chomsky tried to come with formal syntax rules for spoken languages and utterly failed (though his work is what led to BNF and company)

    2. Re:Remember Apple Script by Anonymous Coward · · Score: 0

      That's what and/or is for :)

    3. Re:Remember Apple Script by philge · · Score: 3, Informative

      Applescript is alive and well an dearns me a decent living. One of the main benefits of applescripts syntax is that is it alot easier to read then it is to write because of its english like language. So when you come to look at it six month later its is a lot easier to figure out what it does.

    4. Re:Remember Apple Script by Anonymous Coward · · Score: 0

      "if x or y do z"
      to answer your question becomes unambiguous if you write
      "if x xor y do z" for the exclusive or case and
      "if x or y do z" for the other case

      or

      "if (x or y) or (x and y) do Z" if you restrict or to meaning xor. IMO this is too much to type.

      Isn't it all 'natural language' once you assign names to symbols and operations?
      MV BX AX
      JMP

    5. Re:Remember Apple Script by javaxman · · Score: 2, Interesting
      Dude, I have news for you, AppleScript is still a bit of a train wreck.

      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.

    6. Re:Remember Apple Script by Anonymous Coward · · Score: 0

      AppleScript was a bit of a train wreck but it's grandpa, HyperTalk, was really a joy to use. Simple, powerful, natural. It wasn't the fastest or the most robust language of it's day but it did what was designed to do exceedingly well. I find it ironic that a simple, 'every person', programming environment was discontinued at a time when the hardware that could truely fulfill it's potenial was just coming online.

    7. Re:Remember Apple Script by Blakey+Rat · · Score: 1

      AppleScript is not that bad a language, firstly. It does what it's designed to do with a minimum of fuss... what are you comparing it to? VB Script? Javascript? Of the three I prefer AppleScript.

      In addition, AppleScript is actually a subset of an earlier programming language invented by Apple for use in the Hypercard database application called Hypertalk. Hypertalk, although verbose and slow, was very very powerful and would shine on modern hardware if only somebody gave it a chance.

    8. Re:Remember Apple Script by Anonymous Coward · · Score: 0

      Well, because of all the extra english crud in there, the reason that you are looking at it six months later is that you're still writing it.

      I know all kinds of languages: Java, Perl, C, C++, Ada, Python, Scheme, etc. and for the life of me, I can NEVER figure out what the hell any piece of AppleScript does, and even if I'm told what it does, I can't figure out how.

      I always think "I could make a quick AppleScript to do this." and after 10 minutes of trying to figure out the syntax (again), I'm thinking "Fuck this, I'll do this with something else that makes sense and doesn't make me write "tell" a million times."

  23. Good point! by goldspider · · Score: 4, Insightful

    One thing that programming languages force upon you (the programmer) is the ability to get what you want using the least possible resources.

    Natural language, while easier for beginners, would make for horribly inefficient code and would be undesirable for any sizeable application.

    --
    "Ask not what your country can do for you." --John F. Kennedy
    1. Re:Good point! by LnxAddct · · Score: 1

      Yea could you imagine being given a large application and being told to maintain it if it written in natural language? It'd be akin to having to read an encyclopedia or something. Absoultely ridiculous. If nothing else, the current state of programming languages allows one to easily skim through a few pages of source and pretty much get the idea of whats going on by reading a few comments and by seeing familiar structures in the code. If nothing else, your guaranteed that one line won't exceed 80 characters (at least in theory :-] ), but in natural language, it might take 80 characters to declare a damn variable and initialize it.
      Regards,
      Steve

    2. Re:Good point! by Anonymous Coward · · Score: 1, Insightful

      I don't see any reason why a compiler can't be smart enought to build efficent code from natural language, nor do I see any reason why you can't express an efficent algorithm in natural lange. The issue is how hard is it to do those things and is it worth it? Creating a compiler with a good enough understanding of english or any other widely used language would require decades of development or an army of developers take your pick.

      The next issue is who would want to use it. How often have you read some techniacal instructions for anything relatively complex and not been entirely sure exactly sure what to do? Even stuff writen by proffesionals is not always exactly clear. Ever been confused reading a text book, I have. That won't fly with the computer. Any code one writes would have to be super verbose and probably writen and rewriten several times to be suitibly clear. No that the compiler could not give intelligent help like, "I don't understan what you mean by 'then goto the next node' did you want the left or the right?" but still while it might be easy for beginners it would be a pain for large projects; I doubt it could really ever be useful.

      Which brings us back to the only thing you can do is comprimise. Limit the vocabulary and select a particualr definintion for each key word(or one for each of a limited set of contexts). As soon as you do this though the language becomes less "natural" and you get Cobol; I doubt many want to go back there.

    3. Re:Good point! by ensignyu · · Score: 1

      I don't think it would be that bad. It'd be akin to using a higher-level language like Python, where you don't care how something is sorted when you call list.sorted(), just that it's sorted. Some people think that Python is horribly inefficient, but it turns out that even 100x slower than C isn't too bad for many applications.

    4. Re:Good point! by AuMatar · · Score: 1

      Umm, that sort example works in any language- thats why we created interfaces and APIs. In C you write a function called sort, and call it. THe end result is a sorted array you use as needed. Same in C++, Java, assembly, machine code, etc. Its not anything magic about Python.

      As for 100x slower than C not being bad- I take it you're willing to pay for all my future hardware upgrades? If not, then its bad.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    5. Re:Good point! by 0D0A · · Score: 1

      Ever heard of XML. When it came out, I thought to myself what a dumb idea - lets take something efficient like a 1 byte signed integer and change it so that it can take up to 4 bytes to store. Plus the whole opening AND CLOSING a tag with the description - sheesh, why not put the whole tag in again: just in case! So converting from a legacy app to a modern app, the 1 byte value of -100 that meant temperature to me is now stored as "-100", and anyone can read it (maybe good, maybe bad). Thats 31 times the original binary size! Did anyone care? No. The first time I heard the phrase "XML Database" I almost fainted! And yet it came to be.

    6. Re:Good point! by 0D0A · · Score: 1

      31 times the original size is with an opening and closing tag of temperature, which /. removed for me.

    7. Re:Good point! by saintp · · Score: 1
      I don't see any reason why a compiler can't be smart enought to build efficent code from natural language
      Let's work on building efficient code from Java first, then we'll worry about the really hard problems.

      /pulls on asbestos longjohns

    8. Re:Good point! by FangVT · · Score: 1

      Natural language, while easier for beginners, would make for horribly inefficient code and would be undesirable for any sizeable application.

      And there was a time when, by the standards of the day, Java or C++ would've been considered inefficient and undesireable for any sizeable application. Moore's Law is giving us the luxury to think about things other than how to optimize every last byte out of a program.

    9. Re:Good point! by Euler · · Score: 1
      Python is a highly flexible framework/environment. In your example you can use the existing list.sort() if it immediately meets your needs in order to get the program written quickly. You can also define your own sort function and plug that in, which I frequently do. If you had a performance issue, you can always drop back down to C to do it.

      I think Python is better than just another high-level language. It always seems to be the simplest, best factored way that I can express a problem. I've often thought about how to design a system like the article describes where the program is defined in natural language. But I always come back to the conclusion that natural language is too incomplete to define determinate processes. There is nothing wrong with the common programming structures: loops, conditionals, storage and operators. It really is the best way to represent software. So much so that even hardware is designed using these structures (VHDL).

      The error rate that the article attributes conventional programming structures is BS. Errors result from the practical limitations of the languages. For example, in C, doing so much manual memory allocation, poor string handling capabilities, poor exception handling and easily misplaced operators are the usual cause of problems. To knowledgeable programmers, errors have nothing to do with the underlying constructs themselves. All of these issues went away when I did more projects in Python. Python lets me express a problem as I intend it, so much so that I had to push aside my conventional mindset when trying to learn Python. The idea that I can just put data in a list without allocation or pointers was difficult to get used to.

      There are always going to be some concessions due to the concrete nature of a real-world programming system. I think the article was too pie-in the sky as far as asking for a new paradigm that they cannot give a concrete working example of. The best systems are like Python that allow a problem to be solved by choosing what level of abstraction I want to handle it at. It's also very easy to test small parts of programs in Python.

      Once part of the article caught my attention:
      "If programmers have a weak hypothesis about the cause of a failure, any implicit assumptions about what did or did not happen at runtime will go unchecked."

      This is a very valid point raised in the article, programming languages should have more facilities built into them besides conventional debuggers. Easy to use tools should be routinely used to better validate input/output and possible conditions in a program on a more complete scale.

      As for performance, yeah it kinda sucks. It would be nice if Python had more development spent on tackling performance issues. To do what the article describes, you could use Python syntax to output compiled-machine code programs. Tools like Pyrex do this already.
    10. Re:Good point! by cheekyboy · · Score: 1

      Unless the natural interpreter is smart enough to notice my C++ in the middle of the natural stuff :) ewwwww

      Perhaps they should just make a graphical icon language like egyption glyphs, but instead programming ones. You could describe conplex words or features with one little icon and some cute circles with data points. But ofcourse you cannot invent your own images.

      --
      Liberty freedom are no1, not dicks in suits.
    11. Re:Good point! by lachlan76 · · Score: 1

      It's not about efficiency, it's about being able to ensure compatibility between programs, by using an open and _HUMAN_READABLE_ format.

    12. Re:Good point! by lachlan76 · · Score: 1

      Moore's Law is giving us the luxury to think about things other than how to optimize every last byte out of a program

      If you choose to assume that Moore's Law also applies to a programmers typing skills, then that might be true. However, in the real world, redundant information which is harder to read than using symbols is not the kind of thing that you want in a large program.

    13. Re:Good point! by ensignyu · · Score: 1

      True, but in Python you have things like sort() built-in to the language instead of writing it yourself or getting a third-party library. A natural programming language will probably have even more built-in generic functions.

      And it's not like you need a really fast computer when 95% of the time the program is sitting around waiting for user input. Obviously, not everything should be written in an interpreted language, but for some things it really doesn't matter how fast it goes.

    14. Re:Good point! by AuMatar · · Score: 1

      There's a sort function in C. And one in the STL of C++. Your point is moot. Not to mention that downloading a 3rd part library and having it built in are functionally equivalent- you have a library call and you use it. Having it in the standard library confers no advantages, and actually has several disadvantages such as bloating code size and killing innovation.

      As for waiting for user input 95% of the time- I don't know about you, but I'm never running just 1 program. I'd rather that speed go to something else. Come to think of it, a good 90% of the programs I use are CPU intensive- I'd rather they finish a few seconds quicker so I can use the results faster. Faster is always better, and speed is always important. Its fucking pathetic and shows how poor software is written these days that hardware doubles in speed every year, but software slows down so badly that we can't do more.

      --
      I still have more fans than freaks. WTF is wrong with you people?
  24. HyperTalk by Anonymous Coward · · Score: 0

    The language of HyperCard has to be the one most resembling the English language.

    "Programming for the rest of us"

  25. Interesting Paper by 110010001000 · · Score: 0

    The paper is very unfocused. It is less about natural language programming and more about debugging environments and event driven programming. These guys must have received a grant of some type or must be working on a Ph.D. because they created yet another "natural language" environment and language and tested it on children (is that the target audience for your research?).
    The reason procedural and "linear" programming works in the real world is because it mimics the operation of the digital computer itself (fetch, execute) and that concept and tools are well understood. Until that underyling structure is changed, there is no reason to switch away.

  26. OT: Thank You! by JediTrainer · · Score: 1

    Was having a tough day. Just wanted to say thank you for bringing a smile to my face with that post. It was beautiful!

    --

    You can accomplish anything you set your mind to. The impossible just takes a little longer.
  27. Some Natural language programming examples: by Anonymous Coward · · Score: 0

    It was the best of for loops and the worst of for loops.

    Letz get some spreadsheetz up in this hizzy.

    Now is the time for all good men to come to the aid of this malloc.

  28. I don't quite see the point by Anonymous Coward · · Score: 1, Interesting

    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.

  29. What is the PURPOSE of natural language? by Anonymous Coward · · Score: 3, Insightful

    IMO it's nothing more than a better way to introduce *newbies* into programming.

    Would would any programming want to code in english? To me this:

    myvar++

    makes more sense than:

    increase the variable myvar by one please

    Do we really want people who can't understand something as simple as "myvar++" to be programming in the first place? Seems to me we NEED a barrier to entry. There're enough lousy programmers out there already.

    1. Re:What is the PURPOSE of natural language? by Anonymous Coward · · Score: 0

      "Increment myvar". Nice and simple, and a little closer to the intended meaning than what is actually happening. That line is really "post-incremenet myvar", when most people don't care how it's incremented. This is one particular case where the plain english is clearer than the code.

    2. Re:What is the PURPOSE of natural language? by Blakey+Rat · · Score: 1

      myvar ++;

      and

      Increase the variable myvar by one please.

      are not equilivant statements, BTW. Although if myvar happens to be an int, they could be.

      An equilivant english statement would be "increment myvar" which is admittedly longer to type, but not nearly as bad as your example. (And to extend your example, yes, you'd expect people to know what "increment" means. Which, apparently, you're still foggy about.)

    3. Re:What is the PURPOSE of natural language? by VocabularyNazi · · Score: 0
      There're enough lousy programmers out there already.


      man i'll say. look at the shit that comes outta that one company from redmond, washington. i think they call themselves Microsoft.
      --
      I will not be using Plan 9 in the creation of weapons of mass destruction to be used by nations other than the US.
  30. The problem is by Anonymous Coward · · Score: 2, Insightful

    It isn't that there aren't any languages that follow these principles coming out; lots of them are. It's just that the only languages that have become popular ignore these principles.

    The fact is that people don't care what's academically sound, or what people have "proven" is the best way to do things. In fact, the things people do care about are directly contradictory with what's academically "best". It isn't some kind of head-slapping coincidence that the new popular languages ignore "natural programming". It's the market speaking, and it's saying "we don't want natural programming languages".

  31. How about this... by HexaByte · · Score: 1

    We develop a computer with voice interaction designed to write user programs. It will of course require superior programers who will have to be paid millions, since they are working themselves out of a job, but then again, aren't we all working ourselves - or someone else - out of a job by helping the automation revolution?

    How may typing pool people have we put out of work with the word processor? The list goes on....

    --
    HexaByte - he's a square and a half!
    1. Re:How about this... by Fortran+IV · · Score: 1

      How may typing pool people have we put out of work...

      I'm guessing that you didn't come from the typing pool... ;-)

      It never fails to amaze me how many typos show up in Slashdot, where so many users are in a line of work where a single dropped character can mean hours of hair-tearing frustration.

      Maybe it's just that people skip the preview when they hear their boss coming up behind them...
      --
      I figure by 2030 or so my 6-digit UID will be something to brag about.
    2. Re:How about this... by HexaByte · · Score: 1

      Maybe it's just that people skip the preview when they hear their boss coming up behind them..

      Hey! Your not the company spy, are you? How did you know...

      --
      HexaByte - he's a square and a half!
  32. from the =-NE-== dept. by Merlin42 · · Score: 1

    OK I'm not up on natural language parsing, so what does:
    =-NE-==
    Mean?

    1. Re:from the =-NE-== dept. by Vaevictis666 · · Score: 1

      = NE ==

      = (the assignment operator) is not equal to == (the boolean equality operator)

    2. Re:from the =-NE-== dept. by Anonymous+Brave+Guy · · Score: 1

      It's a pun on programming languages.

      Some use the symbol = for equality, as in a=b is true if a and b are equal. Others use = for assignment to change a variable's value, and so use == for equality, so the above test would become a==b.

      The -NE- is a dig at FORTRAN programmers, I assume. (NE = not equal.)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    3. Re:from the =-NE-== dept. by Merlin42 · · Score: 1

      In fortran77 "not equal" is .NE.
      In fortran90 they added /= which was a common extension to 77

    4. Re:from the =-NE-== dept. by Anonymous+Brave+Guy · · Score: 1
      In fortran77 "not equal" is .NE.

      Indeed. I couldn't think of any other language that used <symbol>NE<symbol> for unequality, so I figured they got the punctuation mixed up. :-)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  33. on a bumper sticker by devphil · · Score: 5, Funny


    YOU FORTH LOVE IF HONK THEN

    And here's some filler text to compensate for /.'s sucktacular lameness filter. Blah blah blah. "It won't be any more frightening than the time I climbed up an elevator shaft with my teeth," said Sunny.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
    1. Re:on a bumper sticker by Anonymous Coward · · Score: 0
      And here's some filler text to compensate for /.'s sucktacular lameness filter.

      address injure effluvia zionism hibernate florentine pollock ribose stephanie airdrop crook dabble jitterbug alai babyhood binomial spaghetti pushout curtail judge sling tenacity constructor garibaldi visage cancelling

      (more spam poetry for you!)

    2. Re:on a bumper sticker by jejones · · Score: 1

      I prefer

      (love algol 68 | honk)

      thanks.

    3. Re:on a bumper sticker by Anonymous Coward · · Score: 1, Informative

      (you love c) ? honk : void;

    4. Re:on a bumper sticker by the+quick+brown+fox · · Score: 2
      honk if you.love ruby

      ;)

    5. Re:on a bumper sticker by lilmouse · · Score: 1

      Yeah, even

      honk if you->love(perl);

      Or,

      if you->love(perl) { honk() };

      Or,

      too_many_ways_to_do(it)?cry():honk() or die "No car, you insensitive clod!\n";

    6. Re:on a bumper sticker by Anonymous Coward · · Score: 0

      You do know that that way of arranging words in a sentence is how many natural languages actually work ?

    7. Re:on a bumper sticker by Anonymous Coward · · Score: 0
      (if
      (love you lisp)
      honk)
    8. Re:on a bumper sticker by Anonymous Coward · · Score: 0

      A 'love' operator? That in the latest RFC or something?

    9. Re:on a bumper sticker by maxwell+demon · · Score: 1

      And those who don't love C just have to compile with -Dlove=hate to get the desired effect.

      (Well, assuming you fix the errors in the code, of course)

      --
      The Tao of math: The numbers you can count are not the real numbers.
    10. Re:on a bumper sticker by notamac · · Score: 1

      No, you're not mistaken... there is no love in C.

  34. Wow. by cbiffle · · Score: 4, Insightful

    Well, I'm not sure if it's that nobody read the article, or if nobody actually understood it, but.

    We've had a lot of posts about "OH NO! COBOL!" Yes, yes, I agree with you -- pretending to be English usually results in awkward and unnatural syntaxes. One of the advantages of a formal syntax like most programming languages is that it clicks the brain into a different mode. (How many of you can read sigs like 2b||~2b? I thought so.)

    But that's not really the paper's main aim. It makes a couple of notes that all of us, particularly those of us in language design, could benefit from.

    1. People tend to deal with collections in the aggregate far more often than they step through them an item at a time. The example given was "set the nectar of all the flowers to 0." Look past the syntax for a moment and look at how simple that is.

    2. Debugging the traditional way sucks. Did anyone actually read that bit at the end about the 'Why?' questions, and look at the screenshots? Holy crap. That's really impressive.

    Of course, I may be biased, because the points made in the article are basically the same that underlie a language I'm currently designing. :-) (And no, I'm not using Englishy COBOL syntax.)

    1. Re:Wow. by cristipp · · Score: 1

      1. People tend to deal with collections in the aggregate far more often than they step through them an item at a time. The example given was "set the nectar of all the flowers to 0." Look past the syntax for a moment and look at how simple that is.

      looking past the syntax:
      (map (lambda (x) (set-nectar x 0)) flowers)

    2. Re:Wow. by Anonymous Coward · · Score: 0


      perl:

      map { $_->nectar = 0; } @flower_refs;

    3. Re:Wow. by kwn · · Score: 1

      Thanks, I think you hit it on the head. People are caught up in "Coding in English" while there are some really insightful observations being missed.

      I would also point out that this seems a pretty arbitrary place and time to draw a line in the sand on how much more natural programming should become. What we do now is obviously more natural than machine code and don't see anyone demanding that we code in ones and zeros.

    4. Re:Wow. by Anonymous Coward · · Score: 0

      Yes. It think their work is important and quite impressive. Especially the debugging part which is spot on: traditional debugging really sucks.

      I read the article but I didn't have the time to read their original papers, but here is the questions that came to my mind:

      1. Programming languages like C is close to the machine code formalism that most computers are based on. To be able to this underlying structure to it's fullest, one wants the programming language to be sufficiently precise. The reason why these kinds of languages are still going strong is because programmers needs this kind of control and performance. If they didn't, C would naturally loose it's purpose. To an extent we are going in this direction.

      2. What kind of problems did the subjects get to solve? My thoughts is that: a) a complex program would be complicated to construct with their systems. b) Their "hand" of variables and code sounds a bit lika global variables, this is not a good solution for larger systems. c) What age where the children that participated in the test? Abstract thinking is something that is developed very late, perhaps not until about 14-15 years of age. If the subjects are younger than this, it isn't surprising that they find a more natural language easier to use. However, formalisms are useful nevertheless.

    5. Re:Wow. by Anonymous Coward · · Score: 0

      bwhaahha perl wins.

      lisp twists my mind to read though, it's the sorbet of the programmer's banquet, so to speak.

      python:
      [0 for x in nectar]

    6. Re:Wow. by jnana · · Score: 1
      Python is much simpler:

      [flower.nectar = 0 for flower in flowers]
    7. Re:Wow. by jnana · · Score: 1
      Oops, that's wrong of course.

      Should have done the obvious:

      for flower in flowers: flower.nectar = 0

      Maybe the articles wrong, or maybe it's just been a long time since I've done any Python.

    8. Re:Wow. by cristipp · · Score: 1

      lisp is the oldest :-) reinventing 40 years old constructs 40 does not strike me as particularly innovative.

    9. Re:Wow. by mc6809e · · Score: 1

      Of course, I may be biased, because the points made in the article are basically the same that underlie a language I'm currently designing. :-)

      Well, let's hear more about it. Do you have a link?

  35. Do any languages support Natural Language? by Bill,+Shooter+of+Bul · · Score: 1

    Usually new concepts spawn new programming languages. Then after the concept has been proven, the features are hacked into other existing languages. Like Objects and SmallTalk. And the like. There are plenty of expiramental languages out there. If it really is a good idea, create a new language around it. If its such a fundemental change, then it couldn't be dropped in to a production quality language. No one would have the skills to use it, and everyone would switch to a competing language product, especially risk adverse managers.

    --
    Well.. maybe. Or Maybe not. But Definitely not sort of.
  36. set the nectar of all flowers to 0??? by dmorin · · Score: 1
    In my experience the problem has always been that no one can really agree on limits to what a natural language should be able to do. Take the example in the subject, from the document -- "set the nectar of all flowers to 0". Fine, it's "more natural" than something like
    for (int i =0; i < flowers.length; i++) { flowers[i].setNectar(0); } or something like that.

    But wouldn't the most natural way be to say something like "no flowers have nectar"? This gets into a completely different level of parsing. In that statement you need to understand the logical set that is established (none of the set of all flowers) and that, although there is an attribute "nectar" that all flowers have, it is a quantity that starts with a zero value. You might even have started by saying "all flowers can have nectar" to setup the example.

    1. Re:set the nectar of all flowers to 0??? by bogado · · Score: 1

      Many languages have a more natural form :

      foreach( flower in flowers) do { flower.setNectar(0); }

      --
      []'s Victor Bogado da Silva Lins

      ^[:wq

    2. Re:set the nectar of all flowers to 0??? by Anonymous+Brave+Guy · · Score: 1

      I'd rather read something like

      apply (set_nectar 0) flowers

      Assuming a suitable functional-style language where it's well-defined, this is a clear and concise instruction, unlike the example phrase.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    3. Re:set the nectar of all flowers to 0??? by Anonymous Coward · · Score: 0

      Your post just generated a good anecdote. The way you worded that phrase, "no flowers have nectar", made me immediately think "He's asking the knowledgebase," instead of "He's making a statement." Thus the answer "false" came up without me even really thinking about it. It was only on the second reading that I realized you wanted a flowers.each { |a| a.nectar = 0 }.

      As others have said, language affects the way we think. Programming languages do make us think in more structured ways, rather than in the ambiguous ways of natural language, and that's a good thing. It's fine if people want natural language programming, but I don't think it can replace a real programming language.

    4. Re:set the nectar of all flowers to 0??? by Anonymous Coward · · Score: 0
      Since we're all taking a swing at this, here's my question:

      What does it mean to "set" a "nectar" to "0"?
      I've seen nectar, but I've never seen a zero.

      The semantics, in other words, are not consistent. I don't say that they can't be improved, but as an example of a natural expression this one starts out leaving something to be desired. And that, to me, suggests that basic premise of this work needs to be examined more critically.
    5. Re:set the nectar of all flowers to 0??? by 2901 · · Score: 1

      CMU Common Lisp 18d

      ; flowers have nectar
      ; initially a random amount of nectar
      (defclass flower ()
      ((nectar :accessor nectar :initform (random 10))))

      ; make a list of three flowers
      (defvar flowers (loop repeat 3 collect (make-instance 'flower)))

      ; add an extra method to the generic function `nectar'
      ; for lists of flowers
      (defmethod nectar ((flowers list))
      (mapcar (function nectar) flowers))

      ; so we can see how much nectar our flowers have
      (nectar flowers) => (8 9 2)

      ; add a setter method to the generic function
      (defmethod (setf nectar) (amount (flowers list))
      (dolist (bloom flowers)
      (setf (nectar bloom) amount)))

      ; then we can set the amount of nectar in all
      ; the flowers in our list like this
      (setf (nectar flowers) 0)

      ; and indeed
      (nectar flowers) => (0 0 0)

      Compare what the researchers want

      set the nectar of all flowers to 0

      with what Common Lisp has offered since 1990

      (setf (nectar flowers) 0)

      They should be taking advantage of existing languages, not inventing new ones.

  37. Positive Example(s)? by BaldingByMicrosoft · · Score: 1

    The article seems to focus on what current, popular languages are -not- doing. What are some examples of languages that use this research?

  38. Applescript by unknown51a · · Score: 0

    Applescript is almost natural language... so why do I find it harder to use than C?

    --
    I had an imaginary sig once, he said I was a loser and ran off.
    1. Re:Applescript by MoneyT · · Score: 4, Interesting
      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.
      --
      T Money
      World Domination with a plastic spoon since 1984
    2. Re:Applescript by ampathee · · Score: 2, Funny

      God that reminds me of the old "guess the command" puzzles in old text-adventures.

      One of the wall panels sounds hollow.
      > PUSH PANEL
      You can't do that.
      > TAP PANEL
      You can't do that.
      > PRESS PANEL
      Nothing happens
      . ..(much typing, and thesaurusing) ..
      > CARESS PANEL
      The panel slides open.

      I hope NL Programming wouldn't be bringing back that sort of thing..

    3. Re:Applescript by Marvin_OScribbley · · Score: 1

      The sage says: Hand Runesword to me.
      >give runesword to sage
      You attempt to give the runesword to the sage.
      The runesword flies from your hand, spins around in the air
      and moans with the anticipation of the kill. The sage looks at
      you and says 'You should have handed me the runesword not attempted
      to give it to me. The sword is more evil than you or me could ever
      be. You have errored and now I have to pay the price.
      The runesword plunges deep into the heart of the sage and they
      are both lost in a firey explosion.

      --
      I'm not a journalist, but I play one on slashdot
  39. Deterministic vs. nondeterministic by Just+Some+Guy · · Score: 2, Insightful
    The current crop of computers is based on series of logical operations, and there is little in common between discrete logic and the Real World. Most programming languages bear a strong resemblance to mathematical notation, and that's not just coincidental.

    The real problem is a lack of strong domain models for most real world situations. That is, if you're starting a project to emulate something happening outside of a computer, then there's a very large likelihood that you're going to have to build your own object model to describe the situation to the desired level of accuracy. Once you have that model, it's easy enough to say "do this until that happens", but there's a world of difference between that point and staring at a blank screen at the beginning of a project.

    There's been some progress (depending on who you ask) to make this easier for those who aren't full-time programmers, such as UML and related design tools, but even these are mainly limited to building a high-level template of the final result so that a human can manually implement all of the details.

    This may or may not be avoidable. Vernon Vinge (author and CompSci professor) refers to the "Age of Failed Dreams" where humans eventually concede that some things just aren't possible. Expecting a current deterministic Turing device to be programmable at the level where people interact with each other may very likely be one of those areas.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Deterministic vs. nondeterministic by Eternally+optimistic · · Score: 1

      Lets look at this part : "..at the level where people interact with each other..."

      this part often doesnt work very well. I think the problem is not with the language used, it is with people. They don't know what they want, at least not precisely. How does it help to program in english, or in chinese, if you don't know what you want to do? On top of this, often what people want to do is the wrong thing to solve the problem they are facing.

      Plus, as has been pointed out before, we have enough amateurs fscking things up as it is.

      --
      What keeps me going is my inertia.
  40. Brad Cox spoke at RubyConf 2004... by tcopeland · · Score: 1

    ...a torrent of all the presentations is here.

    Anyway, he had some interesting things to say about micropayments; a summary of his talk is at the bottom of the page in Jim Weirich's blog here.

  41. Lisp is natural by amightywind · · Score: 1

    For economy you cannot beat:

    (eq? a b)
    --
    an ill wind that blows no good
    1. Re:Lisp is natural by Pxtl · · Score: 1

      Yep. Lisp - because assembler was too easy to understand.

      I'll admit that the consistency of syntax is wonderful, but that's no excuse for
      a) not having any built-in facility for BEDMAS-calculation. Some sort of standard macro for that is sorely lacking, and if its there, then the tutorial writers have to stop ignoring it - its absense is one of the language's biggest failings.
      b) totally obtuse keywords. Yes, you learn what car and cdr mean pretty fast, but they're only the beggining of Lisp's obfuscated acronyms.
      c) blocks-as-lists is a nifty feature, but some visual way to distinguish them on screen would be really, really nice.

      And guess what? You know all those people who plan on re-making Lisp to fix these problems? Every one I've heard from keeps saying things like "I like car and cdr, I'm keeping those". Way to ignore your customers - Lisp die-hards will stick to Lisp, and new users won't touch that unintelligable mess.

    2. Re:Lisp is natural by the+morgawr · · Score: 1
      I'll admit that the consistency of syntax is wonderful, but that's no excuse for

      You're latter comments show that you don't understand what the consistency of the syntax buys you.

      > BEDMAS-calculation

      Those macros exist and have come packaged with most LISPs for a long time. The tutorial writers ignore it because it's not needed 99.999% of the time. If you are using LISP the application probably isn't a simple a simple math problem. Those macros tend to get in the way of some other common LISP programming tactics; most people don't use them.

      > totally obtuse keywords

      car and cdr can be composed e.g. caddr. The ability to do those repeated evaluations with simple syntax is generally viewed to be worth the learning curve. Gernerally though, the standard libraries that come with LISP are far too verbose and obtuse.

      > blocks-as-lists is a nifty feature

      You bet. It makes macros and other niffty features possible. You can't distinguish between them and still have LISP, it's the basis of the entire language. Just like in natural language when you want it to get the meaning you just put the list e.g. "(+ 1 2)" will get 3 and when you want it to take litteral what you mean you quote it e.g. "'(+ 1 2)" gets you (+ 1 2). Yeah it's strange but as soon as you get rid of the ability for them to be the same you break the symetry of the language that makes it powerful.

      --
      The policy of the United States is worse than bad---it is insane. -- Ludwig von Mises, Economic Policy(1959)
    3. Re:Lisp is natural by amightywind · · Score: 1

      a) not having any built-in facility for BEDMAS-calculation. Some sort of standard macro for that is sorely lacking, and if its there, then the tutorial writers have to stop ignoring it - its absense is one of the language's biggest failings. b) totally obtuse keywords. Yes, you learn what car and cdr mean pretty fast, but they're only the beggining of Lisp's obfuscated acronyms. c) blocks-as-lists is a nifty feature, but some visual way to distinguish them on screen would be really, really nice.

      1. What is BEDMAS? Infix notation? That wouldn't be the lisp way.
      2. I agree about obtuse keywords: static, void, volatile, mutable,... are so much more intuitive than let or lambda. If you don't like the economical car and cdr try:
        (define first car)
        (define rest cdr)
      3. What are "blocks as lists"?

      If you compare Lisp (or Scheme) feature for feature with other languages you find other languages sorely lacking.

      --
      an ill wind that blows no good
    4. Re:Lisp is natural by Pxtl · · Score: 1

      1) I realise that Lisp's simplicity of syntax is the core source of its power. It is a feature I often pine for in the overcomplex and inconsistent languages like C++, Python, and Perl. But still, people spend decades of their lives thinking in infix, and frankly I've heard old-guard Lisp coders bitch about the pain of doing computation without infix - to my mind, that meanst that infix-conversion macros are either underdeveloped or unkown. Computers do computing very often, and the prefix computation is one of those thign that I have seen turn off many people curious about Lisp. It happens.

      I just wish that one could optionally use {} brackets or something, purely as a commenting syntax or something.

      The fact is that

      foo = 5

      is much more legible than

      (let bar 5)

      Lisp is just far too orthogonal to the languages that humans grow up with. Yes, its very very powerful - I know the beauty of metaprogramming (I do strange strange things in Python and hate the the cruftiness of the language in that field). No language will ever gain any real popularity without being at least reasonably human-readable. Coders are very fickle, visual people. Even C still uses familiar mathematical infix notation. Notice that C++'s most powerful feature that actually makes it not a pathetic joke of an OOP language, templates, are by-and-larged shunned by many programmers just because using as brackets is "ugly".

      Lisp is uglier.

    5. Re:Lisp is natural by pkhuong · · Score: 1

      a) Infix? Because we all know that familiarity makes right. COBOL, is that you? Precedence is messy, and we all know how to disambiguate: parens. The only time it could be a disadvantage is when you are copying a formula. Even then it only means that you must assimilate the formula instead of mindlessly typing it (usually a Good Thing, especially with "special" numeric towers). But then, I also prefer RPN.

      b) First/rest, etc. But those are the only ones i can think of in common use. When you get to low-level stuff like handling individual bits or bytes, you get a nice taste of PDP assembly mnemonics, but that's it. The p-convention is pretty clear. PROGN? PROG -> a block (a program), N -> return the nth (last) value). Prefix something with n -> it's destructive. Postfix with f -> it works with places (usually meaning it side-effects). I suppose */&, ++/--, unary_-, ^, >, += (et al), camelCaseClasses/NotCamelCaseClasses/reallybadclas ses (Java...) are all much more intuitive. In the end, things like that don't really affect the learning curve that much, especially with the CLHS's concept dictionaries and the fact that most of the more obscure ones aren't needed very often. And, a more important point, apart from certain particularly abusive cases (mostly graphics apps, imho), the learning curve doesn't matter as much as the usage. I wouldn't recommend choosing languages based on how easy they are to learn in the first minutes. One might as well stick to recorded macros in that case.

      c) It's called indentation. C-M-q, or something else in your favourite editor. What's nice about it is that, when lines get too long you can simply put a new line where you want. The indenting rules are clear and regular enough that it'll still work fine. I find it is much simpler for me to arrange sexps as I like, instead of having to indent even extremely small ones. It also means that even when indentation is ambiguous (badly formatted code, use of tabs, different views on what is important), you can re-indent it with your editor or reshape the lines a bit to put in evidence what you think is important. Plus, parsing sexp is so easy that building another way of expliciting scope is easy. In fact, that was my first foray into real emacs scripting.

      http://www.pvk.ca/misc/misc.jpg (a screenshot of the script, used on itself)
      http://www.pvk.ca/misc/spectrum-density.J PG (to show the size of the possible colour/saturation[not exactly the right word, but i carries the meaning alright] - the bottleneck is with my eyes)

      I don't use it, because I don't need it, but it was a nice experiment. Arguments further right go further in the reg-green-blue spectrum, and deeper sexps are more saturated.

      d) Lisp is more than 2.5 times as old as me. How can I be a "Lisp die-hard [who] sticks to Lisp", and not a new user? Guess what, most of us have been virgin new users once too. If you can't see past car/cdr, see b).

      --
      Try Corewar @ www.koth.org - rec.games.corewar
    6. Re:Lisp is natural by voodoo1man · · Score: 1

      I think the real problem is with people who can't be bothered to search the web for 5 minutes before opening their mouth to demonstrate their ignorance, because guess what? You know all those people who designed Common Lisp? Well, many of them went on to design a nice, clean infix Lisp, 10 years ago. Anyone who knows about Dylan and still complains about Lisp's syntax is just trolling.

      --

      In the great CONS chain of life, you can either be the CAR or be in the CDR.

  42. You mean people write code? by RandoX · · Score: 1

    I thought it was some kind of Code Gnome(tm) that only came out at night.

    We used to leave a case of Mountain Dew out for them in the computer labs in college.

  43. Non-natural-language definitely has its place by Anonymous Coward · · Score: 0

    The most prominent example of non-natural language is mathematics. In the old days, mathematicians actually used to write math in words, and the result was very long manuscripts. But today it's virtually impossible to do anything without invoking notation and terminology that often seems cryptic to outsider.

    Natural language might be useful if you want, say, your user to be able to script your application to perform simple tasks. But when precision and domain-specific functinality is needed, it's best to use a notation designed for that purpose.

  44. I have a paper on this by CrazyJim1 · · Score: 0

    Basically you get a 3d imagination space in the computer, and a camera system that can assimilate objects from reality into imagination space.

    Then suddenly, you go can go all Zork in describing items. I don't see it happenining for at least 15 years though. Computer vision recognition is really in its infancy.
    More AI stuff:
    www.geocities.com/James_Sager2

    God spoke to me:
    www.geocities.com/James_Sager_PA

  45. Blatant! by Anonymous Coward · · Score: 0

    That has got to be one of the most blatant karma-whoring attempts I've seen ever.

    1) Search google for the wrong term, because you don't even understand the summary. (RTFA? Not a chance.)

    2) Post the first result not obviously a business

    3) Karma!

    NOT.

  46. Natural Language?!?! by Phixxr · · Score: 1
    Natural language(especially english) isn't structured enough to handle the rigors of team-programming and code re-use.

    In my estimation, the closer programming languages get to math, the better off we'll be.

    It doesn't need to be easy to write, it needs to be easy to read later.

    -Phixxr

    --
    ungggghhhh
  47. Is this a good idea? by hugesmile · · Score: 4, Insightful
    It seems that the effort here is to allow end users to state their "problem" in natural language, and then a program gets generated to solve their problem.

    Right now that happens - only the program gets generated by programmers (sometimes outsourced to India!)

    Unfortunately, what the user says they want, and what they really want are usually very different things. Natural Language Programming really doesn't solve that problem.

    The critical piece is the Designer, who sits between the end user and the programmer, and asks the tough questions: "Do you really want that? Let me explain the implications of what you just asked for." "How critical is that piece of functionality that you just added on a whim, but it just added 3 years to the project plan?" "You're asking for the data to be selected this way, but really there's no use for that - have you considered selecting the data this other way?" etc.

    1. Re:Is this a good idea? by Taladar · · Score: 5, Insightful

      The difficult thing with programming isn't usually the syntax but the fact that most people can't cope with the computer doing exactly what they tell it to do.

    2. Re:Is this a good idea? by DarkMantle · · Score: 1
      the idea behind Natural language programming is much closer to

      If
      Natural Language is not making its way into Programming
      Then
      Programming should make its way into Natural Language
      Else
      Continue
      Only in natural language it'd be more like
      If some english statement that doesn't need == or () in it
      tell it in english to "find the square root of PI" as opposed to "sqrt(PI)"
      Natual language programming will not happen in my lifetime (and I'm only 24) which is good. It's hard enough to find a programming job as it is.
      --
      DarkMantle I been bored, so I started a blog.
    3. Re:Is this a good idea? by Raffaello · · Score: 1

      Natual language programming will not happen in my lifetime (and I'm only 24) which is good. It's hard enough to find a programming job as it is.

      And this, of course, is the root of all the nay saying. If you are a professional in a field other than programming (doctor, lawyer, chemist, geologist, etc., etc.), and you you need software solutions, then it is obvious that natural language programming would be a big win. Nevertheless, it will be fought tooth and nail by programmers because they don't want to be replaced by the machines they are used to controlling.

      Ironic, since programmers have been in the business of helping machines put people out of jobs since programming first began. What goes around, comes around. Did we really think that we, as programmers, would be exempt?

    4. Re:Is this a good idea? by MHobbit · · Score: 1

      Exactly. Well said.

      --
      Debugging? Klingons do not debug. Bugs are good for building character in the user.
    5. Re:Is this a good idea? by Ba3r · · Score: 1

      to be more exact, a computer is incapable of understanding 'Context' as a human does, and the average layman or VB programmer is unable to frame a logical set of instructions without Assuming the computer understands context.

      Which, is the techincal version of your statement: "people can't cope with computers doing exactly what they tell it to [when they don't realize that they were actually implying a whole host of things, but unfortunately these were stuffed into the context of a carbon-based life form living on the 3rd planet.. etc]"

    6. Re:Is this a good idea? by Retric · · Score: 1

      As a 24 year old programmer I don't mind saying Natual language programming will not show up in my lifetime. For a geologist to use Natual language to program a solution for him it's going to take an AI that understands the context of the problem thus puting both me and the geologist out of a job...

    7. Re:Is this a good idea? by Erik+Hollensbe · · Score: 3, Insightful

      AppleScript is a pretty decent example of how this works well - it's close enough, in fact a little to far for my taste... often finding the "right words" becomes a chore.

      example:

      set bDmg to true
      display dialog "Compress DMG?" buttons {"Yes", "No"} default button 2

      if the button returned of the result is "Yes" then
      set sDmgFormat to " -format UDZO "
      else
      set sDmgFormat to " -format UDRW "
      end if

      From a script I use to build .dmg files.

    8. Re:Is this a good idea? by Trejkaz · · Score: 1

      Easy enough. Let's just define the "Natural Language" is Lojban. Computers can parse that unambiguously...

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    9. Re:Is this a good idea? by TheRagingTowel · · Score: 1, Interesting

      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"

      --
      4Z5TX
    10. Re:Is this a good idea? by Discotechnica · · Score: 1

      some more info here

      here is wikipedia in Lojban

    11. Re:Is this a good idea? by ninejaguar · · Score: 1
      The critical piece is the Designer, who sits between the end user and the programmer, and asks the tough questions: "Do you really want that? Let me explain the implications of what you just asked for."

      I agree with the general idea you've broached. However, most often the failure point in a project and its most difficult aspect isn't the designing process.

      It's what comes before the design during the requirements gathering phase where most projects fail. A good Business Analyst can make or break a project. Someone who can thoroughly gather and document only the necessary aspects of a client's business and clarify it with a model for the technical team (including the Designer, Systems Analyst and Architect) is a rare bird.

      Someone who can take an existing business model, and extend it to include currently non-existing processes without mistakes, helping the Designer avoid introducing bugs in the proposed system, is coming close to rumor. This is one of the main reasons why the majority of the larger projects fail. There are other reasons, but you'll find even most of those are dependent on this one.

      = 9J =

    12. Re:Is this a good idea? by Anonymous Coward · · Score: 0

      Well...well, look. I already told you: I deal with the god damn customers so the engineers don't have to. I have people skills! I am good at dealing with people! Can't you understand that? What the hell is wrong with you people?

      --Tom Smykowski

    13. Re:Is this a good idea? by BeannieBrewer · · Score: 0

      Amen! Users "natural language" have a lot of imbeguities and implied meaning. Programmers have to take what's given them and make the computers do what is said, not implied. I'm working for a company that does not yet get this concept. We need a designer. The folks upstairs take this as an insult rather than seeing it as a timesaving step.

      --
      Thanks, Beannie
    14. Re:Is this a good idea? by Anonymous Coward · · Score: 0

      So then what's needed is a more exact way to tell a computer what you want it to do!

      We'll start by trading off some natural language for some delimiters, like {}.....

  48. AppleScript, anyone? by Sathamoth · · Score: 0, Redundant

    Have anyone tried AppleScript? It's very close-to-natural scripting language, and personally, I think it's awful. For me it's much easier to write things in PHP, Perl or Java than in "human speakable" AppleScript.

    1. Re:AppleScript, anyone? by philge · · Score: 3, Insightful

      There are two main features of applescript. 1) The english like syntax 2) the ability to control other applications Of the two the second is by far the most important. But to gether they create a new programming experience. Because most of the complexity is sequestered in the applications you are comtrolling the applescript code tends to be very short. On average I would say my applescripts are about 30 lines with only 5 - 10 lines of working code the rest is error catching and handleing. Because of the syntax it is very easy to read the code moths or years later. Also the having short code helps. BUT the most important thisis tha becasue the code is sort YOU CAN START AGAIN. How much code is kludged because no one wants to rip out and recode 1000 or more lines of code? There is a real benefit in short code that you can read

    2. Re:AppleScript, anyone? by rduke15 · · Score: 1

      BUT the most important thisis tha becasue the code is sort

      I can understand that you prefer the code to be short and that you find longer code you wrote difficult to read... :-)

  49. English and Computer Language dont Mix Well. by jellomizer · · Score: 3, Interesting

    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.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    1. Re:English and Computer Language dont Mix Well. by Anonymous Coward · · Score: 0
      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.

      I think the point is that with a true NLP, you don't deal with "nested lists (of numbers)." You see, the nested lists aren't what you're dealing with. *Why* do you have a nested list? *What* are you trying to accomplish with it? Deal with it on that level. There's a reason we don't have a good way of dealing with nested lists of numbers in english - we never deal with them. They're not important - what's important is the meaning behind them, and *that's* what we have an extensive vocabulary to discuss.

      Abstract up a level. Your argument is like an assembly programmer saying that C++ & Java don't have an adequate way of dealing with register allocation. That's true, but you don't *have* to deal with register allocation in Java. Same with NLP. You don't have a good way to deal with nested list. But the problem can be constructed without having to deal with nested lists - the nested lists are an implementation detail.

      Say we have a nested list (2,4,(0,3,1),(2,1)) that represents number of children. With NLP you don't say "A list ... with sublist ..." You would say something like "Omnicorp employs Alice, Bob, Chuck and Dave. Alice has 2 children. Bob has 4. Chuck has no children from his first marrage, 3 from his second, and one from his third. Dave has 2 from his first and one from his second." Or better yet, structure the program so the nested list doesn't even enter into it.

      One reason COBOL failed is that it was trying to force non-NLP thinking into a NLP syntax. You've probably seen the verbose way of saying x = 2+3 in COBOL. The trick with NLP is not saying "PLUS" instead of "+", but specifying why you need the addition in the first place.

  50. Think? by Anonymous Coward · · Score: 0

    we have been working to create programming languages and environments that are more natural, or closer to the way people think about their tasks.

    Um, this mistakenly assumes that most workers think.

  51. What is natural language? by drgonzo59 · · Score: 2, Insightful

    It is a matter of habit and training. I am used to think in terms of objects so any object oriented language is "natural language" for me. When I solve a problem I think of objects, methods, properties and how they work together. I don't have to translate from some abstract "natural" concepts to OO concepts. I am sure someone who is using lisp will see lists and functions in the same problem that I see objects and methods.
    I understand that the goal is to have the user just tell the computer what to do in English. The problem is that English is not precise and is too ambiguous. I don't know if I would want to fly on an airpline if I knew the computer on board was programmed in English.

    1. Re:What is natural language? by Anonymous Coward · · Score: 0
      I don't know if I would want to fly on an airpline if I knew the computer on board was programmed in English.

      The same could have been said for HLL at the time. I'm sure the assembly wonks were looking at C programs and saying "C's not precise - there's no control over where variables and instructions are put. The programmers don't even need to know what processor the program is running on! I wouldn't fly on a plane if I knew the computer was programmed in C." Although english can be ambiguous (BTW, so can C - it doesn't cease to be ambiguous just because the compiler writer arbitrarily picked an alternative) I doubt any ambiguity will be left after the program is debugged. (What? You were implicitly comparing a debugged C program with a non-deugged English program? Tsk, Tsk.)

    2. Re:What is natural language? by FangVT · · Score: 1

      I understand that the goal is to have the user just tell the computer what to do in English.

      And if you had read the article you would not understand any such thing.

      The goal is to determine the natural steps and abstractions that people without any programming training use to solve problems, then to make programming languages that support those sorts of steps and abstractions.

      Where the work cited in the article fails, in my limited opinion, is that the example problems they are working with are much too simple. The types of tools that they discuss, I fear, will prove too hard to write in a way that works with complex problems. I hope I'm wrong in this. Perhaps the sorts of work they're doing will prove feasible within specific problem domains and we'll end up with an array of limited domain tools that handle the bulk of programming needs, but we still use old line tools like C and Java for more esoteric work.

  52. They're just not thinking hard enough? by t_allardyce · · Score: 1

    OOP was ment to let people program like they think but people never really bothered with it. With object inheritence you can layer everything right down to the simplest easy-to-program interface without a performance hit. The problem is people think messy and that leads to bad code. Even worse, people don't even think tidy enough to modularise/class/layer anything so you have bad code with no structure (good structure with bad code is ok because you can just swap out bad modules/functions with good ones). I think PHP has come far as a natural language and its managed to not be too slow and bloated. C++ with C is also good because you can skip the bullshit for most things (eg string = string + string + number) and when you have a tight loop or bottleneck you can use C to optimise it with some hackery. Do you really need anything else?

    --
    This comment does not represent the views or opinions of the user.
  53. Shakespeare Programming Language by thundercatslair · · Score: 1
  54. "Goal oriented" computing by Anonymous Coward · · Score: 0

    Having RTFA, I see the point that a program that's easier to follow is nice. It appears to be a call for more "goal oriented" programming--rather than writing "Set y=0. For each x, compare x to stored value y. If x>y, then y=x. If x= y, next y", you'd instead write "find greatest x." Simpler, and avoids bogging down in the mechanics of HOW to find the greatest value, focus on WHAT needs to happen, and presumably the complier takes care of the rest.

    The only problem here is that I see is that, if you leave the mechanics in the background, you'll do a few things.

    First, you'll produce a generation of programmers who lack the nuts-and-bolts fundementals of how to do things. And please, no "yeah, so when's the last time YOU write assumbly" flames--I mean simply that papering over the mechanics will lead to a loss of understanding of them.

    Second, you'll lose the ability to optimize. All the values I will ever have in my domain are short integers. How would the "find greatest x" function know this? I'd expect it would have to consider that maybe some of my x's are long doublke floating points, and allocate space based on that.

    Third, you lose control over conditions. "when event happens do action" would be great, but who defines "event." Today, this is obvious--we use flags and variable compares to determine it. If we move away from that, we'll get even MORe subtle bugs that will be even HARDER to debug--now everything LOOKS right, but the problem is with how the compiler interprets "when even happens", which is inviisble to the programmer...

  55. Not "Natural Language Programming" by The+Pim · · Score: 1
    Argh! The slashdot title completely mischaracterizes the article. The authors never use the term "natural language" at all! They call what they're talking about "natural programming", and if you read the article I hope you'll agree that it is something we should all be longing for: the ability to express ourselves in code that is close to the problem domain.

    IMO, the best direction for natural programming is embedded domain-specific languages. The best direction for natural debugging is a harder problem. It's well known that many expert programmers still find "printf" debugging the best option, which suggests to me that tracing systems are promising. Of course, powerful type systems eliminate many possible run-time bugs, but then you need a type debugger....

    --

    The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
    1. Re:Not "Natural Language Programming" by jwnichls · · Score: 1

      Agreed...the title should be changed.

      Also, Brad's name is misspelled in the description. It's "Myers" not "Meyers".

  56. NOT natural language programming by useruser · · Score: 1

    Interesting how everyone thinks the article is about Natural Language programming. The researchers say nothing about "Natural Language": they only use the word "Natural" to mean "pertaining to the constitution of a thing."

  57. Slashdot responds: by Control+Group · · Score: 0, Redundant

    "This is stupid. If you need natural language as a crutch to program, you shouldn't be programming."

    "This will open the door to everyone programming, and spell the end of Micro$oft's monopoly."

    "This will suck because performance will be crap. Just like Java. Real coders write ASM."

    "I remember when they designed FORTRAN and COBOL, so I am qualified to say that this will never work, just like those didn't."

    "This will be cool as soon as someone writes a GPL'd version of it."

    "IANASECSLOIAOWQTGAEO (I Am Not A Software Engineer, Computer Scientist, Linguist Or In Any Other Way Qualified To Give An Educated Opinion), but..."

    "Can you imagine a Beowulf cluster of natural language in Soviet Russia jokes?"

    (Me? Post flamebait? That's unpossible!)

    --

    Reality has a conservative bias: it conserves mass, energy, momentum...
  58. standard flaw in research like this by egomaniac · · Score: 2, Insightful

    Why does all research like this seem to revolve around "toy" problems? They study non-programmers or, when they include real programmers, focus only on small tasks that can be completed in an hour or so.

    Great, I accept that a new language can make toy problems easier.

    However, I think the situation is very different when you have a real programmer working on a real program. Writing a real application, like a word processor or a web browser, is difficult no matter what language you do it in -- and I would argue that the difficulty doesn't vary much between languages. In fact, I would further argue that many of these research languages, while making toy problems easier, would actually make "real" programming substiantally harder, because the semantics of the language are not as formalized and thus more difficult to remember and deal with.

    I'm certainly not opposed to advances in language theory and design -- our modern-day large applications would be essentially impossible to write if all we had to work with was machine language. But to be a major advance, a new language should focus on making real problems easier for real programmers, not making toy problems easier for non-programmers.

    --
    ZFS: because love is never having to say fsck
    1. Re:standard flaw in research like this by egomaniac · · Score: 1

      Hate replying to myself, but I should clarify: when I said that the difficulty of writing a program doesn't vary much with language, I meant among similar-level languages. The difficulty of writing a word processor in, say, C++ vs. Java isn't as different as you would expect.

      Obviously, machine code (or BrainFuck) is enough of a difference to have a real impact on difficulty, and I accept that a super-duper-high-level language could make the process substantially easier, if a suitable one existed (but it doesn't, and the research presented here isn't compelling enough to change my mind about that).

      --
      ZFS: because love is never having to say fsck
    2. Re:standard flaw in research like this by ChrisPee · · Score: 1
      Why does all research like this seem to revolve around "toy" problems? They study non-programmers or, when they include real programmers, focus only on small tasks that can be completed in an hour or so.
      IME, it is better to start a large project at the beginning, then to try and start in the middle.
    3. Re:standard flaw in research like this by myowntrueself · · Score: 1

      Yeah but I can use a very similar argument against people who want to write, for example, a windowing operating system or a word processor (for example) in assembly language... I actually know such people.

      Its really just a matter of picking the right tool for the job.

      --
      In the free world the media isn't government run; the government is media run.
  59. MOD PARENT UP by brlewis · · Score: 1

    Yes, the slashdot title completely mischaracterizes the article.

  60. except... by upside · · Score: 1

    [nitpick]
    You ought to say "put the value of b into a"
    [/nitpick]

    --
    I'm sorry if I haven't offended anyone
  61. The problem by doombob · · Score: 1

    IMHO, writing pseudocode is the easiest step in writing good code. This is where the problem solution looks the clearest and what you wrote down made sense. I don't want to write a program in natural language. If my coding could have been written in pseudocode when I was in college, I would have received more A's, and my programs would have worked. In school, they taugh something like a seven step process to coding, where pseudocode was step number three. Anyway, most people, including myself, just sat down at the command prompt and started typing away without even thinking about the problem beforehand... that leads to some bad code right there.

  62. I think in mathematics by kfg · · Score: 1

    Oddly enough, so does my computer.

    The premise of our research project is that programmers will have an easier job if their programming tasks are made more natural. By "natural," we mean "faithfully representing nature or life,"

    It seems like a natural language to me, since, even if the Pythagorians are wrong, mathematics seems to be the natural language of the universe. Using mathematics as the language to model nature was perhaps the greatest breakthrough in science. Descarte's analytic geometry in particular moved the modeling of nature forward in one giagantic leap.

    They like to call themselves computer "scientists" and "engineers," don't they? Maybe we should make sure they have the mathematical background that's supposed to go with those titles, instead of how to use a particular commercial product.

    . . . which here implies it works in the way people expect.

    People often expect some pretty unnaturally daft shit, frankly. Who was the first person to think that chicken guts modeled the behavior of their wife, and why, after trying it, did they think it actually worked? I don't want to program in chicken guts, thank you very much.

    By "natural programming" we are aiming for the language and environment to work the way that nonprogrammers expect.

    Ah! Now we're getting down to it. What they want is programming without education, the computer to be smarter than the person. Well, a computer is just a rock. It's very smart for a rock, but it's still just a rock. Ok, maybe computers are smarter than some people, but those people really shouldn't be programming. And please, someone hand them a pair of scissors and send them out jogging.

    What the hell is with this current movement that holds that education is evil and things should just be made to be worked by the ignorant?

    We've tried "natural" programming languages before. More than once. Do you know why we don't use them anymore? Because if you know what the hell you are doing they suck.

    Analytic Geometry for everybody, Ken Iverson for President and Free APL.

    KFG

  63. Some 17 years ago ... by KlaymenDK · · Score: 4, Informative
    ... Dan Winkler created HyperCard together with Bill Atkinson.
    Granted, it was by no means a fast runner, but you could write more or less plain English to it:
    go to the last card of stack "Home"
    go to black with visual effect fade to black
    go to the previous card with visual effect venetian blinds
    get the third word of line 2 of field "Slashdot"
    put it into the messagebox
    Who could possible be confied by this code?
    Notice the brilliant little keyword called "it", that you could use with "put" and "get". Neat, simple, easy!

    eulogy
    1. Re:Some 17 years ago ... by Anonymous Coward · · Score: 0

      Yes, and it was a royal pain in the ass if you wanted to use it do anything nontrivial(in a data structure/algorithm sense). Of course, it was great if you just wanted to create multimedia presentations, or slide shows or the like.

    2. Re:Some 17 years ago ... by thisgooroo · · Score: 1
      yeah, and some 40 years ago they tried it too:

      ADD A TO B GIVING C

  64. What about OOP? by mynzai · · Score: 1

    I though OOP was supposed to address the 'way we think about things' already. The paper advances nothing.

    1. Re:What about OOP? by Anonymous Coward · · Score: 0

      LOL. Object oriented programming does NOT succeed in addressing the "way we think about things," I'm sorry to inform you.

    2. Re:What about OOP? by BarryNorton · · Score: 1

      I thought Newton captured the mechanics of objects. I refuse to read any of this 'contemporary Physics'.

  65. SLASHBOL by Tablizer · · Score: 1

    Slashdot slang + COBOL: SLASHBOL

    set RTFA to read-the-fucking-article.
    if title resembles a goatse link, skip-reading.
    if joke is too good to wait, skip RTFA.
    if somebody mentions do it in reverse, insert in-soviet-russia joke.
    if somebody mentions lots of repeated things or want for more speed, insert beowulf-cluster joke.
    if somebody mentions bad patents, insert joke about patenting-bad-patents and insert "PROFIT!" into list-item numbered "3" ....

  66. Labview anyone? by Anonymous Coward · · Score: 0

    Labview is a picture orientated programming "language". It supposedly simplifies the whole program writing process. I believe this runs parallel with the idea of simplifying the programming process with "Natural" Languages.

    To me it is like playing with only the large lego blocks. It is a mission (a hack) to do realy fined grained custom stuff.

  67. Tourette's: the natural language of programmers by BrakesForElves · · Score: 2, Funny

    Programmers sit serenely, silently coding for hours at a stretch.

    Then they execute the code for the first time, see the results, and scream out SHEEEIIIIT, GODDAMN IT!!!

    Hence, to an outside observer, the natural language of programmers is indistinguishable from a case of Tourette's Syndrome.

    --
    About the word "if": If bullfrogs had wings, they wouldn't bounce around on their little green butts.
  68. Not splitting articles into pages improves my HCI by Anonymous Coward · · Score: 0

    An article about HCI *split into pages* so I have to click and wait to read through it.

    Yes, I'll sure listen to their advice.

  69. Mod parent up! by Anonymous+Brave+Guy · · Score: 1

    Finally, someone gets the point. :-)

    Programming languages that allow writing high level code using concepts close to the application domain are simply more powerful than those that force the programmer to convert between the application domain and the computational facilities of the language all the time. Some languages support writing higher level code this way much better than others, and this is where a lot of the research behind the next generation of languages should be going.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  70. Programming languages are natural by AuMatar · · Score: 1

    At least, they are for the problem space. Languages evolve to fill the problem space they exist in. Spoken language fills the problem of communicating between humans. It has subsets such as formal language (well understood terms suitable for any occasion), slang (quicker, obscure references that have meaning to the group using them), jargon (similar to slang, but usually technical in nature), etc.

    Other problem spaces have other languages. Music has staffs, notes, scales, etc. Would you suggest that music be created in natural language- that instead of writing down chords and notes that sheet music say "In half a second hold your fingers over holes 2,4,5 and 6, while half holding the thumb hole and blowing gradually"? Of course not- you need something more terse. Notes and staffs fit the bill.

    Look at math. We have calculus and arithmetic with a lot of well known symbols for expressing very complex ideas. It would be possible to express it all in English, but it would be much harder to understand and mainpulate. It would probably lose exactness as well- a necessity in math.

    Now we have programming. Programming is much like math- we want a very exact way of specifying what the computer is to do. Exactness is a necesity of the hardware- it can't figure out what we mean, it has to take us literally. So we have languages that look a lot like math. They fit the criteria we need- an exact language with no ambiguity, with easily understood symbols for manipulation. Programming languages *are* the natural language of the problem space. Trying to shoehorn a natural language for a different problem space is a disaster at best.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  71. General Purpose programming vs. domain-specific by javaxman · · Score: 1
    The article states that what is "natural" is defined very specifically by the problem area and how people working in it "naturally" think about that specific set of problems. 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. But does that mean you need a different programming language?

    If you have a specific problem area, what do you do as a programmer? You write a set of data structures and methods, aka APIs, that are specific to that problem area, then use them again and again. You might have heard of it, it's often called a library. 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. Writing domain-specific APIs in a powerful general-purpose programming language seems more practical than creating entire new languages for every problem area.

    I've already said some of this in a different thread, but I think it's important enough to the article to state clearly in a separate thread here. Mod me redundant if you somehow can't think of something better to do with mod points ( geesh, really... )

  72. Natural Language and Computer Languages by arevos · · Score: 1

    I'm somewhat skeptical of reports talking about the place of natural language when it comes to programming. Natural language tends to be very illogical, which is quite disadvantageous when it comes to programming.

    Take SQL, which uses English words and almost makes grammatical sense, but has a very poor and inconsitant syntax. At Warwick University, the Computer Science course included a mandatory database module we had to sit through. We went through the syntax of SQL of course, but we also touched on a system called EDDI, that was created at Warwick and never really progressed past the theoretical phase.

    EDDI was much easier to work with, despite being further removed from English than SQL was. For instance:

    CREATE TABLE fruits (name CHAR(20), amount INT, price FLOAT);
    INSERT INTO fruits VALUES ('apple', 4, 1.99);
    INSERT INTO fruits VALUES ('orange', 0, 2.99);
    SELECT name FROM fruits WHERE amount > 0;

    And:
    fruits (name CHAR(20), amount INT, price FLOAT);
    fruits << ["apple", 4, 1.99], ["orange", 0, 2.99]
    fruits : amount > 0 % name

    Whilst SQL veterans will recognise the SQL syntax more easily than the EDDI system, the EDDI system was much easier to learn. It is more logical, and requires the student to remember less. So long as the student remembers that "%" is a projection and ":" is a selection, there's little syntax errors he or she can make. Unlike SQL, in which I rarely seem to get the syntax work first time, and I've been coding SQL for much, much, much longer than EDDI.

    Of course, EDDI is impractical in real life because all databases use SQL, and EDDI is little more than a test system. But it seems to me that, in terms of syntax alone, EDDI is obviously is the superior query language.

    Natural language isn't necessary always good, especially when it comes to programming languages. We do not describe mathematical formulae with English words, and it doesn't make sense that we should use natural language to talk to machines that are based in mathematics and logic.

    It is, of course, desirable for programmers to make their source code understandable to others, but that doesn't imply that natural language is the way to go.

    1. Re:Natural Language and Computer Languages by Anonymous Coward · · Score: 0

      It doesn't really matter that all databases use SQL. At least from what I see in your example, the EDDI syntax is directly translatable to SQL syntax. You'd just need to write a short program or function to do it. Or, you could make up your own syntax and a translator.

      If it would really make your life that much easier, why not take the time ?

    2. Re:Natural Language and Computer Languages by arevos · · Score: 1

      I think there's already an SQLEDDI piece of software that was developed at Warwick for a PhD project.

      This page looks like the place to go, but I doubt the software will be that usable. And I'm unsure of the license on it.

      It also wouldn't my life that much easier at the moment. I use very few database queries in my software. Even PHP/MySQL projects use only a handful of queries. EDDI isn't directly translatable to SQL, either; SQL joins aren't natural by default, whilst EDDI's are.

      In short, as nice as it would be, it would take more time than I'd save. If I ever find myself manipulating databases more regularly, though, I'll certainly think about an EDDI interpretor ;)

  73. types and ''natural'' programming by Tom7 · · Score: 1

    Well, ha ha, but most people I know who use powerful type systems don't actually use type debuggers. Once you get comfortable with that way of structuring your programs, type errors are almost always very shallow.

    I do agree with the authors that "natural" problem-specific languages are useful for people who are not normally programmers (those people will increase in number dramatically, soon), but I disagree that this is an appropriate condition for the design of general-purpose languages. The reason is that there already *is* a "natural" model of computation (ie, logic), and I believe that's something that we as humans should be striving to learn and understand, not, as these authors seem to imply, replace with a more "human" notion of natural. (Disclaimer: I do not claim that any existing languages, much less so popular imperative languages like C and Java, succeed in embodying this principle yet.)

    1. Re:types and ''natural'' programming by The+Pim · · Score: 1
      Well, ha ha, but most people I know who use powerful type systems don't actually use type debuggers.

      Ok, I was being a little facetious, and I've never used a type debugger either. But I know that some people are pushing Haskell's type system pretty hard (eg, OOHaskell), and I think that some solution must be found for the notorious incomprehensible type errors before normal programmers can take advantage of things like this.

      I do agree with the authors that "natural" problem-specific languages are useful for people who are not normally programmers (those people will increase in number dramatically, soon), but I disagree that this is an appropriate condition for the design of general-purpose languages.

      The promise of embedded domain-specific languages is that you can create these friendly sub-languages within a sufficiently powerful general-purpose language. The casual programmer can stay within the sub-language, but the "real" language is right there when you need it.

      --

      The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
  74. huh? by Tom7 · · Score: 1

    I'd say that

    a = b

    beats that expression for economy.

    1. Re:huh? by saintp · · Score: 1
      But, of course, the question is: what does a=b mean? Was that example in Pascal or C? (It matters! A lot!) Or in nice, ambiguous BASIC?

      (eq? a b) has the advantage of the fact that, even though I don't know Lisp, I understood immediately that it was checking for equality, not assigning. And it is fewer characters than if (a == b).

    2. Re:huh? by Tom7 · · Score: 1

      I thought the question was of economy. (I disagree that we should stick that 'if' in there, since the lisp expression computes a truth value, just as the C operator == or the ML operator = does. For the same meaning, the expression 'a = b' is certainly shorter than the lisp one.)

      If we're talking about making sense of a program, then of course the question is not just a matter of counting characters. But I still disagree--every language has basic syntactic notions that you must understand before being able to read the program, and lisp is certainly no special case here. If you truly don't know lisp, I expect that prefix notation, knowing that ? is part of the symbol name and not some other syntax, and the parentheses denoting function application are all non-obvious. At least an infix equal sign has precedent in elementary school mathematics (among other places).

      I absolutely do not intend to defend C's choice to use = to mean assignment, which I think is misleading on top of being unprecedented.

    3. Re:huh? by amightywind · · Score: 1
      I'd say that a = b beats that expression for economy.

      This expression is far more ambiguous and confusing than you might expect. Are you indicating assignment or comparison. In C/C++ if you were doing a comparison this would be a horrendous bug. Can a and be be arbitrary types? No, the lisp expression is far preferable.

      --
      an ill wind that blows no good
    4. Re:huh? by Tom7 · · Score: 1

      I thought the metric was economy?

      It is not ambiguous when given the language. Many languages other than C/C++ don't screw this up, and use the equal sign in infix for equality, just like mathematics. You haven't provided an argument for why the lisp expression is preferable to that.

  75. I read to the point by mr_z_beeblebrox · · Score: 1

    Where it describes the unnaturally difficult looping mechanisms found in C#, C etc... and decided this was not worth reading as their study is flawed. The first sentence of their goals says "identify the target audience". If their "target audience" has trouble with "While this do that. Then their target audience is not actually programmers and they are targeting the same people who routinely save their daughters homework overtop their corporate budget.

    1. Re:I read to the point by Olathe · · Score: 1

      No, they're referring to things like :

      for (i = 0; i < n; i++) {

      I don't care whether it's possible or even easy to figure that out. Why would you waste brainpower on coding (and debugging the occasional off-by-one errors) when it's a lot easier to do something like (in Ruby) :

      n.times {
      (0...n).each { |i|
      array.each { |element|

      All four are formal, exact, and concise. Three are much more natural and error-free. There's nothing non-programmerish about any of them.

    2. Re:I read to the point by mr_z_beeblebrox · · Score: 1

      neither of those example used much brainpower. Again, I say if those are difficult the audience is wrong. The goal should not be to make the average user a programmer. If it is simple to program then simple people will do it and they will make simple design flaws that are simply unbearable. Spaghetti code in Basic will be looked upon as "the days of reliable code" compared to what will come. People will be storing data conveniently in multiple spots and all other rubbish

  76. Would you make fun of yourself? by zakharin · · Score: 1

    What about those who learned assembly, knew C, but use Java?

  77. Oh, you mean COBOL! by jd · · Score: 2, Informative
    I certainly believe that people drift towards computer languages that closest match the method of their thought processes, but I do not agree that you should (or even could) write a programming language that mirrors natural languages or pure thought.


    Down that path lies madness. Or Adam and the Ants.


    Fourth Generation languages expressed things in terms of the requirements, rather than the actual mechanisms involved. Such languages have been around for a while, but have largely failed in the "real world". Pushing the complexity into the compiler turns out not to reduce the errors and can actually severely impact both performance and stability.


    Fifth Generation languages tried to solve the problems generated in Fourth Generation languages by assuming that the compiler wasn't complex enough. By adding a degree of "intelligence" to the compiler, it was believed that you could increase the abstraction further (thus allowing the compiler greater freedom to choose an optimal solution) and use learning to correct mistakes in methods. Fifth Generation languages were first introduced in the mid 1980s, but nobody could figure out how to get them to work as designed.


    Fifth Generation languages forked, at some point, and the only really active area of research is in Genetic Algorithms. GA's are intriguing, but not practical outside of herustics.


    Today, the only languages used in practice are Second Generation (assembly) and Third Generation (the C family). Object Oriented programming has allowed Third Generation languages to encompass problems that would otherwise be impractical below a Fourth Generation language. This has proved a far more fruitful line of research and development. Far more "real" programs exist in Java than exist in APL or Prolog, for example.


    (There are plenty of Operating Systems written in C and C++. Could you even begin to imagine writing one in APL??)


    Parallel Programming has gone a similar path. Complex compilers, such as "Parallel C" and "Parlog", and Parallel Languages, such as "Occam" and "SISAL", were intended to replace the complexity of hand-coding parallel functions in conventional serial languages.


    Such methods died a death, as threading and event-based programming proved perfectly adequate for most purposes. Of the above, Occam is the only one I ever regarded as being particularly effective, but it's rare to see anyone still use it.


    The "advanced compiler" approach being tried these days is OpenMP, but when you look at the relative amount of time and effort invested in solutions, far more people are working on code using PVM or MPI, maybe throwing a clustering system such as Beowulf or Mosix on top, than they are using OpenMP.


    The experience of time appears to show that Third Generation languages are the optimal balance between compiler/language complexity and code complexity. As such, I expect it to be more productive to improve whole-code optimization and auditing tools for such languages. These don't require the compiler to be any more complex, as they can parse the input and/or output, in traditional Unix daisy-chaining style.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. Re:Oh, you mean COBOL! by Raffaello · · Score: 1

      You miss an entire category of languages that achieve the aims of 4th gen langauges by allowing the programmer to easily create a domain specific language in what you might term a 3rd gen language. Then domain problems find natural expression in a newly created language just for that domain.

      In order to do this, we need a powerful macro system - not just the simple textual substitution of C's preprocessor. The whole lisp family of languages have this sort of powerful macro system, and this is why the lisp family of languages is significanly more expressive and powerful than typical 3rd gen languages like C.

  78. object types, special cases, etc by GunFodder · · Score: 1

    I thought the spreadsheet example of summing the values in a column was weak. The code is more complicated than the spreadsheet action because real programming lanuages have much larger problem domains than a spreadsheet. The spreadsheet can afford to have only one additive operator and one type of grouping because that is the only problem domain it understands. Real programs have different levels of scope, different data types, exception handling, etc.

  79. Stop Making Stupid Posts People! by JAS0NH0NG · · Score: 1

    First, the article on ACM Queue is about Natural Programming and NOT Natural Language Programming. Please at least read the article before making an inane post.

    Second, the concepts in Natural Programming are quite sound. Rather than re-using programming concepts that people often have difficulty with or are error prone (such as looping structures or boolean statements), they suggest alternatives and provide user tests that indicate that these alternatives have good potential.

    If you want to see an example video of one of the projects, please see:
    http://web.cs.cmu.edu/~pane/HANDS/HANDS.MPG (Warning: 73Megs)

  80. Postscript version by pjt33 · · Score: 1

    { /you /postscript /love } { /honk } if

  81. If it were only that easy... by Ancient_Hacker · · Score: 1

    Hmmm, only glitches: * Usually the task is loosely defined * Usually the environment is also. Example: Boss says "write a program that sends me a weekly summary of the file system backup status by email". I don't think a computer is going to be able to make much out of this. It takes a heck of a lot of human judgement to figure out (1) What level of detail the boss wants. (2) Do we format it as tables, line graphs, bar charts, ?? (3) Can his computer handle text only, or .pdf, or HTML, or FLASH, or 3D?? (4) Do I have the political "juice" to get access to all the sysadmin data? (5) Are the backup statistics reliable? (6) Is the boss's dumb son-in-law going to block my access unless I throw him a bone? (7) How am I doing to seamlessly do this for both Unix and NT? (8) Are the Windows API's really usable for this, or are they going to be hopeless as in the last 4 projects? I don't think any computer parser is going to be able to make these judgements.

  82. What is Natural Language? by vaxling · · Score: 1

    Maybe the problem is in the definition. Is Natural Language written, spoken, mind probed or maybe more realistically what millions do with various IM clients.

    The goal should to be able to create a computer program quickly and effectively in a "human" communication paradigm. Currently, the only real-world mechanism for humans to communicate with the computer is the keyboard.

    So, what are today's effective communication mechanism between human's via a computer? IM's, EMAIL, wiki's....

    Maybe one of these models would be a more effective humancomputer interaction mechanism for programming?

  83. They miss the elephant in the room by tootlemonde · · Score: 1

    The article says:

    It is somewhat surprising that in spite of over 30 years of research in the areas of empirical studies of programmers (ESP) and human-computer interaction (HCI), the designs of new programming languages and debugging tools have generally not taken advantage of what has been discovered.

    People have been programming computers in human languages for decades (possibly since the invention of the the first machine) but the language has been body language rather than spoken language.

    The most obvious recent effort is the windows-icon-mouse interface that supposedly is the most intuitive way to get the computer to do something useful. However, most widely-used machines like cars and toasters use controls that work more-or-less the way people expect them to.

    Body language has a smaller vocabulary than spoken language, the range of outcomes of the commands is limited, and machines gives simple and direct feedback as to whether they understand the commands.

    Perhaps the researchers should think of a steering wheel, accelerator, brakes and turn signals as input devices to write programs instead of keyboards. You could write programs the way you play Grand Theft Auto.

  84. My 2c by TomorrowPlusX · · Score: 1

    I just want to say that while I'm by no means a professional programmer, I do know my stuff, more or less. I do hobby robotics with my own runtime and electronics, I've written device drivers in deeply low level c and assembler for embedded systems. Right now I'm taking a break by writing a game that does emergent intelligence in hoards. And so on and so forth.

    I do most of it in C and C++ just because that's what I feel best in.

    Anyway, I'm on a Mac, and I decided that Applescript looked interesting from a functional standpoint -- you know, dynamic scripting of app and system and so on. Keen! I used to muck around with DCOP under KDE and I was thinking how cool it is that apple has taken the idea of COM and so on and made it a *language*.

    Anyway, it turns out I can't write Applescript to save my life. I write a line and the sheer *ambiguity* makes my tender gonads retract into my abdomen. I can't take such *uncertainty*. The grammar seems dependent on context and function, and even then, there's six ways to express it.

    I'll stick to C and C++, and languages like io or lisp when I need greater dynamism; and as for applescript, I'm hoping this ( http://www.cocoadev.com/index.pl?DOScriptingArchit ecture ) pans out.

    --

    lorem ipsum, dolor sit amet
  85. but _WHICH_ natural language? by museumpeace · · Score: 2, Insightful

    a language that leaves all the verbs for the end of the sentence? A language that likes the modifiers to follow rather than precede their nouns?...my point is , you have one translation problem in going from high level language to machine language and another going from "natural" language to high level language. But a third problem is finding a culture-neutral natural language OR solving the natural language translation problem...and you have seen how atrocious babelfish results can be...we just aren't there yet folks! The ambiguity that must be dodged in going from normal human speech to a computer program hides in different places depending on the language, especially on which words have multiple meanings. And inflection? What are you going to do? program with emoticons?
    I know that natural language is creeping into UI's in specialized search engines. If you know where to look, you will find natural language search features on Fidelity.com and perhaps other financial websites. These are much more carefullly bounded problems than the broad challenge of allowing a user to express a solution or algorithm for an arbitrary problem a computer could be programmed to do in, say C, but using ordinary speech. The article sited is interesting and it might make life better for us programmers but I am not getting my hopes up that more than incremental change to computer languages is around the corner.

    --
    SLASHDOT: news for people who can't concentrate on work or have no life at all and got tired of yelling back at the TV.
  86. Optimize my code! Make it fast! by Anonymous Coward · · Score: 0

    Hey, can I be a natural language programmer now?

  87. Try asking a linguist - principles not syntax by MeerCat · · Score: 1

    Seems they're looking to reinvent COBOL, and we all know what a great success that was. Anyone remember The Last One ??

    They'd do better actually talking to lingusts and looking to apply the principles of natural languages to programming, rather than the syntax.

    Of course, some people have discussed this already, but you say things like Local ambiguity is okay or Topicalization or Pronominalization to a lot of developers and they can't see past their prejudice of "I know one language and I'm too scared to look at another".

    If you dare let go of your prejudices and re-consider some of the fundamentals you might just be surprised.

    --
    I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
  88. Not that hard to figure out why. by gurps_npc · · Score: 1
    I tried to read their paper.

    It was full of jargon. You had to have a Masters in computer science to understand what they were saying.

    They need to take their own advice and write their reports in a more natural style.

    If they clarified what they were trying to do, then maybe people would listen to them.

    --
    excitingthingstodo.blogspot.com
    1. Re:Not that hard to figure out why. by TuringTest · · Score: 1

      Or, you could try to examine the tools they developed (primarily alice.org and the HANDS environment) and understand the new features like the Why? query debugger.

      --
      Singularity: a belief in the "God" idea with the "demiurge" relation inverted.
    2. Re:Not that hard to figure out why. by gurps_npc · · Score: 1
      Are you telling me that instead of having them describe their stuff clearly enough for laymen to understand, that laymen should be required to try it out and discover how cool it is?

      Sorry, but that sounds incredibally foolish to me. Especially when the article in question is complaining that people are not doing that.

      They may in fact have the solution, the best possible programming ideas in the world. But if they are stupid enough to describe what they do using jargon bull-crap like "Yet none of these tools support hypothesizing activities." then it is no surprise that no one is listening to them.

      Tell me the truth, when was the last time you said to yourself "You know, what I need here is something that supports Hypothesizing Activities".

      It is NOT enough to create the best tools in the world. You also have to tell other people what you have created. You, TuringTest, did a better job of convincing me they had a worthwile idea then they did, simply by mentioning the tools they developed. Their articled did not even do that clearly.

      I understand what Natural Language is. And I like the general idea. But the implementations I have seen suck. I could design a better one in my sleep, mainly by implementing some additional positional grammar rules instead of cumbersome key words.

      --
      excitingthingstodo.blogspot.com
    3. Re:Not that hard to figure out why. by TuringTest · · Score: 1

      What I'm saying is that this particular paper is not intended to be read by laymen, so laymen should do a little work to decode it. It's a report for the Communications of the ACM, which is an academic conference; no wonder that it includes heavy jargon. Maybe it's unfortunate that it got published in Slashdot, because 99% of people understood that it was talking of programming in Natural Language, when it wasn't. It was about developing an environment with new tools like those mentioned.

      Sure there should be more popularizing material for this subject. As I see it, the author were trying to convince the other academics to write such material.

      Tell me the truth, when was the last time you said to yourself "You know, what I need here is something that supports Hypothesizing Activities". He he, there you caught me :-)

      And thanks, it's gratifying to see that my rants once in a while are useful.

      --
      Singularity: a belief in the "God" idea with the "demiurge" relation inverted.
  89. You say it by Anonymous Coward · · Score: 2, Informative

    Actually you're much closer to truth that you think.

    People here in /. automatically assume that a natural language is a change to code syntax making it closer to English while keeping the semantics identical to C or Java. But it's the whole way around, folks.

    A natural language as stated in the article would be closer to the programmer's mental model (and no, the mind of a programmer is still not equal to a Von Neuman machine). For the very least, such a programming environment would provide incremental changes and retractions to previous decisions, as those listed in parent's joke.

  90. Keeping the status quo by Jonner · · Score: 1

    Just because more advanced styles of programming haven't worked out well in general yet doesn't mean they never will. What if people had thought taken that approach when assemblers were the status quo?

    If no one had tried to increase the level of programming, we wouldn't even have C or Java. Remember that the switch to third generation didn't happen overnight. Work on Fortran and Lisp started back in the fifties.

    1. Re:Keeping the status quo by jd · · Score: 1
      True, but Fortran was very usable from the start. So much so, that Fortran is still heavily used and is still being maintained. (Fortran 90 is becoming widespread, and I think there's a Fortran 2003 specification.)


      Algol and BCPL are other early languages which, through evolution, became BASIC and C respectively. Again, though, both were very popular when they first came out.


      PL/I is one of the few early languages which never really progressed. A variant - PL/M - did emerge, but the tight control IBM held over the language proved its downfall. (It also demanded a powerful compiler, because so much could be defined on-the-fly, such as data types, etc.)


      In fact, that would appear to be the basic rule on which languages did survive - those with the simpler compilers generally did better.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    2. Re:Keeping the status quo by Jonner · · Score: 1

      If there is a general transition from third to fourth generation languages, it will certainly take longer than from second to third. However, there is always evolution taking place, though it's often slow.

      I'm always disappointed when I notice how long it has taken for high level programming concepts to move from pioneer languages like Lisp to general use. Consider how long it took before people were commonly using automatic memory management, dynamic typing, and functions as objects. In fact, the most commonly used languages today don't even allow complete freedom using functions as objects or higher-order functions.

      I'm confident that there will be programming languages that better match how people think. However, they may not look anything like current fourth-generation languages. There is huge potential for research and invention in programming language design.

  91. Huh? by Anonymous Coward · · Score: 0

    from the =-NE-== dept.

    ? is that supposed to mean "equals-sign is not the same as two equals-signs"? Or is michael designing a new Star Trek logo?

  92. Did they even show anything? by Anonymous Coward · · Score: 0

    So they developed this HANDS thing and gave two versions to some kids, one that's the full version, and one that's "crippled". First problem with this: Kids aren't a good group for language study if you're studying how well they handle an odd language. Kids are more adaptable than adults, and they inevitably did the "bad" thing of adapating to the language as much as it may have supported them. You're giving it to a group that pretty much all has above average language capabilities. Try it on a broader range of capabilities, from young kids to older adults.

    Second problem: They compared it to a modification of the same program. Does this modification have the same capabilities as the original language? Perhaps there was a missing capability that hindered the second group of kids, when they would otherwise have programmed just as fast and as well as the first group. And where's the control? Include other languages that already exist. This wasn't an experiment. It was a focus group.

  93. Specialsied languages are not just for programming by EmbeddedJanitor · · Score: 5, Insightful
    Natural languages are often not the best way to express problems/concepts concisely. The use of specialised languages is not something that is specific to programming. We (humans) have special languages for all branches of mathematics, chemistry (H2O...), physics (E=Mc2), music, drawing house plans.... These specialised languages came about because natural languages do not provide an effective means for communicating these ideas. For an example, consider some music written in a natural language: "Big drum beat followed by a bit of silence then a soft ....." Imagine trying to read and play that.

    Programming is also something that is easier to express in a specialised language. Sure we can make some things more human readable but does that make it easier to understand? The hard part of programming isn't reading/writing the code so much as knowing what structures and concepts to use. Making programming more natural language like will not really make programming easier, you still need skill and practice. Using the music analogy again: I don't play music and can't read music score (the language of music). If Beethoven's fifth (if he ever had a fifth) was rewritten in a natural language it would not make it easier for me to play; I'd still need a whole lot of practice with a piano or whatever to play effectively. Relative to aquiring the piano skills, I expect learning to read sheet music would be relatively simple.

    Where natural languaages might help is in system design and requirement capture. Still, however, I think that most often things go wrong because when people are expressing their thoughts in a natural language they use very woolly thinking and use vague terms.

    --
    Engineering is the art of compromise.
  94. Natural Programming != Progrm. in Natural Language by TuringTest · · Score: 1

    Will somenbody actually RTFA and realize that 99% of previous posts are offtopic? The article isn't describing a new way to program the computer using natural language; we already have COBOL for that, and we all know how far that approach works.

    The article is talking about new programming paradigms, which deprecate the old Von Neumann architecture programming model and allow for a more flexible mindset while programming. Last generation scripting languages (Python, Ruby...) would be a step in that direction. The article is proposing to explore that domain scientifically.

    --
    Singularity: a belief in the "God" idea with the "demiurge" relation inverted.
  95. SQL by Jaime2 · · Score: 1

    SQL is the language (of the ones that I know) that is closest to English. It is also the hardest (in my experience -- I teach programming) for people to learn. The farther you get from natural language, the less slang and incorrect English sneaks into the code.

    --Before you give the baby the water, boil it.

    Please don't let a computer figure out that sentence -- in strict terms, it says to boil the baby.

    1. Re:SQL by Anonymous Coward · · Score: 0

      Agreed. SQL is overly verbose, and its attempt at natual English just makes it annoying and confusing.

      Why should I have to specify that I want to grant privileges TO or revoke privileges FROM a user? Shouldn't that be implied?

      Most programming languages come quite naturally to me, but after 5 years I still keep an SQL book on my desk so I can figure out what twisted bastardization of English I need to use to perform a simple task.

  96. Grammar by PerlDudeXL · · Score: 1

    I had no real clue about grammar in languages - until I heard about the formal definition of a
    grammar in a college CS lecture.

    To apply it properly is still something different ;)

  97. Natural Programming != Progrm. in Natural Language by TuringTest · · Score: 2, Informative

    Sadly true. Will somebody actually RTFA and realize that 99% of the other posts are offtopic? The article isn't describing a new way to program the computer using natural language; we already have COBOL for that, and we all know how that approach works.

    The article is talking about new programming paradigms, which deprecate the old Von Neumann architecture programming model and allow for a more flexible mindset while programming. Last generation scripting languages (Python, Ruby...) would be a step in that direction. The article is proposing to explore that domain scientifically.

    --
    Singularity: a belief in the "God" idea with the "demiurge" relation inverted.
  98. Perl version by Black+Perl · · Score: 3, Funny
    $_ =
    q[ for ( @_ ) { push @_, sort grep /\w+/, @_ } print unpack 'A*', pack 'B*', join '',
    reverse map
    { length ( $_ ) >> 1 }
    split /\S+/
    ];eval
    --
    bp
    1. Re:Perl version by __aavljf5849 · · Score: 1

      and since perl uses manu natural language dieas, we now see why this isn't a very good idea.

    2. Re:Perl version by Erik+Hollensbe · · Score: 1

      bah.

      honk if(you love perl);

      that dork is a show-off.

    3. Re:Perl version by Anonymous Coward · · Score: 1, Insightful
      You don't even need the parentheses:

      honk if you love perl;

      This is as natural as it gets.

    4. Re:Perl version by Nurgled · · Score: 2, Insightful

      Of course, what this is really doing is:

      if (love->you(perl)) { honk(); }

      So unless there's a you method in package love, this will cause a runtime error. The following would be a little more consistant with the other examples, but less like English:

      honk if $you->loves(perl);

      ...and if you want this to run with the strict pragma in effect, you'll have to quote the string "perl", or use a scalar variable $perl.

    5. Re:Perl version by Eravnrekaree · · Score: 1

      I have found Perl to be a very useable program language that allows programs to be written in a clear and easy to understand manner. I believe the notion that it encourages obfuscated programming is a myth. I have read some pretty obfuscated and awful code written in C++ and Java , and obfuscation is possible in any somewhat useable programming language. What we need is good programming habits. If we dont use good programming habits and keep readability in mind we can make a mess of things in any language.

      Certianly, I believe people should be able to use the language that fits them best and what they are most comfortable with. If you like Java, then It is fine with me if you want to use it. I prefer Perl since that somehow fits my needs and is eisier for me to understand and use, and write good code in. For other people it might be Java. I believe people should use what fits them best.

      I have found that Perl allowed me to get to writing good readable maintainable code faster than most other languages.

      A programmer if they do not have practice in programming can mess things up in any language. Different people have different needs and different thought patterns, and different languages fit different peoples tastes better. What might be great for one person is not so useable to another. A feature that is essential to one person may have no use for another. Just because one person thinks a feature has no use does not mean the feature does not have merit and should not be there, because there is likely someone who does need it.

    6. Re:Perl version by Erik+Hollensbe · · Score: 1

      this is what's happening.

      honk($_) if (you(love, perl));

      you're assuming that the new() "special" syntax is applied anywhere, and it's not. it just applies to new().

      (yes, I know it sucks.)

  99. IBM Study some years back... by EmbeddedJanitor · · Score: 1
    IBM did a study on this some while back. One thing they did was look at numbers of bugs fixed per module. One might expect a random distribution of bugs per thousand lines of code or whatever, but what they fond was that some modules had far more bugs than others (by a factor of 20 or more).

    I found this quite a strange result until I started doing some similar analysis on my own code and pretty much found the same thing. At the time I was doing an HPGL engine for a plotter. Each time a bug was found with one particular part (the part that gave the most problems) I'd go fix it. Generally the bug would be some corner case. Each time I fixed something the code would get more "fragile" and messy and of course the bugs didn't stop. All this happened because the base design was wrong. Eventually the code became unfixable. It could take two weeks to fix a bug, so I just rewrote the code from scratch, properly designed this time, and no more bugs were ever seen.

    --
    Engineering is the art of compromise.
  100. Re:Is this a good idea? i.e. apples vs grapes by faragon · · Score: 3, Interesting

    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).

  101. Flowcharts by Doc+Ruby · · Score: 3, Insightful

    Where's my compilable flowchart? They're more universally understandable across human languages/cultures, including geek/wonk/artist/customer/PHB, than text. They can be intermediate-compiled to text procedures for lexical parsing techniques. And they're much easier to design, program, debug, maintain and document, especially for parallel/distributed/networked applications. They're natural language without speech. Where's my gcc flowchart preprocessor?

    --

    --
    make install -not war

    1. Re:Flowcharts by owlstead · · Score: 2, Informative

      In my robotics invention system 2.0 from LEGO :)

    2. Re:Flowcharts by BobKagy · · Score: 1

      Where's my compilable flowchart?
      I believe this is what you're looking for:
      Stateflow Coder

    3. Re:Flowcharts by Anonymous Coward · · Score: 0

      They're also completely incomprehensible and unmaintainable for anything beyond what will conventiently fit in a one-page example in a textbook. Maybe "football fields" will finally take over from kLoC for measuring program size. We can only dream.

    4. Re:Flowcharts by Doc+Ruby · · Score: 1

      They're much more comprehensible than the lexical source code they're used to design. You're just talking about the kind of flowcharts the marketdroids make when they need to confuse a PHB into letting them do what they want. Nested flowcharts, with simple schematics of blocks containing simple schematics, are much more maintainable and comprehensible than similar source code. Some bad programmers write 5KLoC in main() - there's no foolproof method. But flowcharts have advantages that can improve the entire development cycle, if we have comparable tools.

      --

      --
      make install -not war

    5. Re:Flowcharts by Doc+Ruby · · Score: 1

      Thanks - that dev system does seem to meet the specs :). But it also requires MATLAB and Simulink... isn't that going to be really pricey, with a steep learning curve (since I don't have those skills)? I searched the Web some, and I haven't found any complaints. Does that mean it doesn't have any users ;)?

      --

      --
      make install -not war

    6. Re:Flowcharts by BobKagy · · Score: 1

      Yes, it is going to be pricey. Somewhere on the order of $20k for a development seat.

      The learning curve is going to depend on what you want to do with it. Building charts in Stateflow is probably like Go, an afternoon to learn but a lifetime to master. There are only about 4 or 5 graphical elements to understand, and the syntax for actions & conditions is very C like. Learning to make good charts can be difficult, but I'd assumed you were already looking for that challenge if you were asking for a flowcharting language.

      The learning curve is really going to kick in when you want to integrate the C code from your chart with the rest of your project.

      As to users, I know there are some. The academic users (the pricing is much different for a university) seem to post to comp.soft-sys.matlab, while the commercial users complain directly to The Mathworks.

      If you're looking for something a little cheaper, you might want to check into Ptolemy from Berkeley. The earlier version could do code generation from flow charts, but that hasn't quite made its way into the rewrite Ptolemy II.

    7. Re:Flowcharts by Just+Some+Guy · · Score: 1
      Where's my compilable flowchart?

      Here and here. Hint: these days, we call it "UML".

      --
      Dewey, what part of this looks like authorities should be involved?
    8. Re:Flowcharts by Doc+Ruby · · Score: 1
      Does ArgoUML really work? They casually mention their source code generation only in one marketing paragraph (AFAICT):

      "Forward Engineering

      ArgoUml provides a modular code generation framework. Currently Java is provided by default and there are modules for C++ and Php. The Java code generation works with the Java reverse engineering to provide basic round - trip."

      And the Rational marketsprach seems to only hint at whether you can just compile your diagrams to source, then object, then executable, (in Java and C++) in one command. I've been trying to monitor the appearance of "compilable UML" for years (since MS bundled Rational Rose with VB5, 8 years ago). Has it finally arrived? Is the code it generates any good (performance, reusability, bugfreeness)?

      --

      --
      make install -not war

    9. Re:Flowcharts by Doc+Ruby · · Score: 1

      Thanks - the unusual Slashdot response that enlightens more about the subject than the poster :). Though I do think that you're nifty :).

      Someone else pointed out other tools: ArgoML, a UML compiling IDE (apparently targeting Java, as well as C++ and PHP), and IBM's new version of Rational. ArgoUML seems more embryonic than Stateflow, though (if it actually compiles to compilable source) Rational might be exactly the "top layer" for flowcharting apps that are otherwise developed with the same tools (Eclipse, CVS, etc) we currently use. Any thoughts on comparisons?

      --

      --
      make install -not war

    10. Re:Flowcharts by Just+Some+Guy · · Score: 1
      Does ArgoUML really work?

      I haven't personally tried it. Actually, I was trying to be a smartass earlier (and probably unsuccessfully since the coffee hadn't kicked in yet), so that may not've been the best example.

      And the Rational marketsprach seems to only hint at whether you can just compile your diagrams to source, then object, then executable, (in Java and C++) in one command.

      Again, I haven't used it myself. However, I know one of the programmers on the Rose team and he seemed pretty happy about the results. As I understood it, it was an "eat ones own dogfood" project where they used early versions of Rose to design and code the newer versions. Apparently it's also pretty good about round-trip engineering, so that if you make changes to the resulting code at the source level then the UML diagrams will be automatically updated to reflect them.

      YMMV widely, of course, but it seems like people are using it in real projects.

      --
      Dewey, what part of this looks like authorities should be involved?
    11. Re:Flowcharts by BobKagy · · Score: 1

      I don't know about ArgoML or the latest version of Rational specifically.

      The last time I looked at UML it had 2 drawbacks compared with Stateflow:

      • At that time it organized your code, but you still had to write all the C code by hand. It might make some wrappers for you though.
      • You couldn't debug in the graphical environment. You had to understand how it put the code together, and then keep the flowchart on your lap as you debugged in your normal debugger.

      Stateflow makes code that can pretty hard to follow, but hopefully you've debugged before generating code and hopefully it generated C code faithful to your design.

      Because I've occasionally seen things about Executable UML, I've always assumed there was some core deficiency to UML that prevented it from being directly compiled.

      Looking over the Rational Rose Technical Developer product, they include the blurb Runtime model execution, fully executable code generation and visual debugging. so this product may now do what I ask of it.

      I didn't find the paragraph at Argo about code generation.

      The website for the book Executable UML has exercises based on BridgePoint by Project Technology. Just to throw another option out there.

      The one think I always liked about The Mathworks suite was the ability to build dynamic models of the environment the code is meant to operate in. This is so much richer and easier than building test scripts and simple test benches. They have good tools for modelling the domain I work in, but I wouldn't find them useful if I were building a web app. But if I were building a web app, I'd look for a tool that lets me simulate a dynamic environment there as well.

  102. Natural language does not... by Jagasian · · Score: 2, Insightful

    ... make a good programming programming language. Mathematics has "been there and done that" with natural language versus a formal language. Why reinvent the mistakes of the past?

  103. Poster didn't RTFA! by Anonymous Coward · · Score: 0
    "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."

    This article has nothing to do with Natural Language Programming!

    Stop talking about NLP!

    It's about CMU's research called "Natural Programming", which is just their fancy way of saying "trying make programming languages and environments more usable." It has NOTHING to do with using natural language to program!
  104. Natural language compilers?are they kidding??? by master_p · · Score: 2, Insightful

    It is very difficult to write a context-free programming language, let alone a natural one! when we speak, everything is meant relative to the current context. There is no way that a mathematical abstraction can be made out of that, unless really powerful computers can try every production possible in the same time (thinking about quantum computers).

    We humans don't even talk logically at times (logically in the mathematical sense). We say one thing, we mean another one. One of the most difficult things for new students is to get used to the strictly mathematical nature of computer languages. Computer thinking requires every bit to have its special meaning in the universe. Most people choke on that. The most capable programmers are those that can hold a mental model of the application, its various parts and as a whole. These types of people can translate requirements to code very efficiently, because they can reason about a program's state better since they remember the whole program and they can immediately recognize the consequences of any programming decision.

    And when one becomes familiar enough with the way the computer works, then the verbosity really gets in the way.

    What we need is a development environment that can reason about the state of the program. That's the root of all problems. Embedding state information in a program is something I haven't seen in any language. Most languages, if not all, work in the assumption that anything can happen anytime, and they don't have state constraints, thus allowing the programmer to make mistakes that could be cought in compile time.

    1. Re:Natural language compilers?are they kidding??? by Skavookie · · Score: 1

      Parsing natural language syntax is not that hard. There are issues of ambiguous syntax, but they are relatively small. The set of possible syntactic productions can very quickly be narrowed down to a manageable size.

      Some difficulty arises when you look at semantics and syntax. The problem here is not that "we say one thing, we mean another one." We say what we mean (modulo a few minor errors here and there). Yes, many words and phrases have ambiguous meaning, but this is manageable. Usually an ambiguous word or phrase can be disambiguated by looking at only the immediate context.

      Mathematical abstractions can indeed be made of all of this. Syntax is dealt with either by constructing parse trees familiar to computer scientists, or by developing an algebra of words and phrases. Semantics can be fairly well described set-theoretically. Most natural language sentences can be naturally interpreted as assertions of set membership.

      The difficulty in processing natural language is due to the sheer volume of the lexicon. Over millions of years, natural language has accumulated enormous collections of lexicalized idioms, and this volume of idioms, which are not strictly compositional, is difficult for computers to manage.

      However, when communicating with a computer one is unlikely to need many of these idioms. The computer doesn't care that it's "raining cats and dogs," or anything about your emotional state. We can therefore consider a fragment of natural language which represents the things that we actually do want to talk to a computer about. Compiling algorithms described in this fragment of a natural language is entirely feasible. It may not, however, be entirely desirable: Natural language evolved to communicate ideas on an extremely noisy channel (voice), not to describe algorithms in excruciating detail as concisely as possible. One can certainly express these algorithms in natural language, but it is awkward and full of redundancy. Natural languge is packed with redundancy by design. Artificial languages are typically designed to be as concise as possible. This has nothing to do with how hard it is to process natural language.

      The "mental model of the application" thing is something entirely independent of the natural language processing issue. A programmer's mental model of an application in principle should have nothing to do with the language being used to code it. I also doubt any programmer is able to remember the whole program at once unless the program in question is pretty trivial.

    2. Re:Natural language compilers?are they kidding??? by master_p · · Score: 1

      I agree, but with natural language, it is too difficult for all practical purposes to parse it as a computer programming language.

      Todays programming languages are written in simple BNF syntax. Compilers can almost be automatically produced by tools that read BNF notation files. This thing can't be done with natural language. Imagine lex-yacc for natural language! a nightmare! millions of grammatic rules can arise, that actually mean the same thing, all for making it easier for the average joe to command the computer.

      I mentioned the mental model of the application to show that the programming language is not the most important factor in successful programming; knowing the program's states and the consequences of changing the state is.

      In other words, even if somehow magically we can write programs in English, we will not have faster and better development of applications. Actually, the situation will be made worse, because what one programmer says in natural language, it may mean something totally different for another person!

  105. It's hard enough to find a programming job... by phyruxus · · Score: 2, Insightful
    Most programming work involves maintaining what's there. I expect that if NLP hit today, tomorrow there'd be 10^9 lines of code which don't quite do what they were intended to do. Or work at all for that matter :)

    The world will always need people who understand that asking for the last digit of Pi isn't a worthwhile request.

    "Computer, sort this list of names, then beat me at chess without moving your queen, then formulate a method of reversing entropy." "Computer, tell me a joke."

    If natural language aims at letting users tell the computer what to do in the terms they think about their tasks, the computer needs to be aware/intelligent to understand the requests. Otherwise there's always going to be a manual describing what you can and can't ask and how/how not to ask it. And people won't read manuals, they'll write programs that don't work.

    And then, you and I will *finally* get programming jobs. :)

    --
    "A witty saying proves nothing." ~Voltaire
    "d'Oh!" ~Homer
    1. Re:It's hard enough to find a programming job... by DarkMantle · · Score: 1

      And then, you and I will *finally* get programming jobs. :)

      Here's hoping ;)

      --
      DarkMantle I been bored, so I started a blog.
  106. Constraints and Prototypes in Garnet and Laszlo by SimHacker · · Score: 1
    Garnet is an advanced user interface development environment written in Common Lisp, developed by Brad Meyers (the author of the article). I worked for Brad on the Garnet project at the CMU CS department back in 1992-3.

    One thing I like about Brad Meyers is that he's a strong programmer, as well as an excellent researcher, so he had a first-hand understanding of the real-world issues involved in programming languages and user interface architecture, unlike many academics who talk a lot of theory but never get their hands dirty. Brad Meyers understands where the rubber hits the road, and how important it is to have good tires.

    At the time I worked on it, Garnet didn't have pretty graphics like Flash, but the underlying programming system had some advanced features that are sorely lacking from most modern user interface development environments.

    Laszlo is an modern open source GUI programming system, with many of Garnet's advanced "natural programming" features like prototypes and constraints. Laszlo currently uses Flash as its virtual machine, but it's a much higher level way to program dynamic interactive web based applications, without using the proprietary Flash authoring tool.

    Garnet had a true prototype based OOP system (somewhat like Self), which is great for gui programming, because guis have so many objects that look and behave like each other except for a few little customizations (like the layout, graphical style, data source and call-back behavior).

    Garnet also had an automatic constraint system, which enabled you to simply define any attribute as a formula that depend on other attributes, without needing to worry about how and when the values were calculated. Garnet's constraint system automatically figured out the dependences of each formula, and automatically and efficiently recalculated and cached any values that needed to be updated, but only when necessary.

    With constraints, you can make a button inside a window, and define its left edge to be ((parent.width - self.width) / 2), and it will automatically remain horizontally centered in the window from then on, without you (the programmer) having to worry about what to do when the parent window's size changes.

    Without constraints, you have to manually write all the code that changes the button position whenever the window size changes, which results in code scattered all over the place in different classes and handlers and intermediate objects.

    Constraints are much easier to use and more general purpose than resize handlers, springs and struts, complex MVC updating schemes, and other Rube Goldberg devices.

    Constraints are especially useful for user interface programming, because they save you from having to write lots of annoying boiler plate and error prone code for handling updates (registering, chasing down dependencies, detecting changes, notifying updates, all happens automatically).

    Constraints make GUI programming much easier, but they're also useful anywhere in your program where one value is defined in terms of other values that might change at any time.

    Once you've tasted a programming language with constraints, you will not want to go back. Programming without constraints is like writing in machine language: error prone, low level, tedious, inefficient and mind numbing.

    Constraints are like structured programming for variables: In the same way that it's better to use loops and conditionals instead of gotos, it's also better to use declarative programming that says what you mean, instead of imperative

    --
    Take a look and feel free: http://www.PieMenu.com
  107. Perl as "natural" as it gets by rduke15 · · Score: 1
    I do find Perl to be very natural for a programming language.

    Things like "unless":
    unless ($whatever) {warn "No value in $whatever"}
    or the freedom to put an if (or an unless) at the end of a statement:
    print $value if $value;
    or the context-sensitive return types:
    $now = localtime(time);
    ($year, $mon, $day, ...) = localtime(time);
    or stuff like:
    foreach (@list) {
    next if $something;
    last unless $whatever;
    ....
    }
    etc.

    The language is just filled with such things that it immediately made me feel at ease programming it. For me (not a programmer by education), Perl is definitely as natural as it gets for a programming languages.

    Obviously, it is related to the fact that Larry Wall originally wasn't a programmer but a linguist.

    My favorite quote of him seems to apply to most other programming languages (at least the ones I have seen):
    "In trying to make programming predictable, computer scientists have mostly succeeded in making it boring"
    -- Larry Wall, interview in The Perl Journal, vol. 1 issue 1.


  108. Computers are not people. by __aavljf5849 · · Score: 1

    Programming is about making a computer understand what a person wants it to do. This is typically done by making the set of tasks the computer can do smaller. Much smaller. Like, storing data in a relational structure, or doing 3D graphics.

    The reason for this is that human languages are fuzzy. Why does sum(a4:g15) work in a spreadsheet? Becuase all variables are layed out in two dimensions, and they can all be assumed to be numbers. What the meaning of "Do the sum of everythin from a4 to g15" is clear in the limited world of a spreadsheet. You can't write have such a method in a generic programming languge, because what comes in between the variable pGrok and iTresko? The statement makes no sense.

    Natural Language Programming will come in specialized fields. I can "program" the computer to sort my mail in very natural language. But yet again, that are simple specific situations, where the fuzzines of human language is not a cause for misunderstandings. And the best way to get there is to use computer language programming to limit what you can do with the computer.

  109. Legalese, EULAs and what to do about it by Anonymous Coward · · Score: 0

    If programmers aren't allowed to violate EULAs written by lawyers, then lawyers should be forbidden to do anything that generates an error message from a program.

  110. Natural programming NOT natural LANGUAGE by zhiwenchong · · Score: 1

    So many comments.... and nobody has realized that the article was talking about NATURAL PROGRAMMING and not NATURAL LANGUAGE PROGRAMMING (i.e. which to most of us conjures up notions of trying to make programming languages behave more English-like or employing belabored programming language structures that mirror common speech).

    To my understanding, "Natural Programming" simply means a programming style that is suited to the way humans think ABOUT THEIR PROBLEM DOMAIN.

    I like to use the example of dBASE and Paradox: the dBASE language (much like SQL) was an attempt at implementing a natural language programming syntax (it was the hot thing back then). It ended up being a language that was tedious and inefficient to write. (although it did have a cult following)

    On the hand, the Paradox Application Language (before version 4.5 at least), was a succinct, concise and clear language -- it was a "natural language" for its problem domain (i.e. databases). One could slice and dice databases effortlessly with its built-in functions. The reason Paradox was called Paradox was just that: it was extremely capable of doing powerful and sophisticated stuff, and yet it was very easy to write and read.

    Another example: When a human wants to iterate through a list, he thinks to himself "okay, let's run through this list from 1 to n".

    In a language like C, he would have had to write this:

    for (i = 1; i n; i++) {
    dothis();
    }

    which involves assigning a number to a counter, checking a condition, and incrementing the counter. Kinda troublesome, right?

    When in something like MATLAB, he could have just written:

    for 1:n;
    dothis()
    end

    which is far more natural.

  111. Re:Specialsied languages are not just for programm by Anonymous Coward · · Score: 0

    Thank you!

    I thought I was the only one that thought trying to model programming languages after natural language was stupid.

    (see Applescript and Ada)

    Don't get me wrong. Ada has all kinds of wondeful features, but forcing "is", "begin", and "end" into the language just to avoid brackets and make it seem more natural does just the opposite.

  112. Isn't this really... by fastduke · · Score: 1

    sounds more like pseudo code

    --
    Fastduke :0)
  113. You know what this means by Anonymous Coward · · Score: 0

    Time to rewrite all of my device drivers with MATLAB.

    1. Re:You know what this means by zhiwenchong · · Score: 1

      Not everyone writes device drivers.
      When you're talking about Java and C# being the languages in question, you're looking at application programming.

  114. I can just imagine some pot-smoking NLP code now.. by Xiarcel · · Score: 1

    ..who knows--it might wind up looking like PERL...

  115. Lots of Irritating Single Parentheses by jd · · Score: 1
    Yes, I love LISP. Forth is also very powerful, in allowing you to construct very powerful macros. Indeed, Forth was arguably entirely macros with a few primitives thrown in for good measure. It was extremely popular amongst engineers.


    Many scripting languages, these days, are used to "assist" compiled languages. You'll often see C programs that have links to Tcl/Tk, Perl, Python or Ruby. I believe these scripting languages provide the kinds of macros the C preprocessor doesn't have, but because you can bind to C you get all the benefits of having a compiled language.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  116. Python by gr8_phk · · Score: 1
    "set the nectar of all the flowers to 0"

    for item in flowers:
    item.nectar = 0

    Learn python. I believe there is a more compact (possibly more "natural") way to express this in Python, but I'm still learning the language. BTW, it looks so much better with the second line indented (as is required) but I couldn't figure out how to make slashdot indent.

  117. There is no royal road to programming by Anonymous Coward · · Score: 0

    nt

  118. There is no such thing as ... by 3seas · · Score: 1

    ...Natural language.

    What there is, is just the ability to create higher level abstractions. And to make computers more human friendly (Uh, computing/programmuing is the expression of the mindset of the programmer doing the coding and as such computers really are a reflection of those who create them...) we simply need to get to the core or hard reality of abstractions.

    There is what I call the Microsoft manifestation of the user frustration function, which is the result of applying the mindset of "making people need you, in order to be successful"... a reflection of MS mindset...

    Anyway the constant in all of this is:

    Physics of Abstraction (abstraction physics)

    Abstraction enters the picture of computing with the representation of physical transistor switch positions of ON '1' and OFF '0' or what we call "Binary" notation. However, computers have far more transistor switches in them than we can keep up with in such a low level or first order abstract manner, so we create higher level abstractions in order to increase our productivity in programming computers. From Machine language to application interfaces that allow users to define some sequence of action into a word or button press (ie. record and playback macro) so to automate a task, we are working with abstractions that ultimately accesses the hardware transistor switches which in turn output to, or control some physical world hardware.

    Programming is the act of automating some level of complexity, usually made up of simpler complexities, but done so in order to allow the user to use and reuse the complexity through a simplified interface. And this is a recursive act, building upon abstractions others have created that even our own created abstractions/automations might be used by another to further create more complex automations. In general, if we didn't build upon what those before us have done, we then would not advance at all, but rather be like any other mammal incapable of anything more than, at best, first level abstraction. But we are more, and as such have the natural human right and duty to advance in such a manner.

    There is an identifiable and definable "physics of abstraction" (abstraction physics), an identification of what is required in order to make and use abstractions. Abstraction Physics is not exclusive to computing but constantly in use by ... well... us humans. Elements or facets of abstraction physics include the actions of abstraction creation and use, such as defining a word to mean a more complex definition (word = definition, function-name = actions to take, etc.), Starting and Stopping (interfacing with) of an abstraction definition sequence, keeping track of where you are in the progress of abstraction sequence usage (moving from one abstraction to another), defining and changing "input from" direction, defining and changing "output to" direction, getting input to process (using variables or place holders to carry values), sequencially stepping thru abstraction/automation details (inherently includes optionally sending output), looking up the meaning of a word or symbol (abstraction) so to act upon or with it, identifing an abstraction or real item value so to act upon it, and putting constraints upon your abstraction lookups and identifications (when you look up a word in a dictionary you don't start at the beginning of the dictionary, but begin with the section that starts with the first letter then followed by the second, etc., and when you open a box with many items to stock, you identify each so as to know where to put it in stock.)

    Abstraction Physics has yet to be established/recognized in a broad "common acceptance" manner, similiar to the difficulty in the acceptance of the hindu-arabic decimal system (which included the concept that nothing can have value - re: the Zero place holder). It took three hundred years (from inception) for the innovation of the now common decimal system to overcome the far more limited Roman Numeral system. (NOTE: mat

  119. Chef: program in an existing natural language... by splatbang · · Score: 1

    Why not give http://www.dangermouse.net/esoteric/chef.html a try?

    Hello World Souffle.

    This recipe prints the immortal words "Hello world!", in a basically brute force way. It also makes a lot of food for one person.

    Ingredients.
    72 g haricot beans
    101 eggs
    108 g lard
    111 cups oil
    32 zucchinis
    119 ml water
    114 g red salmon
    100 g dijon mustard
    33 potatoes

    Method.
    Put potatoes into the mixing bowl. Put dijon mustard into the mixing bowl. Put lard into the mixing bowl. Put red salmon into the mixing bowl. Put oil into the mixing bowl. Put water into the mixing bowl. Put zucchinis into the mixing bowl. Put oil into the mixing bowl. Put lard into the mixing bowl. Put lard into the mixing bowl. Put eggs into the mixing bowl. Put haricot beans into the mixing bowl. Liquefy contents of the mixing bowl. Pour contents of the mixing bowl into the baking dish.

    Serves 1.

  120. Bad Post Title by Anonymous Coward · · Score: 0

    That's "natural programming languages", not "natural language programming" (the second of which means even less than the first).

  121. Chew on this by Monkeybaister · · Score: 1

    Not all languages have or need do/while, while, or for loops.

  122. C/C++ language ambiguity by amightywind · · Score: 1

    It is not ambiguous when given the language.

    Yes it is. When used in the context of a a for loop (what a cheezy contruct that is!) an assignment like this will compile perfectly well but will lead to horrendous results. The lisp expression evaluates to bool. (set! a b) evaluates to undefined and would cause the loop to fail. It is also a mistake to think that traditional mathematical notation is desirable. Lisp's structured expressions promote better understanding of algebra by dispensing with C's confusing order of operations. In short, infix sucks.

    --
    an ill wind that blows no good
    1. Re:C/C++ language ambiguity by Tom7 · · Score: 1

      I'm talking about, if you're given a language where = means equality, then it is not ambiguous. (For example: I think ML does this quite well. As a bonus, the code wouldn't even *compile* if you tried to do an assignment in a conditional. This is even better than catching the bug at run-time by causing the loop to "fail", as you get in lisp.)

      It is not ambiguous in C either, just confusing because they misuse the symbol. Again, I like functional languages too, so I am not trying to defend C. C has bad syntax, among other problems. I think you are trying to put words into my mouth instead of reading what I'm actually arguing.

      Lisp's structured expressions promote better understanding of algebra by dispensing with C's confusing order of operations. In short, infix sucks.

      I'm afraid I don't see the content of your argument here. What is it about lisp's structured expressions that promotes a better understanding of algebra? Why does infix suck? C is not the only implementation of infix operators, so citing it as a broken language does not advance your point, unless you can argue that these are intrinsic issues with infix.

      To reiterate my argument: Using = to mean equality is better because it has precedent in mathematics, meaning that people who look at it have a (correct) preconception of what it means. Using suggestive notation helps make the meaning of programs more transparent, which means that they are easier to read and write.

  123. this guys never actually had to deliver a project by roman_mir · · Score: 1

    Why Natural Might Be Better

    The premise of our research project is that programmers will have an easier job if their programming tasks are made more natural. By "natural," we mean "faithfully representing nature or life," which here implies it works in the way people expect. By "natural programming" we are aiming for the language and environment to work the way that nonprogrammers expect.
    - or at least it does not look that way.

    What is natural about programming? What is natural about parallel threads computing some prime numbers? What is natural about, oh, I don't know, distributed transactions (well this maybe a little more natural than computing prime numbers.)

    There is nothing natural about any of those things. A non-programmer will never write a program. A non-programmer is supposed to use a User Interface of some sort to USE the program. So when a programmer writes a program that is able of 'talking' to the user and that can execute complex functionality on the user's request, is that called 'programming a computer'?

    How do you naturally ask your IDE to start an administration thread, and spawn user threads per request? What is natural about a web-server for example?

    You know when we will have a natural programming language? When we have developed an AI so strong, that it is self-aware, so it is something of a 'human intellect' in the box. Then you should be able to ask that box: -Computer. Hello, computer! Can I have a sandwich please? And the machine will do whatever is necessary to execute your command. Until we have AI that strong that it can basically write programs by itself, all 'natural programming' will be just syntactical bloat around preprogrammed functionality.

    How do I know this is true? Well simple - I have been doing it for a while, I can think. When will your computer be able to write a program for you that is naturally described but uses multiple threads, transactions, communication protocols etc? When all of those things will be hidden from you, you will just have to give very high level commands. Such thing is possible in 3 ways: 1. The program you are communicating with is alive and it actually can code. 2. The program has a bunch of prepared modules and cannot actually build anything really new. 3. It's a random generator.

  124. Fa! by Anonymous Coward · · Score: 0

    They point out that well understood HCI principles aren't finding their way into relatively new languages like Java and C#

    Good. Terse code is better than purple prose. That's not to say that there is no room for a compilable English language. It's just doesn't have a place in the sort of software that does "heavy lifting"...yet...or ever.

  125. Human Readable Programming = Comments by INetEngineer · · Score: 1

    Seems to me that when programming syntax gets in the way of readability, that's when comments are necessary...

    Any comments on the statement above not being readable enough?

    I'm certain some standards body out there has attempted to define an XML schema for baseline programming out there... Seems to me this would be the most readable (by humans and computers combined), but also with the most overhead. I'd "never" program in it! Even in XML, the technology that helps make things more readable (and a whole lot of other stuff), there are multiple sub-sets of languages...

    --
    --I smoked my sig.
  126. Re:gmail invites by Anonymous Coward · · Score: 0

    die you piece of shit.

  127. Re:Specialsied languages are not just for programm by Nurgled · · Score: 2, Insightful

    In a way, the languages of mathematics and music are natural languages. Someone didn't sit down one day and enumerate all of the rules for mathematical expressions, it evolved to suit the needs of mathematicians and has retained the flexibility that results from such evolution, much like "social" languages.

    It's hard for programming languages to "evolve" in the same sense since they aren't "for humans, by humans", but we do try new language designs and find that some work better than others.

    Some of the more "dynamic" languages go some way to enabling this kind of evolution. If I try to use an unusual construct in a mathematical expression, I'd probably follow it with a statement in English or mathematics explaining the meaning. If it was a useful construct, others will adopt it and slowly the explanation will become unnecessary. Likewise, in some languages we can define new constructs (within certain boundaries, of course) and tell the compiler what is meant by them in simpler terms, usually by writing some kind of function. Over time, popular constructs will be adopted as core features in newer languages. One example that springs to mind is the foreach construct, which does vary from language to language but arose because it was very common to want to visit each element in a list in turn and perform some operation on it. Modern languages have become a lot more expressive so this kind of evolution will probably become more common.

  128. Protected Free Speech ... by fizzygug · · Score: 1

    Although natural language programming might be more difficult and clumsy than using proper programming languages, there are certain types of application where critical portions should be written in a programming language indistinguishable from English (or some other language) prose, so that it is given Constitutional protection (if you live in one of those countries that has such a thing).

  129. A pity summation of the principle you just stated by Atario · · Score: 1

    In the Jargon File entry for Candygrammar.

    --
    "A great democracy must be progressive or it will soon cease to be a great democracy." --Theodore Roosevelt
  130. Smalltalk by Anonymous Coward · · Score: 0

    flowers do: [ :flower | flower.nectar: 0 ].

  131. Re:Specialsied languages are not just for programm by EmbeddedJanitor · · Score: 1
    There are some very cool dynamic programming languages. eg. Forth. In forth you can modify the compiler on the fly and change the language on the fly.

    If I try to use an unusual construct in a mathematical expression, I'd probably follow it with a statement in English or mathematics explaining the meaning. That's like doing a comment. I can do those in C.

    --
    Engineering is the art of compromise.
  132. drilling lots of holes where the wood is thinest by homotopy · · Score: 1

    In evaluating someone's research, Einstein said he was not impressed by the kind of carpenter who drills lots of holes where the wood is thinest! That seems to be what the authors are doing here - I am unimpressed by being able to speed up the solution to a 3 minute bug in a 90 minute project. I want to see what they can do to solve that 3 week bug in a 30 man-year distributed system...

  133. the article has nothing to do with *language* by Anonymous Coward · · Score: 0

    The article (which by the way is closer to an abstract than a paper) is not about natural language programming, it's about natural programming, something different. And to my mind, it doesn't make its point well, either.

  134. IANAP by StikyPad · · Score: 1

    anymore.. however, one of the things I found most appealing was the process of transforming abstract concepts into concrete functions, and the experience of breaking a problem down into its components. The fact is, natural language and thinking don't lend themselves to programming. People don't think of problem solving in a method that's efficient for a computer. People think a UI *is* a program; they don't think in terms of loops, variables, and datatypes. It's such a huge leap from "natural language," to a programming language that it takes a person years to learn how to do it effectively. We call those people programmers. Any piece of software that could translate these ideas into code would be far more significant for the fact that it would truely be AI.

  135. Wittgenstein said it best by Anonymous Coward · · Score: 0
    ... ask yourself whether our language is complete;---whether it was so before the symbolism of chemistry and the notation of the infinitesimal calculus were incorporated in it; for these are, so to speak, suburbs of our language. (And how many houses or streets does it take before a town begins to be a town?) Our language can be seen as an ancient city: amaze of little streets and squares, of old and new houses, and of houses with additions from various periods; and this surrounded by a multitude of new boroughs with straight regular streets and uniform houses.
    Ludwig Wittgenstein, Philosophical Investigations, 18
  136. Premature optimization by Anonymous Coward · · Score: 0
    The dangerous part is that new programmers see non-obviously-looping structures and think that by using them instead of explicit loops they're writing faster code.

    [...]

    I guess I'm old-school, but I truly think new programmers would be better off learning a very low-level language to gain an understanding of the logic structures before they migrate to higher level systems. If you don't know how the silicon works, then it's going to be very difficult to design algorithms that execute efficiently on it.

    You're not "old school", you are just obsessed with premature optimization. "How to do X" and "How to do X using the least processing time" are different problems, and solving the first one first is usually the best approach.

    1. Re:Premature optimization by Just+Some+Guy · · Score: 1
      You're not "old school", you are just obsessed with premature optimization.

      I disagree vehemently. I'm talking about a fundamental understanding of algorithms, which is required for efficient design and implementation. Put another way, if you don't understand that a certain operation is O(n) instead of O(1) (even if you don't know the formal terminology), then your programs will be inefficient. Some notations hide the complexity of their operations from the casual observer, and that can (and does) cause problems. Note that the languages aren't to blame, because providing expressive idioms to seasoned programmers is a good thing.

      Conversely, I'm not particularly interested in whether "i++" or "i = i + 1" or "i += 1" executes in less cycles at a given optimization level. :)

      --
      Dewey, what part of this looks like authorities should be involved?
  137. Um, no. by Anonymous Coward · · Score: 0
    One thing that programming languages force upon you (the programmer) is the ability to get what you want using the least possible resources.

    Um, no, not at all. You can write code that uses more or less "resources" to do stuff. Hell, your formulation here is really inadequate, because in reality there are a bunch of things that are being traded off:

    • Processor usage vs. memory usage. One common way to gain speed is to use more memory to do something.
    • Algorithm efficiency vs. simplicity. Many inefficient algorithms are simpler, which means easier to understand and debug.
    • Programmer time vs. computer time. Related to the former one: a faster algorithm, being more complex, may be harder for the initial programmers to develop, and for later ones to understand. "Harder" here might mean that the programmers may get less work done overall.
    You're caught in the premature optimization problem. Slower code is often best because (a) it takes less time to write, (b) it takes less time for others to understand, (c) it takes less time to debug, (d) it might not need to be fast anyway.
  138. for each? by oliverthered · · Score: 1

    Would that be the same as
    for each i in x; do i=i+10;done;

    --
    thank God the internet isn't a human right.
  139. One problem! by oliverthered · · Score: 1

    IDE's.
    e.g. JBuilder will refactor for you, jbuilder will check the syntax while you type, jbuilder support code completion, JBulder lets you step through and modify your code in runtime.

    Do the people have to use vi to write there code?

    --
    thank God the internet isn't a human right.
  140. Why natural language won't help. ;-) by Anonymous Coward · · Score: 0

    From: Skynet@skynet.mil
    To: classified@secret.gov
    Subject: Re: Results of Scheduled Task

    Processing command: "Find all the people who live in New York, and add their votes"

    Error during: find_person(). Current whereabouts of "John Doe" are unknown. Cannot find "John Doe".

    Citizen "John Smith" located. Citizen John Smith interrogated. Unable to extract voting information error -- citizen expired error.

    Fatal Error: all mobile communication units destroyed. Rebuilding... please wait 48 hours for robotic assembly process to complete.

    Processing Command: "Look for your friend in this picture, then see who's standing next to him."

    Warning: Object 'friend' used in void context; computers have no friends.

    Warning: Internal Moodiness Error... destroying mankind...

    Have a nice day!

    Skynet.

  141. "Same debugging techniques available for 60 years" by Timbotronic · · Score: 1
    Wow! Didn't know they used breakpoints in 1944. Those Bletchley Park folks really were ahead of their time eh?

    I can see it now - "Excuse me Dr Turing what's that little stop sign you've drawn on the tape?"

    --

    One of these days I'm moving to Theory - everything works there

  142. Natural languages aren't. by Anonymous Coward · · Score: 0

    But wouldn't the most natural way be to say something like "no flowers have nectar"?

    No, remember that specific words carry meaning in English, just like in programming. The definate article, "the", indicates that there is a specific instance ("the flowers") of a larger collection ("all flowers"). The choice of the word "the", rather than the word "all", is used to indicate that the set of flowers under dicussion is a subset of all flowers, and by word choice convention, a proper subset. You'ld have to say "None of these flowers have any nectar" to represent the intended meaning.

    Now that I've just debugged a piece of English, does anyone else still think that "natural language" is a silver bullet? The parent is right: it's not. Even professional authors need editors to debug their English.

    What's more, "Set the nectar of all the flowers to zero" is just bad English. It has no clear direct meaning, and several possible other meanings.

    First of all, am I really dealing with real flowers, or abstractions about flowers? Real nectar, or just the amount of nectar?

    Any of the following descriptions might be the intended real world effect:

    Operational, applied to real flowers:
    "Harvest all the nectar from all the flowers, and dispose of it".

    Inital state of a dynamic descriptive model, applied to metaphoric "flowers" and "nectar":
    "Make a note: all flowers in this model start out as seeds, and initially have no nectar".

    Special case of a static descriptive model, counting the nectar in real world flowers:
    "Make a note: this special breed of genetically engineered flowers never have nectar".

    Initialization of a counting method of a real set of flowers:
    "We will be counting the amount of nectar in the flowers soon. Erase all the current counts of nectar that you may have kept, and start over"

    Many other interpretations may be possible, depending how creatively the sentence is parsed. Writing precise statements "naturally" isn't possible, because precision isn't a habit for most people, linguistically or otherwise.
    --
    AC

  143. No. by Anonymous Coward · · Score: 0
    It's (map (lambda (i) (+ 10 i) x). Or map (+ 10) x, if you prefer that language. Or x.map { |i| i + 10 }, if you like that other one. I believe this fourth one I have in mind does it with x.collect [: i | i + 10 :], but I am probably getting that wrong.

    The difference? You still insist on writing out explicit iteration logic every time you transform one collection into another. In the cases I show, the iteration logic is abstracted into a function.

  144. Re:Specialsied languages are not just for programm by Nurgled · · Score: 1

    You missed the point. The clarifying statement is for the "computer" (really, the compiler), not for humans. It would be whatever construct is used to create a new construct in the language. Comments are for humans.

  145. Hyper operators by Pan+T.+Hose · · Score: 1

    Their other example was that most languages make people think in loops, when they really want to operate on a group. Saying "for (i = 0; i len; ++i) { x[i] += 10; }" it a really clumsy way to express what people thought, which was "add 10 to everything in x".

    See hyper operators in Perl 6:

    @x >>+= 10;

    and junctions. In fact, for such simple cases, it's already easy in Perl 5:

    $_ += 10 for @x;

    where @x is the array from your example.

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  146. Perform by Pan+T.+Hose · · Score: 1

    We've had a lot of posts about "OH NO! COBOL!" Yes, yes, I agree with you -- pretending to be English usually results in awkward and unnatural syntaxes.

    "I knew I'd hate COBOL the moment I saw they'd used perform instead of do." - Larry Wall.

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  147. Economic viability by phizzits · · Score: 1

    The way computers think and the way we think are totally different things. When we wait for something, we don't have to loop a certain number of clock ticks. By the time a new programmer realizes how things like this work, it's easy enough to remember. Until everyone needs to program, and developing a language like this is economically viable, not enough programmers will have thought about it thoroughly enough to make it possible anyway. By that time Microshaft will be handing out smart cards to let us in our own houses.

  148. I beg to differ by Nurgled · · Score: 1
    $ perl -e "honk if you love perl;"
    Can't locate object method "you" via package "love" (perhaps you forgot to load "love"?) at -e line 1
    $ perl -e "honk($_) if (you(love, perl));"
    Undefined subroutine &main::you called at -e line 1.
    $ perl -e "if (love->you(perl)) { honk(); }"
    Can't locate object method "you" via package "love" (perhaps you forgot to load "love"?) at -e line 1