2.1 Elements of computational thinking

Cards (4)

  • Abstraction is the process of removing unnecessary details from a problem to simplify it. Another definition of asbtraction is where something represents a concept, to make it easy to think about, e.g. the word 'dog' represents the concept of a dog, but it's not the same thing as an actual dog.
  • Caching involves storing data in a temporary area to enable quick access to it. The CPU cache is a small area of very fast memory which holds data fetched from RAM. The CPU can fetch data much faster from the cache than from the RAM.
  • A good way to start planning how to write a program is to work out what are the required inputs and outputs, and then work out what needs to happen in-between to turn the inputs into the outputs.
  • Concurrency is when parts of a program can run simultaneously. For example, a program which adds all the numbers from 1 to 1 million could run faster on two cores by having one core add the numbers from 1 to 500,000 and the second core adding the numbers from 500,001 to 1 million, then finally you can just add the two results together.