Skip to Content

How do young children learn to program?

In classrooms across Australia and UK, young children are now being taught computer programming and coding as part of the national curriculum, to prepare them for the demands of an increasingly digital society. However, it is still unclear what cognitive skills children need in order to be able to learn to code, and how these skills develop over time.


New research led by Dr Eva Marinus has been investigating this, with the help of a child-friendly cube-shaped wooden robot, Cubetto. The authors developed a new test of coding ability. For this test, 3 - 6 years old children manipulated the robot by inserting small wooden blocks into holes in a control panel, to help navigate Cubetto to his ‘friend’ on another square of a 6 x 6 grid. Increasingly complex manoeuvres were required to navigate Cubetto to his friend. In this way, this new test provided a reliable measure of children’s coding ability. The authors then tested a new group of children with the Cubetto robot and were able to compare children’s coding ability with a number of other factors.

These other factors included nonverbal intelligence, age. In addition, one other factor was ‘Cognitive compiling’, which is a child’s ability to plan a series of actions following verbal instructions, such as “Point to the third yellow star from the picture”. This instruction may sound straightforward but in fact it can be difficult for younger children, and their incorrect responses reveal the child’s thought processes. The authors found that older children tended to pick the correct answer whereas younger children made an incorrect response. The younger children were guided primarily by the position of the object in the array (“third”), and so would pick the third object in the array if it was a yellow, regardless of whether or not it was actually the third of the yellow stars.

The main finding of these studies was that cognitive compiling ability alone was the best predictor of coding ability in young children - over and above age and nonverbal intelligence. Importantly this research also highlights some steps that can be done to help scaffold children’s coding skill development. For example, encouraging children to verbalize the steps of their plans by thinking out loud (e.g., go straight, turn right etc) before even using the wooden blocks to “code” the steps. In addition, children can be encouraged to move Cubetto one step at a time, rather than putting in several moves to be made and then having Cubetto move. With appropriate scaffolding children as young as 3 years old can successfully programming tools like Cubetto.

Future work will seek to determine if cognitive compiling ability can improve with training, and if so, whether such training also leads to improved coding ability. The researchers are also interested in whether improvements in coding ability are maintained once scaffolding strategies are removed.

This study was preregistered on the Open Science framework and all materials, data and analyses can be accessed here:

For more information about this research contact Eva Marinus or follow her on twitter: @EvaMarinus.


Further Information

Contact Details

Telephone: +61 2 9850 4127
Email :
Web :

Sign up to receive CCD event and research announcements

Macquarie Univeristy Logo University of Western Australia Logo The University of Sydney Logo

University of New South Wales Logo University of New England logo