Computational Thinking is one of the biggest superpowers of future engineers. We can look at it as a set of skills needed to convert real-life challenges into tasks that can be solved with the help of a computer. Why is this mindset fundamental to almost every engineering task? Read the article and watch the video to get familiar with the computational thinking process.
Table of Contents
1. Computer Programming
Are you familiar with the term “Computer Programming”? In just the last 3 decades, this comparatively new and fast-evolving field has gained enormous popularity, and we now see even young children starting to write their own scripts and programs. If you start that early, it is natural to choose Computer Science as a course of study. With such qualifications, you may even apply to your dream tech company – be it Google, Facebook, Microsoft, Apple or any other.
Computers are able to do a wide range of amazing things, from basic laptops capable of simple word processing and spreadsheet functions to incredibly complex supercomputers completing millions of financial transactions a day. It would be accurate to say that computers control the infrastructure that makes modern life possible.
Computers are stupid
Nevertheless, the truth is that computers themselves are actually stupid. Despite all of the incredible stuff that they can achieve, in reality, they are useless without a programmer. They need human-given commands and inputs in order to perform computations and to produce meaningful outputs. Without a programmer, computers will not know how to behave.
Stuart Walesh put it into nice words
Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they are powerful beyond imagination.
Stuart Walesh
Computer programming is about connecting humans and computers.
Although there are many different programming languages and many different types of computers in existence, the important first step is the need to have the solution in mind at a conceptual level. Without an algorithm, there can be no program. Computers, in contrast to humans, are very efficient at these tasks because they are happy to keep executing the same instructions over and over again without ever getting bored.
2. Idea of Computational thinking
As I mentioned earlier, computers can be used to help us solve problems. However, we need to understand a problem itself before it can be tackled and solved. Computational thinking is the step that comes before programming, which allows us to understand the problem.
And this is a whole point of Computational thinking. It allows us to take a complex problem, understand what the problem is and how it can be solved and then develop possible solutions. In the end, we can then present these solutions in a way that a computer, a human, or both, are able to understand.
2.1. Four steps to computational thinking
There are four key techniques and steps to computational thinking:
Decomposition – breaking down a complex problem or system into smaller, more manageable parts. Decomposition can be defined as the process of solving a complex problem and breaking it into more sub-problems that can be solved easily. Solving a complex problem may get difficult sometimes, but finding the solution for every sub-problem will be simple, after which the sub-problems can be put together to find the full solution to the original problem.
Pattern recognition – looking for similarities among and within problems. Allows us to skip having to consider every individual concept and rather use previous experience and methods to efficiently and simultaneously deal with multiple objects and come up with a re-usable solution.
Abstraction – focusing on the important information only, ignoring irrelevant detail. Abstraction allows us to create a general idea of what the problem is and how to solve it. The process instructs us to remove all specific detail and any patterns that will not help us solve our problem.
Algorithms – developing a step-by-step solution to the problem or the rules to follow to solve the problem. This approach automates the problem-solving process by creating a series of systematic, logical steps that process a defined set of inputs and produce a defined set of outputs based on these.
Each of those steps – decomposition, pattern recognition, abstraction and algorithms are as important as the others. Together these form the layers of the foundation for programming. Remember that only by applying all of them together will you be able to achieve the results. Omitting any one of them will make your foundation weak.
2.2. Computational thinking in practice
To visualize computational thinking, I will present use of all of the steps in a practical example.
Let’s say you have a plan to finish a marathon in under 4 hours. The world record for this marathon is about 2 hours, so 4 hours may not sound like a challenge. However, it is not an easy feat to achieve, so you will have a lot of preparation to do unless you have already been training regularly for several years. Let’s assume in this example that you are not an experienced marathon runner.
The First Step - decomposition
To cross our desired marathon’s finish line let’s apply computational thinking.
At the first glance, we don’t know how to solve this task in an easy way. Just thinking of running over 42 km at once can be overwhelming and seem near impossible to do. That’s why we have to break this complex problem down into a series of small, more manageable problems – decomposition. In our case, we have to create a training plan. Training has to be divided into smaller distances. You are not going to run the full marathon in your training. All planning has to be done several months before the actual marathon starts.
Great, the first step is completed. You have a training plan.
The Second Step - Pattern recognition
Now, each of these smaller problems needs to be looked at individually, considering how you may have solved similar problems previously -i.e. pattern recognition. Maybe you have participated in a competition before? Maybe the running route is similar to what you have before but just with the scaled-down distance of 10km? This step is about finding similar problems. Note that not all solutions you may have used before can necessarily be applied.
The third step - Abstraction
Now we have to focus only on the important details while ignoring irrelevant information – abstraction. This one is easy. We have to focus on regular training, a healthy and balanced diet, good sleep and perhaps avoiding unhealthy things like cigarettes and alcohol. Abstraction is about prioritizing.
The fourth step - Algorithms
Lastly, we need to create simple steps to solve each of the smaller problems. To do this we have to design the rules that can be designed and easy to follow – an algorithm. In this example, we’d have to “program” ourselves in a way to regurarly perform all planned training, so that becomes a habit. For instance, set the alarm clock to 6:00 AM to wake up early in the morning, dress in comfortable clothes, warm up your muscles, begin interval training 8×1,0km, do stretches, have a regularly scheduled diet eating the right balance of carbohydrates, fats and proteins, go to work, sleep and repeat.
Finally, these simple steps or rules are used to program a computer to help solve complex problems in the best way. The planning and preparation part is like computational thinking, and following the training assumptions is like programming. As a ”human-robot” you have to do all steps in the correct order.
Finally, these simple steps or rules are used to program a computer to help solve complex problems in the best way. The planning and preparation part is like computational thinking, and following the training assumptions is like programming.
3. Why does being good at computational thinking matters
Every engineer needs to use computational thinking on a daily basis.
If we think about it, the four foundation layers are very similar to what we are already doing as architects and engineers. In our day-to-day life, what we do is defining/recognizing abstract problems so they can be solved. Additionally, we are very good at doing analysis and evaluating solutions.
Scheme of work for an engineer
- Decomposing the huge structure into parts.
- Identifying which parameters drives the structure
- Pattern recognition, ie considering how similar structures have been built previously
- Defining the underlying logic of a structure and developing a solution to the design, or the rules to follow to solve the design
However, the last step has traditionally been replaced with manual labour in one way or another. Of course, we have software that aids us in this process, but we are often at the command of huge software companies and software silos. Let’s say we have a problem that we want to automate, if this is not possible in the software that we at the given time have access to, we need to file a wish-item to the developers, and it may take everything from a couple of months to 5 years to get access to the functionality. This (among other things) leads us to do it manually instead because we must get it done right now, without waiting.
That leads us to the point where we have to add functionality to programs or create them from scratch by ourselves. And as said before this process is called algorithm creations
4. What is an Algorithm?
Simply put, an algorithm is a step-by-step procedure. In math and computer science, algorithms are used for calculations or problem-solving. Still, the concept can be seen elsewhere in places like recipes, games, or even instructions for assembling things like furniture. Algorithms are defined by lists of consecutive but not necessarily sequential steps, each with well-defined instructions. Algorithms have beginnings and ends. We can say that this is like a lists. In their beginning states, algorithms take data in the form of variable inputs. Inputs are processed through the algorithm steps and transformed into some kind of information or output that is given in the end state.
Algorithms exist in many different forms, from written instructions to flow charts to formal computer language to electrical circuits, just to name a few.
Let’s take a look at this example of a flow chart.
Everyone uses this kind of flow chart in their daily duties. In this example, we have to do the task: go to work. We are leaving home. Then we check what time it is. If it is before 7 am then, we can take a bus and get to work at 8 am. If it is later than 7am we have to take a car becouse we will not get to work at 8 am.
5. Summary
Computational thinking is NOT a tool nor programming. It is not even thinking like a computer, as computers do not, and cannot, think. They are not that smart, to say it in a nice way. Simply put, computational thinking is a process for solving complex problems. Programming tells a computer what to do and how to do it.
As Steve Jobs said: “It (Programming) teaches you how to think.” This means you approach problems in an entirely new way. You always look for the logic behind the problem and what is driving what.
Check out my other articles about Grasshopper
BIM in Grasshopper – The ultimate software list
Grasshopper Data Tree – Path Mapper is a BADASS
If you want to get more information about Grasshopper and learn parametric modelling, download the free guide – FREE DOWNLOAD
Grasshopper is a plugin to Rhino that you can download HERE