Tuesday 29 April 2014

Which programming language should you choose?

With so many programming languages to pick from, it can be difficult to decide which one to teach students. I wanted to share my experiences from my background as a programmer and help narrow the options down.
If you are to teach KS3 and KS4, the very short answer, in my opinion, would be JavaScript and this post explains why.

Relevance

Teaching programming to KS1 and KS2 will most likely not go beyond explaining some basic concepts and writing simple programs in special learning tools (e.g. Scratch). Students in KS3 and KS4 however, will probably want to program using a ‘real world’ programming language. This can be more motivating for students at that age, and could even teach them a skill that they can use outside school or later on in their career.

Decisions

The issue I see here is deciding on which programming language to teach. Personally, I have used many programming languages over the years, starting with Basic in the early eighties to Pascal, C, C++, Java, C#, and most recently JavaScript. For this discussion, I am focusing on the programming languages I have used, but of course there are other languages that can be good candidates such as Python. Omitting Basic, Pascal, C, and C++ because they’re either not popular anymore or too difficult to learn, leaves us with Java, C# and JavaScript.

  • C# - while being my favourite programming language, is limited to the Windows platform and I think this is a big disadvantage in a time when platforms such as the iOS and Android are dominating the mobile devices market.
  • Java (which by the way, has nothing to do with JavaScript despite what its name may imply) has some big advantages. It is easy to learn and is platform independent, meaning that it can work on any machine, plus it is the main programming language for Android devices, and that is a big plus. Also, its resources and development environments are mostly free. You can’t go wrong with teaching Java so it’s definitely a good option and many computing science departments at universities go for it as their main programming language.

Recommendation: JavaScript

If it was up to me however, I would go for JavaScript. My reasons for recommending JavaScript are as follows.

  • Its basics are very easy to learn for a beginner
  • It is platform independent, so it’s possible to run the program on any device with a web browser.
  • All the required tools are free – students can start simply with a text editor (e.g. note pad), and a browser (e.g. Chrome or Firefox).
  • JavaScript is part of the HTML5 standard which many expect to be the new de facto standard for writing multi-platform applications.
  • Accordingly, it also requires knowledge of some HTML (at least the very basics), and with HTML being the actual webpage that eventually hosts the JavaScript program, learning basic HTML is very useful anyway as it is the standard for defining web pages.
  • It is a skill that students can use outside the classroom to develop interesting interactive webpages and a skill that some of them are very likely to need in any IT related career.
  • It is COOL to learn because it is basically the language that made the web interactive.

Having said all that, it is important to stress that what is more important than learning the specifics of any language, is learning the main concepts of programming. Once the concepts are mastered, switching between languages is, in most cases, a very trivial thing. While I am recommending JavaScript, I think you can’t go wrong with Java or Python as well.

I hope that this has been useful.

No comments:

Post a Comment