Stories
Slash Boxes
Comments

SoylentNews is people

posted by NCommander on Wednesday April 02 2014, @07:11PM   Printer-friendly
from the I-remember-Applesoft-BASIC dept.

An article was recently published that looks at evaluating First Programming Languages (FPL) the language to use for an introductory course of programming.

An existing issue is that formally assessing a programming language isn't really defined, with a lot of evidence being anecdotal. The proposed evaluation framework looks at technical and environmental feature sets. "The technical feature set covers the language theoretical aspects, whereas, the environmental feature set helps evaluating the external factors." These feature sets are covered in table 2 of the article (link to PDF) and consist of the following:

Technical Features

  • High Level
  • Orthogonality
  • Strongly Typed
  • Enforceability of Good Habits
  • Security
  • Feature Uniformity
  • Less Effort for writing simple programs

Environmental Features

  • Demand in Industry
  • Contemporary Features
  • Easy Transition
  • Readable Syntax
  • Quality Coding
  • User Friendly Integrated Development Environment

The article explains each of these points in details, and gives each of the languages being evaluated a rating based on this explanation, followed by a detailed explanation of how the scores of each rating can be compared this includes allowing an evaluator to weigh certain criteria they deem important against the others. As this is for choosing a language to teach someone to program with, different places will have different reasons and goals, so would want to weight things differently.

As the default weight settings do not conform to the original popularity index of the languages, so there should be a different weighting criterion. However, it is very hard to come up with a generic and correct weighting criterion. Therefore, the scoring function should be customizable and the user should be able to tune the weight of each feature based on her preferences. As an example, consider the fact that Ada holds 3rd position in overall scoring, but is not being considered among highly used FPLs as of now.

NCommander adds: lhsi was kind enough to include a summary of the results. I looked through the paper and it seems like a fairly interesting read.

Using the default weighting, the top five First Programming Languages evaluated are as follows:

Technical
  1. Python
  2. Java
  3. Pascal
  4. Ada
  5. Modula-2

Environmental

  1. Java
  2. Ada
  3. Python
  4. C#
  5. C++

Overall

  1. Java
  2. Python
  3. Ada
  4. C#
  5. Modula-2
 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 5, Interesting) by maxwell demon on Wednesday April 02 2014, @08:29PM

    by maxwell demon (1608) on Wednesday April 02 2014, @08:29PM (#25146) Journal

    For a first programming language, I'd use another list of critera, and disagree with some of those given. For example, it is of advantage if it is not used in industry, because it forces you to learn a second programming language. Knowing more than one programming language makes you a vastly better programmer. I'd say the first programming language should have at least the following critera:

    • Minimally cryptic: There should not be a steep learning curve just to be able to read an existing program (other than understanding the algorithmic content, of course, that one cannot be avoided). Prefer written-out operators to short ones (except where the operator is commonly used in school-level mathematics), and avoid double meanings (like the symbol "*" being used both as dereference operator and multiplication operator in C), subtle differences in usage (like C's a++ vs. ++a), or very similar operators with different meanings (like C'S & and && operators). Prefer written-out keywords and function names to abbreviated ones. Make the syntax easy to parse to the human brain. Avoid excessive boiler plate. Whereever reasonably possible, make slight mistakes cause error messages instead of different meanings. Remember, the first language is the one where the learner not just learns the language, but he also learns programming. The language should not get in the way of learning programming by taking unnecessary time for learning just the language details.
    • Fun to program in. That is, don't restrict the programmer more than necessary. Languages which enforce a certain programming style are great as second languages, but the first language should be forgiving wherever reasonable (except that it should not reward dirty tricks, if possible). The learner should not be fighting the compiler/interpreter, he should be encouraged to experiment with it.
    • Support for all important programming paradigms and constructs. Today, that means procedural, object-oriented and functional programming. It should also come with easy to use libraries for things people would want to do today (like GUI stuff, graphics, and maybe even basic Internet access).

     

    tl;dr:

    The first language should

    • get in the way as little as possible,
    • invite to explore it as much as possible,
    • enable to do as much as possible.

     

    Now, the second language should have different criteria. Some of the criteria given in the list are fine for the second language; especially it should be quite strict, so it teaches you good habits.

    Case in point: Back in the Turbo Pascal times, I enjoyed writing Pascal programs very much. But I'm not sure that I also would have enjoyed it if it had been my first language.

    --
    The Tao of math: The numbers you can count are not the real numbers.
    Starting Score:    1  point
    Moderation   +4  
       Insightful=1, Interesting=3, Total=4
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5  
  • (Score: 1) by Daiv on Wednesday April 02 2014, @09:10PM

    by Daiv (3940) on Wednesday April 02 2014, @09:10PM (#25161)

    I cut my teeth on Pascal in high school, then I learned Fortran, Cobol, Java (Java 2 has JUST come out!) then C++ in university. It's been long enough I remember only minimal basics of each but I'm looking to get back into programming. Anything I pick back up on might as well be my first language.

    Based on your criteria, what would YOUR suggestions be for a 1st and 2nd language?

    • (Score: 0) by Anonymous Coward on Wednesday April 02 2014, @10:10PM

      by Anonymous Coward on Wednesday April 02 2014, @10:10PM (#25194)

      I'm not the guy above but I am the guy below, and from your list, C++ or Java. C++ is in some ways practically a different language now - the change from pre-C++98 which I knew before to C++11 and 13 (particularly with boost additions to deal with some of the... weirder bits that are in the STL) is surprisingly large, and I find it makes it a much nicer language to work with. So obviously I'd suggest C++, but then I don't know Java very well at all.

    • (Score: 2) by maxwell demon on Wednesday April 02 2014, @10:43PM

      by maxwell demon (1608) on Wednesday April 02 2014, @10:43PM (#25220) Journal

      Based on your criteria, what would YOUR suggestions be for a 1st and 2nd language?

      Unfortunately I'm a bit out of touch with current programming languages. It's been a while that I've done some serious programming. I don't even really have enough time to learn everything I need for my job, so there's very little time left for really learning new programming languages, although there are quite a few I'd like to learn because I feel they'd bring something on the table which extends my understanding.

      Anyway, the fact that you've already learned quite a few languages means that anything you'll learn will not be your first language. I mean that not just pedantically: Although you may not remember the details, you should have the basic structures still in your brain, although possibly dormant; you can simply fill them with the constructs you learn, no matter whether you re-learn a language you've forgotten, or learn a new language. Through Java and C++, you probably are also familiar with the basics of OOP. What seems to be missing is experience with functional programming, so if I were in your situation, I'd look at languages which are strong in this regard. Those languages also tend to be sufficiently different that in some sense it really would be almost like learning your first language: You'll have to relearn all your concepts. But afterwards, you'll have a deeper understanding of programming (and wonder why Google's MapReduce was all the rage, given that it's just the parallelization of a natural combination of two fundamental functional programming paradigms). And as bonus, you'll not be terrified if you encounter template metaprogramming in C++, which basically consists of functional programs written in horribly complicated syntax and run at compile time. ;-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
  • (Score: 1, Interesting) by Anonymous Coward on Wednesday April 02 2014, @09:13PM

    by Anonymous Coward on Wednesday April 02 2014, @09:13PM (#25164)

    I read the criteria and immediately concluded they wanted Java to come out top, probably followed by Python or C#. Turned out that that's what happened. I think the issue is that any such list is going to be driven at least as much by the prejudices (in the academic sense, not a perjorative sense) of those who draw it up as anything. In this case they "hid" it by selecting criteria that would demand it come out as Java, Python or C#. The killer is "Demand in industry". Since when was "demand in industry" a criterium for a first language? Surely ease of use would trump it, but then we might end up with the likes of Pascal or (horrors!) BASIC entering the mix.

    Not that I've a strong opinion on an alternative -- my first language was Sinclair BASIC, then I did some QBasic, then Pascal, bits of C++ (back before C++98 was fully accepted, so I was using an old Borland compiler from the mid 90s), then Fortran 9x. These days I program in a mix of Fortran 03/08 and, when the ungainly OO syntax becomes too much to bear I swap to C++. At work I'm exclusively in C++11. I wouldn't recommend *any* of these as a beginner's language with the possible exception of Pascal (or, if very tightly controlled, Fortran 08 and C++11 and above, but the danger of tangling yourself with either of them and producing horrific code is pretty strong).

    • (Score: 2) by lhsi on Thursday April 03 2014, @07:21AM

      by lhsi (711) on Thursday April 03 2014, @07:21AM (#25373) Journal

      If you read the paper they also point out that Java is a popular teaching language anyway - so it would be a little weird if it wasn't high as it would mean that their framework was really off base. They also stress that they have created a framework and not objectively ranked languages - you can add different weights to different criteria if you like (and choose different languages to evaluate) which will change any rankings.

  • (Score: 1) by Aiwendil on Wednesday April 02 2014, @10:36PM

    by Aiwendil (531) on Wednesday April 02 2014, @10:36PM (#25217) Journal

    As someone who actually had Turbo Pascal as first language - it was fun, it was _VERY_ fun, especially after one found out how to add inline assembler (less then two weeks). Suddenly the computer went from being a unit to play on to a unit to explore and prod.

    Probably the most fun combinations of languages I've encountered so far.