Picking the First Programming Language

A recurring question in computer science education at all levels is what language should be taught first. The discussions on this issue at Slashdot, where the issue comes up about once a year as far as I can tell, are legendary. There are various arguments that are used:

  • It should be a language used in industry so students can get jobs

  • It should not be a language used in industry - we're not a trade school

  • It should be a language that was developed specifically developed for teaching

  • It should be a very high level language

  • It should be a very low level language (assembly language

  • It should not be a proprietary language

  • It should be available on a lot of platforms

  • It should be available from multiple sources

  • and on and on and on

It seems to me that the first thing one has to do in order to make a good selection is to remove the irrelevant arguments from the issue. For example, a language being used or not used in the professional job market is not in and of itself relevant. In a first course one is not trying to create a professional programmer (even though some have gotten jobs with little to no formal training) so the fact that a language is used for professional work in not important. Likewise that a language is used by professionals is not per se a reason to discard it. Now there may very well be things that make a language a good choice for professionals that either do not contribute to learning in a first course or even make it to complicated to use. But that the simple fact that professionals use the language does not automatically mean it is not good as a teaching language.

Another completely irrelevant argument is over avoiding proprietary languages. Cost may (though it rarely is) an issue but generally schools can easily afford proprietary languages. Compilers and even IDEs are available for free for proprietary languages like Java and Visual Basic .NET. Often when I hear the argument that proprietary languages should not be used the issue is mostly philosophical and very often another way of saying "Microsoft Bad." Individuals who reject C# (which is not proprietary as the term is properly used) and promote Java (which is proprietary) by saying that they don't want to use proprietary languages generally fall into the "Anything but Microsoft" camp and are often confused about what is and is not a proprietary language anyway.

A semi-relevant argument is the one about tools being available from multiple sources. But to be honest I think that is more valid in later courses  than in a first course. In a first course keeping it simple is important. I think that this is easier if every student is using the same tools as the ones being used by the instructor in class. Being available from multiple sources is a relevant argument for a lot of things but not for a first course in programming.

The next big thing is to identify what things are relevant. In my opinion what is relevant are the things (features and tools) that help one teach the important concepts of the course. If for example object orientation is important than languages like FORTRAN, COBOL and PASCAL are not good candidates even though there are some versions of those languages that support OOP they are not really designed for it like C#, Java or Visual Basic .NET. If you are trying to teach strictly functional programming than something like Scheme is going to jump out as a natural choice while Java or C is clearly going to get ruled out pretty much automatically. I could go on about this but you probably get the idea.

Things like how simple is the syntax, how easy to use is the debugger, how good are the error messages and related things are also relevant. Although to some the issue of using or not using a debugger is a source of major controversy. I may take that one up in a later post. But if you are going to use and IDE it's available features are relevant.

So it is a complex question with no simple answers. A lot of times the instructors level of expertise with given languages is also going to be a factor. It's hard for me to second guess the choices someone else makes unless they are clearly failing at teaching or getting the students to learn. Of course lots of second guessing does go on. There is as much politics in computer science as anything else. It makes life interesting. Yeah, I think interesting is the word I want.

BTW I read an interesting post today that is related to this topic. It was at Lance Fortnow's blog. The comments are the best part so don't miss them.


Comments (10)

  1. Great post by Alfred Thompson . We encounter this discussion all the time. Educators look to Microsoft

  2. Anthony Tarlano says:

    I would pick the Python programming language. Additionally, I would use this free online book by a high school CompSci teacher in Fairfax, Va to teach the course.


  3. Tom Hoffman says:

    Hi Bill,

    You don’t do a very good job of either presenting or refuting the arguments for using free software programming languages.

    First off, there is nothing wrong with an educator using free software for philosophical reasons.  Teachers often make decisions for philosophical reasons.  I’d be frightened to trust my kid with someone who didn’t.

    Now, what do you get with a free software license?

    1) the freedom to use the language for any purpose.

    For schools, the most important part here may be that this right doesn’t expire.  You don’t have to renew the license, you can’t be forced into paying for an upgrade.  This isn’t a limited educational version, you can use it to write and deploy any kind of application you want.  

    2) the freedom to study how the language works and adapt it to your needs.

    Is this of practical value to 90% of the kids in an intro class?  Probably not.  Is it of value to teachers who really want to understand what they’re teaching and kids who are fired up about programming?  I think it is.  Good programmers learn a lot by reading well written code.  You can read and learn from code that would be too complex for you to write, or understand completely.

    But beyond that, yeah, this is a philosophical issue.  I believe that computer science is a science, and I can’t imagine being in another science class, like biology or physics, where a student would be told, say, "Well, as a matter of fact, mitochondria do have their own RNA, but I can’t tell you why, because that is a trade secret."  We should value engagement and drilling deeply into issues, without running into black boxes and proprietary code.

    3) the freedom to redistribute copies.

    This is very important for schools.  The language isn’t limited to specific computers in the school.  It can be installed at home by students.  They can install it on their friends computers and show their friends how to program.

    4) the freedom to improve the program, and to redistribute your changes.

    Maybe not a big deal on the local level, but globally, it means that derivatives can be created that may suit local or educational needs better than the generic version.

    Also, cross-platform compatibility does not always accompany free software, but it often does, and it is important for keeping schools’ options open for their OS platform, and it ensures that students can use the software at home.

  4. Tom Hoffman says:

    Whoops.  I’m on crack.  I meant "Hi Alfred," not "Hi Bill."

  5. Peter Rock says:

    Alfred says:

    "<i>Another completely irrelevant argument is over avoiding proprietary languages.</i>"

    This is disturbing. It is, of course, disturbing in and of itself, but even more so that – as a teacher – you make this claim.

    As Tom stated, you have not presented this argument well at all. Personally, I do what I can to avoid teaching students how to use any proprietary languages or user-level applications. I would like to know how you reason that my choice is "irrelevant".

  6. Well Peter, why do you avoid teaching students how to use any proprietary language or user-level application? How is that relevant to the concepts you are teaching or any other educational goal?

  7. Tom Hoffman wrote a long and very interesting reply to my previous post for which I am very grateful.

  8. Peter Rock says:

    Hi Alfred,

    I felt my response to your question to be deserving of its own post. You can find it here…




  9. Items says:

    Наткнулся тут на интересные посты по поводу обучения computer science .(Смотри ссылки раз , два и три

  10. I see that Susan Canaga is bringing her school’s discussion on programming languages looking for industry

Skip to main content