Do We Need A New Teaching Programming Language

I saw some discussions lately about the need or lack of need for new programming languages. In once case especially for teaching programming. In general I think that new programming languages are a good idea. From time to time it is good to start fresh and incorporate the latest ideas in a language that was designed from the ground up. C# is one example. Java is as well. Although personally I think C# is better having been able to learn from the mistakes made in Java. F# is still another example. But none of these were designed for teaching programming. The last big success in that area was PASCAL.

PASCAL was widely adopted for education and in fact was the first programming language of the APCS exams. It fell out of favor largely because object oriented programming became the standard programming paradigm in education. Before PASCAL we had BASIC which was designed as a language for beginners to use to learn programming. BASIC had its critics but there were sure a lot of people whose first learning about programming came from the BASIC that came with  their personal computer.

Today first programming languages are all over the map. There is Kodu for the very young. Alice and Scratch for middle school (and up) and at the high school level we see Java (largely because of the AP exam), Visual Basic (and other versions of BASIC such as Small Basic), C++ (yes still and seeing a resurgence of sorts), C# (especially with the ability to create games with XNA) and Objective C (for some robotics and iPhone applications). Python seems to be picking up steam of late. And yes, in some areas, Scheme, which is a functional language, is being used. DrScheme is in fact designed for teaching as are Alice, Small Basic, and Scratch. So it is not as if languages designed for teaching don’t exist. But are they the right ones? That’s a question to start a debate.

Speaking of debates, just about any time someone asks about what the first language for teaching should be someone will suggest Assembly language. Now that works for some people. Bill Gates started with Assembly language for example. Worked for him. I’m not so sure it works for everyone or even for more than a few people. Eventually people are better off if they learn it but it is not a great first language.

SO what should a teaching language be like? I would suggest that a simple syntax with limited keywords would be a good start. Should it be an object oriented language that lets users create objects? I’m not so sure we need that right away. Use objects – Yes! Create objects? I’m on the fence. The objects first crowd would howl about that but I am not convinced that we need objects first. See mark Guzdial’s There is no “First” in CS1 What I want in a first teaching language is simplicity and creating classes is all too often not simple enough.

Strong typing or weak? Early or late binding? Does it really matter? Think simple. And always remember that you can’t teach all of programming let alone all of computer science in the first course.

I really like the graphical programming in Alice and Scratch. My biggest issue with them both is that dealing with variables is not easy enough. It’s not hard but it is also not obvious enough. Also input is too limited for my way of thinking. On the other hand Small Basic has much of what I like but has more syntax to mess with people. Syntax aside Small Basic has one other thing going for it that I really like – the graduate button. Small Basic has a simple and smooth transition path to Visual Basic which is a full featured Object Oriented language with professional strength IDE and everything. Alice looks like it will have a path to Java but it is still “coming” and when you get there it is still Java. I’d be happier it if took one to VB or C#. Either way a good teaching language should have a smooth path up the latter to professional tools.

Do we need a new language? Some are saying that Python is it. I’m not so sure.It may already be too complicated. Small Basic, in my opinion, is great in that it allows us to start younger and has a path upwards. Something with the drag and drop style of Scratch and the Windows Forms features of Visual Basic and C# would be really cool. Especially if there were a “graduate button” to a next level language. What do you think?

Comments

  • Anonymous
    November 30, 2010
    The comment has been removed

  • Anonymous
    December 01, 2010
    I tell my students that there are four things you need to be able to tell a computer to do: Process data (assignment) Make decisions (if) Loop (do - while, for) Use indexed storage (arrays) If you can do these four things you can write every program that has ever existed. Sure, the code won't be pretty, but it will solve the problem. In my course we focus on algorithms at the start because this is where we actually create behaviours that solve problems. Once you can make algorithms everything (and I mean everything) else in Computer Science is about using this raw problem solving ability in the most useful way. This spreads out into things like modelling to get the spec, objects to organise and structure the solution and testing to make sure it works. Higher levels of abstraction are great, but I think you still need that algorithmic focus to get going. If you can't do that bit everything else is built on sand because you don't understand what the computer really does.  Empowering domain experts sounds great, but I don't think we will get to that level in my professional lifetime. Starting with assembler looks quite sensible at this point, because it really brings into focus what computers actually do and how stupid they really are. I teach in C# because I want the students to be able to achieve things they perceive as useful quite early on in the learning process, which would be hard to do in assembler. If I had more time I would look at doing something assember based. I don't really think we need a new programming language (although inventing them is fun I suppose). I've got a kind of downer on "teaching" languages really as I don't think that languages like C# or VB are that hard to teach as long as you root the work in a strong problem solving context. I'd much rather put the precious teaching time that we have into giving skills that will be properly useful, rather than using any kind of intermediate language that doesn't really go anywhere. As a tool for engaging people with programming I think things like Alice and Kodu are great, but I like to think that when the students get to our level they should be taught with professional level tools. In a school setting I suppose I might think differently perhaps.

  • Anonymous
    December 01, 2010
    The comment has been removed

  • Anonymous
    December 01, 2010
    I AM speaking of a whole new programming paradigm and only relate it to graphical programming languages to provide a grounding.  Rob, you assumed that moving into the 'graphical' realm means losing touch with bit and pointer direct manipulation.  I am speaking of an executable design language that spans from machine code up to transactional memory for effectively dealing with the complexity of parallel programming in emerging manycore processors.  Sorry, but none of the extensions on programming languages performed by researchers over the last four years have slain this complexity beast. The right level of automation would provide a tremendous teaching medium to overcome the acute shortage of properly trained developers who can collaborate in an ever increasing systems world.

  • Anonymous
    December 02, 2010
    The comment has been removed

  • Anonymous
    December 07, 2010
    The comment has been removed

  • Anonymous
    December 08, 2010
    The comment has been removed

  • Anonymous
    December 08, 2010
    sorry about the typo :O should have read: esp. C++, which has done more harm than good...

  • Anonymous
    December 08, 2010
    The comment has been removed

  • Anonymous
    December 12, 2010
    We do need a new language for teaching the next generation of programmers about concurrency, and Google's Go would be an excellent choice. With more and more computers having multiple cores, the emerging programming challenge is going to be how to make use of those cores.  Unfortunately the mainstream languages used today weren't designed with multicore in mind so it's hard to write programs that can take advantage of multiple cores. The aspect of a language that enables you to do use multiple cores is called the "concurrency model." A language that makes it easy to write programs to efficiently use all the cores in a system is said to have a good concurrency model. Scala and Clojure are new languages with good concurrency models. Erlang is another. But, I don't see these languages becoming mainstream -- Erlang's syntax is too different and it isn't really a general-purpose language, Clojure is a Lisp, and many think Scala is too complicated. However, Google's new programming language called "Go" has been designed for concurrency, it has familiar syntax (similar to C and Java), and it is simple enough for most to be comfortable using. You can read more about Go at http://golang.org/ .

  • Anonymous
    December 13, 2010
    The comment has been removed