2.1 Elements of computational thinking

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

20 Terms

1
New cards

What is abstraction?

It is the process of removing excessive details to arrive at a representation of a problem that consists of only the key features.

2
New cards

What is Representational abstraction?

Abstraction that is relevant to a given scenario and simplifying a problem based on that.

3
New cards

What is abstraction by generalisation

form of abstraction involves grouping together similarities within a problem to identify what kind of problem. This allows problems to be categorised and a common solution to be found.

4
New cards

What is Data abstraction?

a subcategory of abstraction in which details about how data is being stored are hidden.

5
New cards

What is procedural abstraction?

Programmers can also perform functions such as pushing and popping items to and from a stack without having any knowledge about the code used to implement this functionality.

6
New cards

High level vs Low level abstraction

High level-closest to the user and are usually responsible for providing an interface for the user to interact with hardware.
Low level-responsible for actually performing these tasks through the execution of machine code.

7
New cards

What to consider when devising an abstract model

ā—What is the problem that needs to be solved by the model and what are its key features?
ā—How will the model be used (Consider factors such as Convenience, accessibility and affordability)?
ā—Who will the model be used by? (Audience)
ā—Which parts of the problem are relevant based on the target audience and the purpose of the model?

8
New cards

Inputs and Outputs when thinking Ahead

ā—Goal/Outcome-Begin by thinking what is the goal of your computer system-What is it's purpose? What are it's outputs?
ā—Outputs-How is the output going to be displayed/ processed? : Visual, Audio, Haptic feedback, As input data into another system/program.
ā—Inputs-Then think how can we gain inputs to make this possible-Ask the user for various data.
ā—Process-Think about process required to produce desired outcome from the system using the inputs.
ā—Preconditions- Considering conditions that may affect how you design a program/algorithm to meet your goal.

9
New cards

Importance of reusability

Commonly used functions are often packaged into libraries for reuse. This allows for: Shortened development time, Lower development costs and reduce redundancy in coding.
Also, reused code is usually ore reliable as it has already been tested and any bugs have been dealt with.

10
New cards

External reuse of code

Selling components to third parties. This can allow for developers to reap the benefits of accounts being linked to different apps and websites, thus allowing for certain procedures and functions to be made available to other developers via an Application Programming Interface(API).

11
New cards

What is Caching?

Caching is the process of storing instructions or values in cache memory after they have been used, as they may be used again. This saves time which would have been needed to store and retrieve the instructions from secondary storage again.

12
New cards

What is precaching/prefetching?

when algorithms predict which instructions are likely to soon be fetched. The instructions and data which are likely to be used are then loaded and stored in cache before they are fetched. Can lead to significant improvement in performance if implemented effectively.

13
New cards

Limits of Precaching/Prefetching?

Due to the nature of predictive logic, sometimes the wrong data is cached and subsequently, it has to be removed or flushed. Maintaining correct sequence of data items in these cases can be problematic.

14
New cards

How to think procedurally

ā—Identify components of a problem- It is important to analyse a problem and decompose it into smaller more manageable chunks as well as determine the modules you need to write for each problem.
ā—Stepwise refinement using a top-down modular design- Program is split into smaller sub-tasks with the aim of developing a diagram where each sub task can be tackled as a small independent modules.
ā—Each subtask can then be appropriately distributed to programmers or teams of programmers which can develop and test a program before integrating it into the overall solution.
It is possible that once distributed that the subtasks can be decomposed further.

15
New cards

How to think logically

ā—Limit the possible solutions we can pick from. (Come to a conclusion on the most efficient way of solving a program taking into account the preconditions)
Identify where decisions will need to be made (By you/your team, the program and by the user)
ā—Consider key factors in the outcome of a decision (Most effective, Convenient and reasonable method)
ā—Evaluate these conditions and order them from most important to least important. (Prioritise based on effectiveness, Convenience and feasibility).

16
New cards

What is concurrent processing?

the process of completing ā€‹more than one taskā€‹ at a given time; different tasks are given slices of processor time, to give the illusion that tasks are being performed simultaneously. (different to Parallel processing).

17
New cards

What is concurrent thinking?

the mindset that allows you to spot patterns and parts of problems where concurrency can be applied.

18
New cards

How to think Concurrently

Assessing which parts of the problem are related.

19
New cards

Advantages of concurrent processing

ā— The number of tasks completed in a given time is increased.
ā— Less time is wasted waiting for an input or user interaction, as 8other tasks can be completed.

20
New cards

Disadvantages of concurrent processing

ā— Concurrent processing can take longer to complete when large numbers of users or tasks are involved as processes cannot be completed at once.
ā— There is an overhead in coordinating and switching between processes, which reduces program throughput.
ā— Just as with parallel processing, not all tasks are suited to being broken up and performed concurrently.