About Thinking and Algorithms

As humans, we are constantly striving to make sense of the reality that we are a part of. This process begins at birth and continues throughout our life. It is a natural, built in inclination of humans. We are innately built to ask “why” or “how”. We want to know and understand how and why reality is the way it is.

Human brains have the capability to take in information (learn), connect it to other pieces of information (things we have learned) and make conclusions.

We have the ability to re-use the information we have learned (remembering) and re-purpose previously made conclusions into new conclusions that help us make better sense and get a better understanding of our reality.

We say that we understand something when we are confident and comfortable that what we know adequately explains “why” something “is” in our perception of reality. 

This process of taking in knowledge and making new conclusions is called thinking and at the core of thinking is learning — the process of absorbing and retaining knowledge so that it can be reused to make new conclusions.. 

Google (which is just a way to identify knowledge about a subject) “types of thinking” and you will find that thinking can be classified into many types. Just like there are types of sports (football, basketball, baseball, and squash) there are  types of thinking. 

As a teacher specifically of computer science, technology and programming, I am mostly concerned with what is called “computational thinking” which is well defined here and here.


 [The] intellectual core [of computational thinking] is about formulating things with enough clarity, and in a systematic enough way, that one can tell a computer how to do them. 

Stephan Wolfram

I started “thinking about thinking” because I noticed that many of my students struggle with how to solve very simple problems by writing computer programs. I noticed that there were some students that could instantly grasp the process of breaking down a problem or a question into small parts, develop an algorithm or series of steps to solve the problem, translate each step into a programming language and finally assemble the steps into a program that the computer used to solve the problem. 

On the other hand, there were students who struggled not with the syntax of the computer language but with the process of how to create and describe an algorithm to solve the problem. 

The students who struggled with this were not inexperienced in solving problems, they just were not aware of how to apply computational thinking skills to solve a problem.   

An example from a class exercise is appropriate at this point.

I asked the students to tell me how they would solve the following problem. 

If I gave you a pile of coins and asked you to how much money I gave you, what would you do?

One approach to solving the problem might be: 

  • You might ask for more information (like do I want  the total dollar value or a do I want to know how many coins were in the pile)
  • Once you understand the problem I was asking you to solve, you would use your previous knowledge about money to assign a value to each coin.
  • Next, you might scan the entire collection of coins one at a time, pick up each coin and place all the coins with the same monetary value in the same pile.
  • Next, you would count the number of coins in each pile,
  • They you  would multiply the number of coins in the pile by the monetary value of one coin in the pile and record the answer
  • Finally, you would add up the monetary value of each pile to arrive at an final answer..

Granted, this is not the only (or even the correct or most efficient) way of solving the problem but it does show the process of thinking (specifically computational thinking) as a part of making conclusions or solving problems.

The students who could not write a program to solve the problem could demonstrate how to sort the coins but they could not write down the steps listed above and consequently could not write a program to do the task. 

To help these students grasp the process and concept of creating a program, I outlined 4 steps:

  1. Ask questions designed to make sure that they clearly understood the problem and the requirements.
  2. Gather and make available what you already know about the problem
  3. Break down the problem into a set of smaller steps
  4. Write a statement that describes each step
  5. After executing all the steps, write the solution to the program

I also told the students that there were four techniques or tools that they could use. They could:

  • Use Variables: that would allow them to remember the value of something from step to step and use one of the values they remembered in one or more steps
  • Use Mathematical Operations: Change the value of a variable by using a mathematical operation
  • Use Conditionals: Check if some condition is true or false and take action based on the conclusion
  • Use Loops: Repeat one or more steps over and over but they had to know when to stop repeating and what to do when the repetition was completed


// August 07 2022 // Post ID: 412