Which programming language for learning?


Which programming language should I use? A question guaranteed to shoot your Twitter engagement metrics through the roof. The stream of responses might contain the solution you settle on, but ‘the right answer’ won’t be obviously apparent. Everyone has a view on this, and most of the time they are completely different.

That’s just asking about which language you should use to solve a problem… What about which language you should learn?

For an adults learning to ‘code’, there are a whole set of things to consider. You might be looking for the best language to achieve certain things for a project you have in mind. You might be after experience in the language(s) most likely to land you a job.

For those of us looking at education for children (and adults who, heaven forbid, want to learn just to understand the world better), the considerations are different. Of course we want people to be able to create things and solve problems early on, but this is part of a process of wider learning rather than the main goal, at least at first. Depending on your age, the question of which languages get people jobs is also a rather different one. For an eight year old it’s pretty irrelevant, the languages will have changed by the time they emerge from the education system looking for work.

So how should we make the decision on which language(s) to use in education?

I’ve spent a lot of time over the years learning bits of programming languages in order to get specific things done. More recently I’ve been learning Python in a more structured way. Up until yesterday I was very much learning some different commands and how to deploy them to get specific effects. I understood what I wanted to do and how to achieve it, but I hadn’t really started to understand the syntax of the language. Just like learning a written language, I’d been using phrases to communicate but I hadn’t really understood sentence structure or grammar yet.

I’m teaching a workshop on simple physical computing with Python next week, and during a preparation session with my colleague James Robinson at Raspberry Pi I took the chance to quiz him in detail about how all the elements we were using worked. From his great explanations I began to understand what I was doing when calling a python library, how my code not only addressed an LED as a physical thing I knew was there, but also as an abstract ‘object’ within the program. I also began to understand that the difference between an object and an action was more than just the words used for them, but their place in the syntax of the language.

Through interrogating the code I already knew how to write, the penny began to drop for me about the concepts of object oriented programming. I felt the ‘Ah, I get it!’, not just relating to making the code do what I wanted, but understanding why it was set up in the way it was.

This got me thinking. If a language begins to shape your understanding of how computing works, then the choice of language you learn first is a pretty important one. I suspect that those replies to your ‘which language should I learn’ tweet are quite often summed up as ‘[language the replier first learnt themselves]’.

So what should we do as educators in this area? Well, it seems pretty important to choose to teach languages and tools that help children to most clearly understand the concepts behind computing. This may not be the ones that are most powerful or best for getting particular things done. James and I moved on to looking at an abstraction for creating traffic lights that I (with my freshly gained grain of understanding) felt really hid from me what was really going on.

I should add that I am no expert in Python. I’m not necessarily endorsing it as the answer to ‘the first language question’, but it seems to be a language widely chosen by educators for early text based programming. It’s the first language I’ve tried to really systematically understand, and therefore it’s shaping my thinking on the subject too!

There is probably a lot of truth in the view that someone’s best language is their first language. Your first language shapes how you think, it’s how you first interact with and really get a feel and an understanding of how the big concepts work. In written language the contextual factors of where and to whom we are born preclude choosing the best language for learning to think. In computing this need not be the case, so as educators we need to think very deeply about the languages we choose to teach early on.

We also need to be reflexive about this. We need to consider that our own first or best languages shape our thinking in ways that might be both helpful and unhelpful to us as educators. Teaching programming to children is not new, but it has had a huge resurgence and the scale at which it is now being taught in some countries is quite a recent development. There is a lot of skilling up going on, and a lot of people picking up what they know and running with it. This is no bad thing, it’s bringing the powerful ideas of programming to many more young people before. As the subject matures though, we need to continue to question our assumptions and decisions, and explore the best ways for developing understanding of the subject as well as the ways we have to get up to speed quickly as educators.

We need to choose language based on how they help people to understand the important concepts, how they help them to learn to think computationally.

Photo Credit: waiamcia via Compfight cc





5 responses to “Which programming language for learning?”

  1. Alan O'Donohoe Avatar

    Oliver, I really enjoy reading your writing – I feel I can easily follow the thought process you describe.

    “Which programming language?” can be an important question to someone with comparatively little experience of text-based programming, so that they can avoid going down a rabbit-hole.

    I wrote a post in 2014 titled “How do we teach programming in schools?” in which I suggest that we don’t pay too much attention to the choice of language, but more about the way we use it. If a teacher is using a tool that is at the very least fairly popular, they can’t go far wrong. Although the post is a few years old, I still believe that learning experiences in a Computing or Computer Science context should include Discovery, Experimentation, Prediction, Problem Solving, Sharing.


  2. Douglas Avatar

    This (about why the nature of Python makes it good for teaching):


  3. Tim Jefferis Avatar

    Oliver I have been teacvhing Python for a year now and still feel something of an ingenue. What have you used to teach yourself? Code Academy?

    1. oliverquinlan Avatar

      A bit of code academy to start, then my experiences at Picademy and working on my own projects with Raspberry Pi’s.

  4. Katharine Childs Avatar

    This is a really interesting question Oliver.

    The first programming language I used in a serious educational sense was as part of my degree with the Open University. I completed a module called M206 which used Smalltalk. From a student perspective, it always felt like a “good” choice of language as I tried to get to grips both the syntax of the language and the programming concepts.

    This paper http://mcl.open.ac.uk/sh/uploads/tools99Euro.pdf explains more about the rationale behind the decision to use Smalltalk and also the pedagogical decisions of how to introduce it.

Leave a Reply

Your email address will not be published. Required fields are marked *