Introduction to Computation Thinking
by K. Yue
1. Discipline-based thinking
- Discipline-based thinking refers to the process and methods of understanding and applying knowledge within a specific field of study.
- A discipline-based thinking comes with:
- Methods
- Traits and Characteristics
- Values
- The way of thinking in one discipline can be applicable outside the discipline as well as in real life.
Example: Philosophical thinking: one definition: "a method of inquiry that seeks to explore fundamental questions and concepts, relying on reason, analysis, and critical thinking to gain deeper insights into the nature of reality, knowledge, ethics, and the human experience."
- Methods: critical thinking, conceptual analysis, reflection, rational argumentation, ...
- Traits and Characteristics: reasoning, wonderment, curiosity, contemplation, ...
- Values: truth, meaning, rational, ..,
2. Computational Thinking
2.1 Methods of Computation Thinking
- Computation thinking is "a set of problem-solving methods that involve expressing problems and their solutions in ways that a computer could also execute: from wikipedia.
- Four core components:
- Algorithms - developing a step-by-step solution.
- Decomposition - breaking down a complex problem or system into smaller, more manageable parts.
- Pattern recognition – looking for recurring structures in problems, data sets and solutions.
- Abstraction – focusing on the important information only, ignoring irrelevant and lower level implementations details
2.2 Algorithms
- Develop and implement step by step instruction for problem solving.
Examples:
- Python program
- Cooking recipe
2.3 Decomposition
If decomposition is done well, there are many potential advantages. For examples:
- Simplification for easier understanding.
- Reduced complexity.
- Better efficiency.
- Component reuse.
- Better and concurrent task assignments.
There are criteria for good decompositions: e.g., modularity, independence, ease of understanding, ...
Examples:
- functions
- classes
- modules
- college degree
- ...
2.4 Pattern Recognitions
- Identify recurring patterns and structures to better understand and specify problem and construct solutions.
- Human being relies on pattern recognitions a lot.
Examples:
- Dark cloud -> likely to rain -> bring an umbrella.
- Very dark cloud -> very like to have thunderstorm -> stay home.
2.5 Abstraction
- Focus on essential and high level features. Hide complex lower level implementation and irrelevant details.
- Difference between building X and using X.
Examples:
- In driving, you need to control the engine (by stepping of the gas pedal). A good driver does not need to know how the engine work,
- You can call the function input() in Python withoug knowing how the input() function is actually implemented.