Sunday, December 07, 2014

There Is No Best Programming Language

Three items from different places on the same topic requires a blog post. Well for me it does. This week’s topic was picking the best programming language. Now you should know that one of the easiest way to get computer scientists, CS educators or software developers into a heated discussion is to start off with “what’s the best programming language?”

The first thing I ran across was “My Computer Language is Better than Yours” by Scott Rosenberg (@scottros) That post is a look at the new languages Go (from Google) and Swift (from Apple) and it is an interesting read.

The next thing I read was The Best Programming Languages Every Beginner Should Learn which is mostly the opinions of Hadi Partovi @hadip of Code.Org. It’s not a bad list but words like “best” and “every” always make me raise an eyebrow at least.

Lastly there has been a discussion about moving from C to Java or perhaps some other language for the first course in a university computer science program on the ACM SIGCSE mailing list. (Not sure the archive is available to non-members)

These are all discussions I find myself reading/following and occasionally taking part in regularly. The question about how many angels can dance on the head of a pin has nothing on the one about first programming languages.

In the case of programming languages I will say “it all depends.” It depends on what age level are you talking about? Grade school students are different from middle school students who are different from high school students who are different from university students who are different from older students. People trying to learn on their own are different from students with teachers. And teachers make those differences more different as well. In short the idea that there is a single language or sequence of languages that all beginners should learn really doesn’t make sense.

I was asked how the curriculum at my school matches with the suggestions that Hadi made. In some ways similar but in other ways dissimilar.

We start a half step above a block language. One teacher with a home-grown Logo tool and me with TouchDevelop. TouchDevelop is sort of like a drag and drop language but it is also closer in appearance to a text based language. I like that it takes a lot of the syntax out of the picture but still looks like real code. Also Block languages start with variables too late in my opinion and the jump to a real language can be a big one.  I also like how easy it is to do fun things. Recently I saw a student on their own showing it off to a visiting student. That tells me good things.

Visual Basic is next and it has many of the advantages of Python (a language growing in popularity) PLUS the ability to easy create real Windows programs without writing a lot of code. It is a friendly and yet powerful language. It gets students motivated.

Our next course is C# which is a very nice language in the C family. It is an easier preparation for Java, which we have to teach for the AP course, than JavaScript I think. If we had another semester course JavaScript would make sense though. We could think about it for our honors programming course I guess. Might not be a bad idea.

Our last course uses Java because we have to teach Java for the AP course. It we didn’t have the AP course JavaScript would make a lot of sense given its multi platform nature.

BTW we also do introduce HTML in our first course. It is important even though it is not strictly speaking a programming language. The web needs it and I like to think it is a good setup for the idea of markup languages and XML.

Is this the best set for everyone? Not hardly but it works for us. But it works primarily because we think about the concepts we want to teach first and pick the tools for it second. That is the way things should be done.

No comments: