Program Lang Challeng ->controled study/ survey?

I previously had posted on SDMB-GQ re: e.z. & eclectic language, so this may be considered the “sequel” though NOT a rehashment (hopefully).

Also, I decided to bring up this Q, in case nobody has ever thought of proposing such a study. But I’m only starting this thread. I’m not sure I’m qualified (as an amateur) to respond to responses. In fact, I’m more interested in feedback on the issue, which is:

I haven’t yet heard of any programming language (or for that matter, national cultural languages) ever having been subjected to a truly-controlled study (or survey - call it what you will). Or has there been such a study conducted?

Here’s a simplified proposal:

Challenge Larry Wall (author of Perl) and two more popular-language authors to create an optimal programming language which has power and eclecticness, yet is written in simple English (e.g. DO xxx TILL xxx = xxx) and avoids crypticness as much as possible. Give a reasonable deadline.

Assuming three such authors agree to such challenge, here’s the next step (upon completion of their writing the respective languages):

Solicit 30 intelligent students who have never learned any programming languages before (and thus are without preconceived-bias). Request that they participate in a study comparing the user-friendliness of programming languages.

Divide them into 3 groups of 10 each
Group A=10
Group B=10
Group C=10

Keep the identities of each of the 30 students secret from all the rest.

Request that Group A students learn both:
Larry Wall’s newly-minted programming language
Bill Gates’ newly-minted programming language

Request that Group B students learn both:
Larry Wall’s ditto
John Doe’s ditto

Request that Group C students learn both:
Bill Gates’ ditto
John Doe’s ditto

As each student finishes learning both languages, request that s/he vote on which language s/he found easier to learn.

Repeat the above study/survey with a second group of 30 students.

The contestant whose language wins the most votes would be the winner, & thumbs-up to his/her language.

It’s unclear to me what you’re asking. If you’re asking whether the method of each student learning two languages should, statistically, lead you to the easiest language, then Yes, probably. (I’m not sure why you’d be asking about this part, but you went to such great trouble to explain it all…) It’s not the best way to do it, though, and I can think of three main problems:

  1. 30 people is a pretty low sample size. You say to repeat it, but why don’t you just get it all done at once?

  2. You’re not asking the students to rate the languages based on what you asked the creators to make them on. You say that they should “create an optimal programming language which has power and eclecticness, yet is written in simple English…and avoids crypticness as much as possible.” You then ask each student to “vote on which language s/he found easier to learn”. If ease of use is the only criterion for judging, though, then I can write you one that’ll get your “thumbs up” right now. It won’t be able to do jack, but I can teach it to you in 60 seconds.

  3. There’s a good chance that your method will be inconclusive. I think you’d get more telling results if you asked everyone to learn all three languages.

If that’s not your question, if your question is, “Are there any problems with this project as a whole, in theory or practically?” then my answer is, I can only think of about a billion, but I’ll let the people who know more about programming bring them up. :slight_smile:

Consider giving someone directions to your house. In English, you might say:
“get on Highway A, going west. Exit at McArthur, and go down to the 7-11 and make a right. My address is 12345.”

There is plenty of information here that must be inferred by the reader. In pseudo-code, I might write the same instructions:
“Take ‘Highway A’, west.
Take ‘McArthur’, north.
While (notpresent(‘7-11’)) {
DriveStraight.
}
Turn(right).
While (notpresent(‘12345’)){
DriveStraight.
}
Park.”

And that assumes that “notpresent” has been defined, and is fairly smart and that “Take”, “DriveStraight”, and “Park” have been defined elsewhere.

Bottom line is: People can infer things, so a loosely structured natural language works just fine. Computers have to be told everything, so they must have a rigidly defined language. In the interests of brevity, that language is often made cryptic to the uninitiated.

Programming is more closely related to Mathematics than it is to prose, and it shares the tendency to accumulate arcane notations for clarity’s sake.

To rephrase TheNerd, both mathematical and programmatic notation become arcane because they attempt to concisely express concepts that do not have references in ordinary intuition. In ordinary language I might say, “Shuffle a deck of cards” or “Compute the state vector of an electron in a magnetic field.” Both of these imperatives are quite easy to “understand”; even a layman can infer that a “state vector” is some quality that can be derived mathematically from the known properties of some object called an “electron” under the circumstances of a “magnetic field”.

However to actually perform (or precisely specify how to perform) these actions is virtually impossible even in a language a programmer or a physicist already understands from childhood! English is far too imprecise and doesn’t contain referents for the most basic concepts inherent in the specific implementation of those tasks.

The difficulty in learning mathematics is not to understand the notation, but to understand the concepts represented by the notation. Much the same seems to be true in programming. English is a good language for gaining understanding; mathematics and programming languages are a good way for specifying a series of precise steps.

To follow up on TheNerd’s post: If I were giving someone directions to my house, the easiest way would NOT be natural-language instructions like “get on Highway A…”. The easiest to understand way of presenting the information, both for the person giving the directions and the person using them, is in the form of a map. Similarly, if I’m trying to get a computer to list all of the prime numbers less than ten million, say, then it’s much easier to communicate that in a language based on math, i.e., a programming language.

jally,

Still thinking about this, huh?

This may tell you which language is easiest to learn, but it might not tell you which language is easiest to use.

A computer language must empower the programmer to accomplish something useful. To be meaningful for what I believe to be your intent, you would first need to arrive at a specification for the language (believe me, you don’t EVEN want to see a language specification… but if you do, check out the following link to the java language spec: http://java.sun.com/docs/books/jls/html/ ). Of course, you wouldn’t want to completely specify the language or that might restrict some of the “out-of-the-box” thinking you’re looking for, but you need to insure all of the languages have equal capabilities. You should also propose a number of test problems for the language authors to solve, that help to define the target application space.

I don’t think it’s ever been done this way… Usually new languages come about because somebody says, “This language sucks! I can build a better one!”

Where are you going to find 30 people who know no programming languages but are interested in learning two languages?

It has already been said that ease of leanring is not related to ease of use.

But I can tell you what the results of your study will be. Unless the first language learned is much simpler than the second, your subjects will find the second a lot easier to learn. When you learn your first language, you are also learning concepts of programming; when you learn your second, you already have the basic concepts down.

There is something about this apparent oxymoron that rings true.

I would add that unless you just want to learn programming just to entertain yourself (which is cool), you should consider what languages are the most popular. I am a mainframe COBOL programmer. A few years ago I decided to switch to PL/I because it is, IMO, a much better language. I switched back after I realized how many more shops use COBOL than PL/I.

One more thought on this subject. “Easy to learn” is a subjective quality. Different people are wired in different ways. One person might find a procedural language easier to learn, while another might find a functional language easier. One person may prefer ASCII based code, while another might like a GUI based programming language. One person may prefer explicit type casting, while another might prefer ambiguous variables that can take on any kind of value at any time.

Well, here I am again (despite my O.P. about “just starting the thread”) since I got so many email notifications.

Here’s a rough response:

On the issue of “easy to learn” not necessarily translating into “ease of use”, in my O.P. I used the term “eclectic” by which I meant the best capabilities of all languages, and that meant their power too.

On issue of “30 students not being a true acid test”, in my O.P. I used the term “simplified proposal”. It could just as well have been 300 students.

Why 2 (instead of 3) languages? Cuz it’s less bother for any student, & clearer to decide between 2 than 3. Yet still, each language will have been learned by the same amount of students (in this case, 20).

Matrix made an astute observation about the only point I overlooked; re: the 2nd language becoming naturally easier for students to learn. So… I guess the answer to that would be to have an experienced programmer devise a more foolproof controlled study. Finally:

To Joey (btw, Joe, this isn’t a rehashment, rather a new angle; did you see my o.p.? :wink: Nerd, Feynman & Chronos:

I don’t know that languages must be that “rigid”. Perhaps languages can offer the same concept offered by WordPerfect’s pre-defined and user-defined keyboards? Or else, perhaps they can spoon-feed people not like the wizards, but rather like NoteTab’s htm editor? I’m not sure the latter is feasible considering how convoluted programming can get, but it’s just a thought.

Actually, these posts are not-so frivolously motivated. It’s only because I very much desire a certain type of website, which involves an unusual forum-script and search & select. I created a demo-site for same in html, but I have no idea what it would take to program that site (which is based on an existing, less-detailed site.) And really, the only programming I’d want to learn is just those commands necessary for successfully programming the forementioned. To give an idea of a similar type of site I had in mind, I’ll post it lower in this thread. (just if you’re curious)

Imagine the below 3 people:

Sal has experienced:
traffic accident
diabetes
spousal abuse
inability to vomit upon nausea

Al has experienced:
traffic accident plus near death experience
polio
bad asthma

Val has experienced:
consistent bad luck / freaky timing
polio
spousal abuse

Every one of the above people would like to connect to others who share most or all of their experiences. (Note that none of the above is a truly good match for any of the other two, since only one of each of their experiences matches any of the others).

Wouldn’t it be great if some genious at Google (or wherever) could program a Victims Clearinghouse website, wherein members who register (as in forums registration) could enter their conditions/experiences, whereupon they’d be entitled to search the databank to try to find others who share most of their background. For example, Val could enter “bad luck bad timing polio abuse” as her search terms; Al could enter “traffic accident nde near death experience polio asthma” as his search terms, and so on.

Furthermore, the conditions for inputting one’s symptom(experience) listing into the databank should be very flexible, as well as allowing for a large number of search terms to be entered and successfully searched. Another alternative (besides a google-type search) would be to pattern the search similar to AmericasEmployers or CareerMosaic.

Languages must be very rigid.

Your question is kind of like asking which is better for communication: the phone, snail-mail, or e-mail. It depends. Different languages are better suited for different situations. Also, what I like to call elegance is not related to how successful a language is.

If you want to learn programming so that you can write a search program, let me tell you, you will not learn how to program an effecient search algorithm is any language’s 101 class.

jally:

When I wrote:

There was an implied wink in there… I knew you were looking at it from a different angle.
you wrote:

I agree. My point is that SOME people find rigid (structured) languages easier to learn - others feel more comfortable with free-form (unstructured) languages. My point is that it is an individual preference. When you’re trying to measure ‘ease of use’, individual preferences could seriously skew your results. I suppose a sufficiently large sample size would tend to normalize these effects…

OK, I read your responses (Joey’s differing than Matrix). Still, it would be interesting if PC Magazine or whoever could devise a study and publish the results, the way they compare computers & peripherals. also, re: what Matrix said about search algorithms, aren’t some good search engines made available as public domain software which can be incorporated into programs?