Stories
Slash Boxes
Comments

Dev.SN ♥ developers

posted by NCommander on Wednesday April 02 2014, @03: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 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, Insightful) by SplawnDarts on Wednesday April 02 2014, @03:19PM

    by SplawnDarts (3962) on Wednesday April 02 2014, @03:19PM (#25092)

    This study assumes that making a first programming language easy, friendly, and useful is necessarily a good thing. I'm not sure that's false, but I'm certainly not going to accept it without proof. Anecdote-wise, my first language was HP-48 RPL. The first program I wrote of any consequence did symbolic integration (including trig subs, U substitution etc) vis STRING MANIPULATION in that somewhat unfriendly language. Was it easy? NO. Was it useful? Not really. But nothing I've ever had to program subsequently has ever been even vaguely as hard, and that has some value - I know I can program pretty much anything I can conceptualize.

    Hard programming may in fact be a one-way ticket out of larval stage.

    Starting Score:    1  point
    Moderation   +4  
       Insightful=3, Interesting=1, Total=4
    Extra 'Insightful' Modifier   0  

    Total Score:   5  
  • (Score: 1, Insightful) by Anonymous Coward on Wednesday April 02 2014, @03:32PM

    by Anonymous Coward on Wednesday April 02 2014, @03:32PM (#25101)

    It depends on why you're learning the programming language. I think you have the right idea for people who will go on to a job where they need to program regularly. Other people just want to get an idea of what "programming" is about, much like I took history 101. If your goal is simple exposure to the concepts, ease of use is an extremely important criterion.

    • (Score: 3, Informative) by lhsi on Wednesday April 02 2014, @03:43PM

      by lhsi (711) on Wednesday April 02 2014, @03:43PM (#25110)

      It depends on why you're learning the programming language. I think you have the right idea for people who will go on to a job where they need to program regularly. Other people just want to get an idea of what "programming" is about, much like I took history 101. If your goal is simple exposure to the concepts, ease of use is an extremely important criterion.

      One of the non technical features is easy transition, I.e. how easy it is to then teach another language after the first. As the framework allows for weighting you could weigh that highly to chose a language that is a better jumping off point to other languages. Demand in industry is another of the weightings if the selection was just going to be job based.

  • (Score: 2) by lhsi on Wednesday April 02 2014, @03:37PM

    by lhsi (711) on Wednesday April 02 2014, @03:37PM (#25107)

    The article proposes a framework that allows selection of a language of a course to be weighed according to what sort of language you want. You could weigh it to select a more technically challenging language if you desired.

    Of course if you just wanted to teach someone something unfriendly and hard you'd just pick assembly or brainfuck and ignore the proposed framework altogether.

    • (Score: 4, Interesting) by VLM on Wednesday April 02 2014, @04:00PM

      by VLM (445) on Wednesday April 02 2014, @04:00PM (#25125)

      "teach someone something unfriendly and hard you'd just pick assembly"

      The problem is not setting the goal. The paper talks about educating computer scientists, and then lists criteria for vocational training of IT people. Going a third direction anyone can teach assembly to a EE / Verilog designer a lot easier than trying to hop right from NAND gates directly to Clojure, or even just mere Pascal. I wouldn't advise skipping machine language when hopping from NAND gates to assembly, but I guess you could do worse. At least pick a sensible comprehensible architecture like the PDP-8 had, then you can literally understand the whole simple system from transistor up to OS design, later branching out into other more complicated systems. And no I don't remember today how the wiring worked for the auto-incrementing address range system or all the IO ops, but I did understand them completely once...

  • (Score: 2, Insightful) by Ethanol-fueled on Wednesday April 02 2014, @03:46PM

    by Ethanol-fueled (2792) on Wednesday April 02 2014, @03:46PM (#25115) Journal

    "Hard" programming is a sure-fire way to turn new students off of programming, because not everybody is a whiz-kid like you are. Of course, turning people off to programming is an idea I like, because the more of us are floating around, the less each of us will generally be paid.

    I think it's funny that the most frequent recent language in the article is Java, because there's a lot of bullshit in it (starting with that everything has to be a class) that is not necessary for simple operations like converting Celsius to Fahrenheit. C++ came in second, and personally I think it's ideal for a first programming language - You can start writing out only what you need done, and introduce classes later, and in between learn functions and pointers/references (the understanding of which is important to the understanding of how a computer works). It is important to reinvent the wheel in certain cases to get a better understanding of how things operate before you get unfettered access to all those libraries that do all the work for you.

    Sure, Java and Python allow you to concentrate more on the algorithm, but having C++ as a first language really allows the student to question if Computer Science/Engineering (as opposed to say, a degree in just programming if offered) is really for them. C++ is the best of both worlds -- high-level with low-level features -- and of course a good way to learn how many ways you can shoot yourself in the foot.

    • (Score: 2) by lhsi on Wednesday April 02 2014, @03:56PM

      by lhsi (711) on Wednesday April 02 2014, @03:56PM (#25120)

      I think for the environmental criteria Java has quite a big benefit from the demand from industry section - have a look at table 11. If that isn't a major requirement if you're choosing a language you could weigh it less in the framework.

    • (Score: 4, Insightful) by SplawnDarts on Wednesday April 02 2014, @04:02PM

      by SplawnDarts (3962) on Wednesday April 02 2014, @04:02PM (#25127)

      I'm OK with turning people off programming. Far too many people are in CS who don't belong there.

      C++ Isn't a bad choice, were the console IO not so horrible. Seriously, the way I print to the console is to use the overloaded shift left operator? I can't even imagine standing in front of a classroom and trying to explain that with a straight face.

      C out of the K&R book is a better choice IMO.

      • (Score: 2) by umafuckitt on Wednesday April 02 2014, @04:42PM

        by umafuckitt (20) on Wednesday April 02 2014, @04:42PM (#25152)

        I'm OK with turning people off programming. Far too many people are in CS who don't belong there.

        You're apparently assuming that everyone who learns to program is in CS. They're not. I'm a neuroscientist and my major was also neuroscience. So in college I learned biology-related stuff and pretty much nothing else. Now that I'm a researcher I produce large volumes of fairly complicated data and the only way to analyze it is to program. A lot of people in fields such as mine had to learn to program and a lot of us have chosen MATLAB or Python, since these are high-level enough to make the stuff we need to do easy. Now I'm dabbling in C++ because I'm building hardware with microcontrollers. "Scaring away" people like me from programming has negative implications for a range of research topics. Conversely encouraging people like me to do a little programming college would make people's early research careers easier. In particular, it would be valuable to have courses that teach good coding practices early on. As it stands, a lot of us have to learn optimization techniques and best practices the hard way. This is a big waste of everyone's time.

        I realise that biologists who've learned to code have a bad reputation in certain circles, but some of us are better than others and we're willing to learn. Furthermore we need to learn. In some labs I've seen the data and interpretation carried out by the biologist and the coding and analysis done by CS people. The result is usually not pretty. The CS people don't understand the biology and waste lots of time doing unnecessarily complicated stuff that isn't relevant to the issue at hand. The biologist, if he doesn't code, doesn't realise that the CS people are barking up the wrong tree. He also doesn't understand what they're doing (partly because it's over-complicated in the first place). The CS people think that "biology is easy" and don't put in enough time to learn what the experiment really is. The end result is a Frankenstein's monster. In some labs a biology/CS partnership can work if each side puts in effort to learn about the other.

        • (Score: 4, Insightful) by VLM on Wednesday April 02 2014, @05:40PM

          by VLM (445) on Wednesday April 02 2014, @05:40PM (#25178)

          I think you'd do a lot better with IT than CS.

          To do CS I had to sit thru automata theory classes and the whole proof of 3SAT being NP complete and all kinds of computer science stuff that important to the science of computing machines but irrelevant to making most code for most things. Sounds like you need IT classes, like an intermediate Python class or C++ class, or maybe a systems analyst class, or a modern DB class. If you're in one of my CS classes where you hear all about lambda calculus and the y-combinator (not the VCs, the real thing) then you're probably in the wrong classes.

          So yeah, there's a lot of people gaining an intimate knowledge of red/black trees and converting NFAs to DFAs who really belong in a code slinging class not CS. I agree with GP post, there's a lot of people in CS who totally don't belong there.

          And there's nothing wrong with code slinging, just like there's nothing wrong with sitting thru yet another proof of yet another obscure NP complete problem. But there is something wrong with the IT folks or most neuroscientists taking CS classes when they need IT classes. Just like if a bunch of chemists invaded your field, because, hey, neurotransmitters are just chemicals, so its all good right?

          Sounds like your lab needs IT guys who know a lot of neuro. I agree, you really don't want CS guys there other than interesting philosophical discussions and internet debate sessions.

          I've made a lot of money for a long time by being a guy who knows EE, especially telecoms, and especially EE telecoms RF, inside and out, and also can sling at least some code and admin some machines when I have to. So I think I know exactly how you feel, other than you being a neuro-bio guy. My CS degree was a pure hobby after I already had 20 years experience in the industry doing this stuff, and it is of course completely useless on the job, although it was huge fun. So I'd strongly advise finding IT type classes which you can actually use and not doing the CS stuff at all other than as a hobby when you've got time.

          • (Score: 2) by umafuckitt on Wednesday April 02 2014, @06:45PM

            by umafuckitt (20) on Wednesday April 02 2014, @06:45PM (#25222)

            Yes, I see what you mean. I wasn't suggesting people like me need CS classes but that they need basic programming classes before being launched into research. I suppose our needs are closer to what may be taught in an IT degree than to a CS degree, but really all we need to know is how to do some fairly simple computational stats using a programming language. So stuff like PCA, clustering (k-means, hierarchical, etc), classification (linear discriminant analysis, support vector machines, etc), linear models, bootstrapping, cross-validation, etc. Stuff like that.

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

          by Anonymous Coward on Wednesday April 02 2014, @06:06PM (#25193)

          If you're dealing with large amounts of data I'd actually recommend you extend your dabbling with C++ to work, too - or at least to some other lowish level language, because reliance on the likes of Matlab and Python are going to be killing your runtimes. Dedicated C and C++ methods are easy to call from Python (give http://www.swig.org/Doc1.3/Python.html [swig.org] a look), which gives you the best of both worlds -- Python to set a problem up, and native code to get the performance boost. (Fortran works well with massive datasets since ultimately they're just big arrays and that's still one of Fortran's major strengths, but it's a bit of a pain to call from other languages, though you could run through C interfaces to get there which wouldn't be too shabby, so long as you were careful to invert your matrices along the way which itself comes with a penalty cost; depending on the situation you may well find yourself better sticking with C-like languages.)

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

          by SplawnDarts (3962) on Wednesday April 02 2014, @06:10PM (#25195)

          I'm was at least half joking. For scientific computing types, python with NumPy/SciPy etc. is GREAT!

  • (Score: 4, Insightful) by The Mighty Buzzard on Wednesday April 02 2014, @04:02PM

    by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@soylentnews.org> on Wednesday April 02 2014, @04:02PM (#25129) Journal

    This is exactly why I'd say make their first language C. It defaults to just barely usable enough that you can write useful things while learning.

    As for good habits... A lot of those depend entirely on the language you're using. If python gets you so hung up on whitespace that you think it actually means anything to most languages, you're in for some nasty headaches. Learn the language and the customs but never form habits. A foolish consistency is the hobgoblin of little minds.

    --
    123
    456
    789
  • (Score: 4, Informative) by melikamp on Wednesday April 02 2014, @04:15PM

    by melikamp (1886) on Wednesday April 02 2014, @04:15PM (#25134)

    I agree. I have a huge issue with security: why does that matter for FPL? Isn't the point just to teach basic programming? No first year will even begin to understand the concepts related to the security anyway. Demand in industry is also dubious; the industry uses more than a dozen languages, so the CS majors will have to pick up most of them anyway: some in higher-level CS classes, and others on their own time. Learning a relatively "useless" language may be a great trade-off, as long as it really helps to be more proficient with "useful" languages later on. Why bother with "contemporary features" if they are not even taught, as TFA itself says? And, of course, the development environment seems largely irrelevant for writing programs like "hello world" and basic sort, and can only produce pointless instructional overhead. (This alone should spell doom for Java, which I personally found really hard to use outside of DE.)

    Even though the other metrics are sensible, this whole study doesn't conclude much for my money, since it is hopelessly subjective and the goal is unclear. The one true way to evaluate FPLs is to set a measurable criterion (for example, performance in following CS courses) and do a statistical experiment, where first years are assigned different FPLs randomly, and 4 years later their academic performance is compared.

    Finally, I'd like to go out on a limb and to suggest that the only language to be taught for its own sake should be Common Lisp. The reason is two-fold: it has very nice features, of course, but it also is one of the hardest to learn on your own. And its features are indeed awesome. It is multiparadigm, allowing for declarative, functional, or OOP style of programming, either in their pure form, or mixed together. Its OOP facility, CLOS, is probably the most powerful and flexible one around. It has dead-simple syntax. It can be both interpreted and compiled, which is an awesome thing to have in a classroom. It has an amazing array of built-in types: (long arithmetic) Gaussian rationals, floats, strings, multidimensional arrays, single-linked lists, and hashes, to name a few. It checks types at run-time, and it collects your garbage. It has an incredible reference: the hyper-spec, which is also its official definition, to which implementations must adhere. It is not a highly used language, but this may very well be the consequence of it being hard to learn on your own. I believe that if taught, it would quickly enter the mainstream.

    • (Score: 1) by Heathen on Wednesday April 02 2014, @04:54PM

      by Heathen (965) on Wednesday April 02 2014, @04:54PM (#25157)

      I disagree that Java is hard to use outside of an IDE for basic programs like hello world. Such programs can ignore features like packages and concentrate on the basics such as loops and conditional statements. There is a minimal amount of boiler plate code (public static void main), which can be initially ignored.

      1. Save HelloWorld.java
      2. javac HelloWorld.java
      3. java HelloWorld

      Granted it's one more step than Perl, but I don't consider it to be that much harder.

      • (Score: 2) by melikamp on Wednesday April 02 2014, @05:12PM

        by melikamp (1886) on Wednesday April 02 2014, @05:12PM (#25163)
        You are probably right, I never gave Java a second chance :)