• bendickens8

Sometimes we need to reinvent the wheel: the process of discovery when learning how to code

Who am I to go against the old adage that ‘we should not reinvent the wheel’? Our society wouldn’t progress much if we had to start from scratch every time we need to solve a problem.

However from an educational point of view, the process of reinventing the wheel is important, indeed crucial, for society to progress and advance. Let me elaborate…

If your aim is to get from A to B, then there’s no point in reinventing the wheel, or indeed the car or train or plane (all of which need wheels, incidentally). But the process of reinventing something that exists or rediscovering something that has already been discovered allows us to train the skills we need to be creative and to channel that creativity into solving problems in an innovative way. Only by doing so can we move on to invent or discover something new, from which the whole society will hopefully benefit.

This process is particularly true for children and young adults. Learning facts is no longer enough to give children a good education — learning how to think creatively and logically (note: these are not opposites!) and how to tackle problems and find alternative solutions is the key skill our children will need as they grow into adulthood.

What has all of this got to do with programming (or coding if you prefer to use that term)?

Let me first answer another question:

Q. Why do we teach computer programming to children?

A1. Because we are going to need many computer programmers in the future.

FALSE - although we will need programmers in an ever more technologically-focussed world, this is not the principal motivation for teaching coding to children and teenagers.

A2. Because many existing and new jobs will require programming along with other skills necessary for the task.

TRUE - We already see this happening a lot today. It is not only software developers who need programming on their CVs but many looking to work in science, finance, data analysis and more.

A3. Because programming has at its heart critical thinking and problem-solving and these are skills that go beyond coding itself.


We should let students reinvent wheels when they’re learning to code

In programming as a profession, like everywhere else, there is no point in reinventing the wheel. If you want to write a game there are many packages and tools that do a lot of the hard work for you and if your job is to write a game, you should use these tools. However, when writing games for the purpose of teaching children how to code, doing some things from first principles has a lot of merit.

At codetoday we use games extensively as a way of teaching and consolidating the fundamentals of programming. In Python there are modules such as pygame aimed specifically at writing games. This gives you a tool detect when two objects hit each other, for example, which is a common requirement in many games. But we never use pygame in our teaching, instead we use the turtle module which is a far more basic drawing package. This means that if we need to detect whether a player has hit a target, we would need to use some basic logic and Maths based on the positions and sizes of the objects. This approach is encouraging students to think a bit more and dive deeper into what the problem we are trying to solve is (as well as consolidating their Maths skills).

Here’s another example, again from the Python ecosystem: we have a list of 5 colours and we want to create 100 coloured dots by cycling through the list of colours. The problem would be far simpler If we had 5 colours and only 5 dots since there is a straightforward way to tell Python to use the first colour for the first dot, the second colour for the second dot, etc… The problem is that when we get to the sixth dot, Python will complain that there is not sixth colour (and the program will stop running). Python has a high level tool to cycle through a list in this fashion. But a more instructive approach is to find a solution from first principles, such as by dividing the number of the dot with the number of colours in the list and using the remainder as an index for which colour to use. So the 6th dot would use the first colour since 6 divided by 5 leaves a remainder of 1.

"But isn’t it easier to use the tools that have specifically been designed for this task?" Yes, but we do not learn as much in doing so.

So let’s reinvent the wheel, over and over again. And let us make sure that teaching programming to children is an exercise primarily in thinking.

Receive new blog posts to your inbox —> Subscribe Here

#Python #codingforchildren #thinking #programming #london

  • Facebook
  • Twitter
  • Instagram

© Codetoday Limited

Codetoday Limited is a company registered in England (company number 9789836).

Registered office: 13 Hawley Crescent, London, NW1 8NP, United Kingdom

Terms & Conditions

Privacy policy

Cookies policy