I have been thinking, and doing much reading on the topic of how to teach children how to code of late. Trying to answer the question: What do we actually need to teach them, for them to really learn.
The premise for this is that going straight into programming or writing software is going to leave all but the already naturally inclined, or predisposed, kids in the dust. In university, students are educated with degrees in specialised fields such as engineering and computer science. The students who go into engineering may build upon about ten to twelve years of being taught mathematics in school, and a slightly lesser number of years with various sciences.
The students who do computer science on the other hand, simply do not have that kind of luxury of prior learning. Sure mathematics is one of the requirements, but there are many more topics which are prerequisite knowledge that are simply not typically taught in schools. This is one of the causes, in my humble opinion, as to why many University students simply do not “get it”, and wind up switching courses or majors, or are too apprehensive to start a computer science degree in the first place.
Now, university students have the benefit of being much older, and already preselected for being academically inclined, and yet this is an issue. This problem is going to be much exaggerated with children, especially the younger ones - ages six through twelve. How does one then pull this off? Let us first take a look at the current attempts to tackle this problem, and then I shall posit my own thesis on how to go about this.
Most of the current attempts revolve around either: simplifying programming, or one trick pony styled tackling of basic programming literacy.
Examples of these include Scratch & Alice
I posit that most programming boils down to two fundamental concepts: variables and Boolean logic; and four building blocks: control flow, iteration, functions, and events. An additional fundamental concept that is required for programming, but can be assumed knowledge for the child, is being able to count.
The fundamental concepts are abstract concepts, and thus going to be challenging to teach to young children. Thus the means to teaching these should be to use analogy and metaphor devices. Analogies and metaphors, of course, that a child would be able to relate to. For example, when teaching variables to university students, we can assume that since they have a solid mathematics background. Since mathematics includes algebra, variables can be easily explained as algebra. Using the same thought process, but this time applied to children, we realise that children aged six through twelve, typically would not have learnt algebra yet. One thing that we can be sure that every six year old knows though, is that they have learnt how to to put things into boxes, to put things inside boxes to find out that they do not fit, to take things out of boxes, to look inside boxes, and to move boxes (both empty and when containing things) - these are all part of any child’s play time! So putting things in boxes could be a way in which the concept of variables are introduced to children, which should not be very difficult for them to grasp.
The building blocks are little more concrete, but the same strategy applies as with the fundamental concepts: Use analogies and metaphors which children are able to relate to themselves. With university students, control flow, iteration, and functions can all be illustrated using flow charts. However, this is likely to lose children; or bore them. Getting them to play a game where each one represents an instruction (a single code statement) and the teacher - or one of the children, guided by the teacher - walk to each of them, and then “execute” the statement by going to the child which represents the next instruction determined by the control flow, or iteration, or function.
Once these have been taught in isolation, it is time to combine them. For example, variables plus control flow could be done with the teacher carrying a few cardboard boxes with variable name written on them using a marker. Strings can be placed into these boxes as pieces of paper, and integers as several of the same item (such as marbles), et cetera. After this set up, the children take their spots, with flash cards that denote their instructions, and the teachers walks from one child to the next, executing each of their instructions in turn - reading out or modifying the contents of the variable boxes for some instructions, and moving to a different student for control flow instructions.
Now that the fundamental concepts have been taught in isolation, actual programming can commence. Of course before delving straight into programming with a text editor/ compiler/ SDKs, for kids, using a simplified programming environment, such as Scratch or Alice will be much better.
The idea is that when “coding” for the first time, in the simplified programming environments, the kids are not being introduced to programming concepts, and having to execute them at the same time. The cognitive burden could prove to be too much for the younger ones. With this approach, they can recall the fundamental concepts and building blocks that have been learnt prior; while attempting to execute them and create a program.
This is a stepping stone to full blown programming, and thus should not be skipped. Sure some children might not need this intermediate step, but many will. The idea here is to not be too easy, for fear of boring most of the children in the class; and not to be too hard either, for fear of losing most of the children in the class. Let’s do this
In addition, there are many, high quality, and ready to use, lesson plans designed for a classroom environments centred around these simplified programming environments. They even comes with comprehensive syllabi in some cases. It would be a waste not to utilise these resources.
Something would be amiss with this article, if the question of why teaching kids to code is important was not addressed.
Copyright © 2008-present Brendan Graetz