2.1.2 Thinking Ahead Flashcards

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

What is the purpose of thinking ahead?

A
  • Allows developers to consider problems/difficulties that may arise when software is used
  • Makes programs easy and intuitive to use
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

What are inputs?

A
  • Any data that is required to solve a problem, often entered into a system by a user
  • What the system needs to process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are outputs?

A
  • The results that are passed back once the inputs have been processed and the problem solved
  • What the system should produce
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give examples of inputs

A
  • Keyboard
  • Mouse
  • Microphone
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give examples of outputs

A
  • Speaker
  • Printer
  • Monitor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What considerations do programmers need to make about inputs and outputs when thinking ahead?

A
  • Data structure used
  • Data types used
  • Order of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are pre-conditions?

A
  • Conditions that already exist which may affect how you devise a solution to a problem
  • Requirements which must be met before a program can be executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Where can preconditions be defined?

A
  • Within the code or within documentation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

State three advantages of including preconditions within the documentation accompanying a sub-routine

A
  • Reduces the length and complexity of the program
  • Saves time to debug and maintain a longer program
  • Makes subroutines more reusable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is caching?

A
  • The process of storing instructions or values into cache memory after they have been used as they may need to be used again
  • Instructions/programs retrieved from secondary storage and placed into RAM remain there in case they are needed again before the program using them ends
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How is caching used in storing web pages?

A
  • The web pages a user frequently accesses will be cached so the next time it is accessed, content can be loaded without delay
  • Reduces the requests from the client to the web server and vice versa
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the advantages of caching web pages?

A
  • Content can be loaded without delay
  • Images and texts do not have be downloaded multiple times
  • Frees bandwidth for other tasks on a network
  • Less time is spent waiting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is prefetching?

A
  • Involves data being requested from RAM by the processor before it is actually required
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Give limitations of caching

A
  • Accuracy of algorithms used in prefetching/wrong data is often fetched and cached which then has to be removed
  • Maintaining correct sequence of data is problematic
  • Predictive logic - caching algorithms are complicated to implement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

State some advantages of using reusable program components

A
  • Shortens development time
  • Saves systems resources
  • Lowers development costs
  • Reduces redundant code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

State disadvantages of using reusable program components

A
  • May be compatibility issues with the rest of the software
  • Components may need to be modified, sometime more costly and time-consuming than developing in house
16
Q

What is an advantage of caching?

A
  • Faster retrieval times as fetched data from secondary storage is much slower than fetching from RAM
17
Q

What are the advantages of pre-written routines

A
  • Already compiled, tested and error free
  • Use of libraries aves development time
  • May have been written indifferent source language
  • Programmers can take advantage of other programmers’ expertise