There are four elements of computational thinking, they are:
Decomposition
Simple tasks have simple solutions. You can
break large problems that are complex into
several smaller simpler tasks, this is known as
decomposition
For example you have been tasked with
creating a game and you have broke it down
into smaller tasks
What type of game is it going to be?
What is the style of the game?
Who is the audience of the game?
Does it have challenge and
what are the rewards?
How does the game end?
What is the name of the game?
This is what decomposition
is about, defining the
problem in more detail and
making it easier to solve
Top Down design
Complex problem
Element of problem 1
Element of problem 2
Sub element of this part
Sub element 2 of this part
Element of problem 3
With the top down design the
decomposition element can be
shown
Pattern
Recognition
Being aware of any repetition in solving
the task, this pattern can simplify the
steps needed to solve the problem and
furthermore, if the pattern can be made
general, it can be used to solve other
problems as well.
Abstraction
Removing unnessisary information is called abstraction.
Only leaves the data that is
required
For example a designer needs to make a T Junction sign
The sign must follow certain rules:
Must take no more that 1 second for a driver to look at it and understand its meaning
Must NOT contain any
words
It MUST use the standard shape and colours of all UK road
signs
The first attempt is shown to the right and as you can
see it is very cluttered and will take more than a second
for a driver to recognise the sign
It also doesn't follow the
rules for the shape and
colour
The second attempt is shown to the right and as you can see it is less
cluttered than version 1, however it still breaks the rules as it says that
there must not be any words
It also doesn't follow
the rules for the colour
The third and final attempt follows all the rules, the
shape, the colour and doesn't contain any words
Also any unessisary clutter has
been removed
The same method of abstraction
can be used for many other
problems including those in Computer
Programming
Algorithmic
Thinking
There are 2 popular methods to set out an algorithm:
Pseudocode - Text
statements written for
each step of the
algorithm
An example of
Psudocode
Psudo code is not a formal
computer language and has no
particular rules governing how it
should be written. What is
important is that Psudocode
should be easy to understand,
unambihiousous and error free.
Especially because
programmers often use it to
form the basis of their
programming code
Flow chart - This uses a set of
standart shapes and arrows
(Shown to the right-->) tO make
a diagram of the algorithm
Algorithms often include a decisaion to be made
at some point in the task. In order to handle
this, a conditional statement is used.