• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/46

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

46 Cards in this Set

  • Front
  • Back

What is abstraction ?

The removal of unnecessary detail, leaving only what is essential remaining.

Why is abstraction needed ?

- Abstraction is required to enable complex procedures or events to be modeled.




- Computer programs cannot account for every single element of an event as this would be extremely complex and time consuming.

What is abstraction used for in computer science?

- To represent real world objects in a way which can be processed.


- Creating algorithms (removing the unnecessary)


- Modelling


- Encapsulate (object oriented programming)


- Layering (OSI model, TCP stack etc)

What research steps should be conducted BEFORE a project begins ?

- What do current systems do ?


- How do they work (exactly) ?


- What is needed ?


- What resources do you need to make a new system ?


- How will you work efficiently ?

What is caching ?

Caching is the idea keeping a local store of data to speed up a process.

What might the cache contain ?

- Frequently used data.


- Frequently used instructions.


- Data that a system has predicted it will need next (pre-fetching).

What scenarios may a cache be used ?

- Storing instructions and data in a CPU


- In a database system


- On a proxy server in a network


- By large website hosts and ISP's

Advantages of caching

- Caching will significantly increase system performance as data is available locally, almost immediately.


- Saves waiting for long read/write operations.


- Prevents repeated read/write, fetch/store operations.


- Can reduce bandwidth/network usage.

Disadvantages of caching

- Difficult to code prediction routines


- Can be very complex to set up, especially in database systems.


- Can cause synchronization issues


- If there's a cache 'miss' (a branch unexpectedly happens in code or similar) then the whole cache must be flushed and refilled causing a stall in performance.

Forms reusable code comes in

- Libraries


- Classes


- DLL's (Dynamic Link Libraries)

What might existing libraries cater for ?

- Drawing and handling the user interface


- File load and save


- Memory management


- Mathematical functions


- Input and output operations


- Graphics

What is a procedure ?

- A block of code which performs a specific task or sub-task.


- It may allow data to be sent in and may give data out again when complete.


- It is re-usable.


- It can be called from anywhere in your code.

What does Thinking procedurally entail ?

- Break a problem down into chunks.


- Decide which could be a re-usable block of code.


- Work out what inputs the procedure will need to do the task.


- Work out what outputs the procedure should produce.


- Make those procedures.

Method for breaking down a program

- Decompose the program - what are the main tasks this program should do.


- Abstract - make sure you are only focusing on what is strictly necessary to complete the task.


- Decide what variables your program will need.


- Algorithms - what will your code need to calculate/manipulate/produce.


-Outline algorithms - what will the basic structure of your code be.


- Decide what procedures you should produce.

What is the process of thinking logically

- Identify a problem


- Break it down (decomposition)


- Removing unnecessary complications and focusing on the true problem (abstraction)


- Identifying concurrency, algorithms, efficiency saving, etc


- Designing the solution

Rules to follow to solve a problem

- What are the steps that must be taken?


- In what order?


- What is the eventual goal?


- What decision must be made?

What is concurrency

Concurrency is the idea of doing multiple things at the same time.

What else does concurrency apply to?

- Modelling projects


- Suggesting time savings in existing processes


- Managing human resources

Benefits of Concurrency

. Faster processing - More things can happen during the same time window.


. Energy efficiencies - As more is being done each cycle, less time us used processing, so less energy is used.


. Efficient use of resources - Less idle processor time, more time available for other tasks.


- Less apparently lag when running a program.

Trade-offs of concurrency

. Increased complexity - Programs must be specifically designed to work concurrently (threading)


- Compilers need to be able to explicitly target multi-core architectures.


. Not suitable for tasks - It is not possible to make all problems concurrent


. Does not provide a doubling of speed - Some tasks may be more/less concurrent than others.


-Some threads may have to wait for the outcome of others to proceed.

Sequence

Code is executed sequentially - meaning that statements and functions are run one-after-the-other.

What is branching

Branching is where code splits. The programme is interrupted and control is moved to another part of the programme.

Reasons for interrupting a programme

- Decisions to be made based on data


- Different outcomes

Three loops for iteration

Do until


While


For

What is iteration

Iteration is a combination of branching and sequencing to repeat statements and functions in programmes

Do until description

This will loop part of your code until something happens- these will run at least once before reacting to the conditions that are set.



While description

This loop will repeat until something changes. It differs from until by checking the criteria before starting the loop.

For description

This loop repeats a fixed number of times, either you tell it how many times to loop or they will figure this out from another part of the programme.

What is recursion

Recursion is when a procedure calls itself.

Positives of recursion

- Can be easier to read and write recursive code




- Recursion often creates a more sensible/natural solution - no leaving/re-entering a procedure repeatedly in one go.




- Some tasks are just naturally recursive.

Negatives of recursion

- Recursion requires more memory.




- Recursion is difficult to race as each call has its own set of variables.




- It is possible to run out of memory if too many calls occur.

Implications of using global variables

- Global variables are more likely to be altered or changed by accident later on in the programme causing unexpected results.


- When global's are used in excess, memory problems arise as they are kept in memory constantly even when not in use eating up memory.


- Excess use of global's makes for messy code.

Important definitions for IDEs

The code that is written in an IDE is refereed to as Source code.




The process of writing, testing, debugging, packaging, documenting, etc is refereed to as the build.

Run-time environments

Software to support the execution and running of programs. It allows the developer to run their code during development in order to check for logical errors.

Memory inspector

A facilitywhich will display the contents of a section of memoryt

Error diagnostics

Usedwhen a program fails to compile or to run. Error messages are displayed to help the programmer diagnose what hasgone wrong

Code editor

Allows a programmer to enter, format and edit source code


Compilers

Convertssource code into executable machine code. Once compiled, a program can be run at any time

Interpreter

Convertseach line of source code into machine code, and executes it as each line ofcode is run. The conversion process isperformed each time the program needs to be run.

Debugger

Aprogram which helps locate, identify and rectify errors in a program

Translators

A program which converts high-level or assembly-level code into executable machine code by compiling or interpreting.

Loader

Aprogram which loads previously compiled code into memory

Linker

A program which allows previously compiled code, from software libraries, to be linked together


Trace

Afacility which displays the order in which the lines of a program are executed,and possibly the values of variables as the program is being run

Breakpoint

Afacility which interrupts a programon a specific line of code, allowing the programmer to compare the values ofvariables against expected values. Theprogram code can then usually be executed one line at a time. This is called single-stepping

Variable watch

Afacility which displays the current value of any variable. The value can be 'watched' as the programcode is single-stepped to see the effects of the code on the variable.