2.1 computational thinking Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

deifine abstraction

A

abstraction is the act of removing unecessary details

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

why is abstraction implemented

A

because it can provide the same quality product while reducing the computational resources required
focus on the purpose of the program
reduce complexity fo the design
reduce programming coplexity
reduce memory requirements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

define preconditions

A

Things to consider before creating the solution i.e
budget, time frame, current solution, current hardware, skill set etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what are the three main aspects of thinking ahead

A

specifying inputs
specifying outputs
preconditions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what are the pros of defining preconditions

A

makes program components reusable
cutting out unecessary checks
makes the program easier to maintain

enhances modularity
reduces errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what are the main programming standards

A

function shouldnt be longer than a page of code

variable identifiers must stick to a convention

each function must have a single entry point

variable must not be set up ouside the scope of the function (local variables)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how do operating systems utalise ‘Thinking ahead’

A

by caching frequently accessed data
this can be done with prefetching where an algorithm predicts the next data to be fetched and places it in cache before it is fetchied into the CPU

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

pros of caching

A

faster access
less bandwidth used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

cons of caching and prefetching

A

disk thrashing may occur if used to often
there is a chance that the algorithm is wrong and the data prefetched isnt needed next.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

define decomposition

A

breaking up the problem into small more managable sub-problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what are the benefits of modularisation

A

large problems broken down easier to solve

subroutine can be tested individually

modules can be resued in several programs

frequently used modules can saved as libraries

programmers can work concurrently

programs have fewer errors

easier to debug

easier to maintain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what does a good algorithm include

A

clear set of steps to prodice the correct output

is efficient and completed in as few steps as possible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how is concurrent processing done

A

multiple cores
tasks broken down into subtasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

pros of concurrent processing

A

solution found faster
increase program throughput
(rate a system can complete a task)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

cons of concurrent processing

A

more memory
more difficult to program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

difference between parallel processing and concurrent processing

A

concurrent not actually simultaneously swaps between subtasks quicky
parallel

17
Q

Describe the different ways a programmer could ensure that invalid data entries are not made by the user when selecting a venue and date for a cinema [4]

A

search box used to populate the venue
drop down menu for all the valid venues

calendar used for date
raneg check to make sure no 13th months

18
Q

when developing a set of applications (like word ppt and excel) why is it good for developers to reuse code [4]

A

Pre-tested
pre-compiled
saves time and money

similar look
quicker to learn
more comfortable with products in this set
user becomes more productive

19
Q

what is caching

A

The Process of storing instructions or data in cache memory

20
Q

what is prefetching

A

operating system predicts the next item that will be fetched and it is pre loaded into cache

21
Q

What are the goals behind thinking abstractly

meaning

A

identifying what does and doesnt matter
identifying the variables and objects needed
see levels of the problem (diff levels of abstraction)

22
Q

What are the theoretical positives of thinking abstractly

A

simplifies the probelms/ interface (simplifies it for both the user and the developer)
reduces the computational complexity of the solution
easier to see how he solution could be applied to another problem

23
Q

What are the cons of thinking abstractly

A

Models wont be as accurate

24
Q

examples thinking abstractly

A

using icons and symbols
putting data in a chart
moving nodes on a graph to change how it looks

25
Q

define thinking ahead

A

identifying the preconditions of a system (inputs outputs and reusable components)

26
Q

What does thinking ahead entail

in a general sense

A

Identifying preconditions

Identifying the state the data needs to be in for the algorithm to work

Identifying what data is required before it’s needed (prefetching)

identifying reusable components

27
Q

What theoretical pros of Caching

A

Can improve efficiency greatly

28
Q

What are the cons of caching

A

can be difficult to implement
is only as good as the operating systems predictions
data prefetched not always accurate

29
Q

what does thinking procedurally entail

A

identifying smaller sub problems
determine the order of sub problems are executed

30
Q

what are the pros of thinking procedurally

A

problem are easier to solve
debugging is easier

31
Q

What are the cons of thinking proceduraly

A

may not always be possible
(in an event driven program)

32
Q

define thinking logically

A

identifying individual steps and decision points of an algorithm

33
Q

Define Concurrently processing

A

more than one process happening at the same time
(seemingly)

34
Q

what are the pros of concurrent processing

A

Increase speed

35
Q

what are the cons of concurrent processing

A

May be difficult to program
Can sometimes result in deadlock
problem may not suit concurrency

36
Q

Go to examples of abstraction

A

Simplified weather
buildings and trees removed
simplified physics
reduced scenery
etc