Algorithms or pseudocode is nothing but a logical set of flow of instructions to achieve some desired result. Algorithms are all around us and some common examples of algorithms we use in simple everyday life are: how to assort and store your fruits, vegetables and other food in the refrigerator, starting a car and going out for some work, planning your visit to the dentist, stacking a set of blocks, arranging the books in your bookshelf, and many other scenarios, playing a tic-tac-toe game or arranging a set of blocks to complete a puzzle.
For example, if you're sitting in the bedroom right now and you want to go out in a car, you can ask the child: what are the various steps you’re going to perform to achieve that desired result to go out in a car? The logical series of steps might be something like the below.
1.Get up
2.Take your car keys
3.Open the front door
4.Go to the car basement
5.Unlock the car
6.Get into the car
7.Wear the seat belt
8.Close the car door
9.Start the car
10.Ride!
Then, once children are comfortable with the basic grasp of the concept of algorithms, top quality coding courses for kids take it up a notch by introducing more complex examples such as how to program a lift in a building. When you ask a child to understand how the lift in a building works, there are multiple criteria to consider: there are a set of people pressing the buttons to go to different floors from different floors and a different set of people waiting to get-in and waiting to go out of the lift to designated floors. So, if the lift were to be a person, he or she would get overwhelmed by the requests. So, how should one program the lift? If the lift were to be on the 10th floor, should it prioritise going to the 20th floor or the ground floor? This is an example of a beautiful practical way to make children understand a slightly more complex problem and in the process introduce navigation and traversal algorithms.
The first focus is to help children to understand the basic problems of stacking, re-arranging arrays, working on small problems involving stacks and queues, searching and sorting algorithms, and then move onto the various algorithmic techniques once the children get a good hang of the big picture.There are different categories of algorithms classified depending on their approach and the kind of pattern of solutioning required to solve some problem. Something like, for example if we don’t have Google Maps and if we want to go from point A to point B, what is the approach. We probably know the rough direction to take and from thereon we would stop once a while and check and ask people for directions. You can call this a brute-force approach to getting directions because you’re willing to do multiple things on the journey that might get you the directions and there is no specific plan to use any technology or any approach.
Can children write algorithms?
Yes, children can write algorithms, after all it is nothing but a way of solving something and providing the computer a set of instructions in a specified syntax (programming language). You can get children started by writing down their morning routine or an algorithm for something easier like eating cereal or brushing their teeth. It will enable them to learn computational concepts like repetition (brush the bottom left tooth five times), sequencing (place food in the bowl and then add milk), and conditional logic (if you fill-up the bowl, stop eating).
Once children are introduced to the basic concepts and are comfortable writing small pseudo-code and using basic programming structures, then we can explain to children what are the common types of algorithms used in the technology that they use everyday like search engines, video recommendation engines, ad publishing, dictionary, timer and stop-clocks, etc. We can then integrate a lot of problem-solving using different types of algorithms and in various subject-knowledge applications such as physics, geography, and history, such that the child is enjoying and at the same time integrating practical application from various subjects and using that knowledge for problem-solving and algorithmic thinking.
The various classes of algorithms that are generally used are as follows:
●Brute-force approach - solve a problem by exhausting all options linearly
●Divide and Conquer - divide a problem into smaller problems and then solve the smaller problems and sum up to the larger problem in a meaningful way.
●Recursive algorithms - used very often, repetition of the same logic to solve a repeated pattern of problems.
●Greedy Algorithms - optimising for one aspect in solving the problem. For example, optimising for computation time or optimising for memory usage.
●Backtracking - an algorithmic technique to use all paths back and forth until all paths are covered to solve the problem.
●Dynamic Programming - technique used when there are overlapping recursive sub-problems which are repetitive in nature.
Coding for Kids is important to develop “how to think” skills
Most kids might usually start with Scratch and Python. But, if you are bored and want to do something exciting, while learning the problem-solving skills, logical thinking and creativity, then kids can take these coding courses apart from Scratch and Python. For example, it is a good choice for kids to learn Java because it is a widely used programming language in academia and industry. It is used to build a wide range of applications from desktop, mobile and web applications. It is used well to build both backend and frontend applications as it has a popular GUI and also strong support among the developer community.
In teaching coding to kids, the focus has to be a lot on providing children the building blocks of programming and logical thinking for problem-solving. Once these fundamental tenets of algorithmic-thinking are in place, as a tutor one can then start to build more complex layers of algorithms and various types of programming languages to achieve specific goals and develop their computer-science fundamentals.
Hope this post is useful to provide a glimpse of how exposing kids to algorithms and coding can be really helpful, thank you.