10.2 Thinking Ahead Flashcards

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

What is the ‘input’ in an abstract model?

A

The information relevant to the problem, which could for example be passed as parameters to a subroutine

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

What is the ‘output’ in an abstract model?

A

The solution to the problem, which could be passed back from a subroutine

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

Why is it important to think ahead?

A

Because the algorithm you are working on must be correct and it also must be efficient

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

Advantages of documenting the inputs and outputs?

A

There is no ambiguity in what must be supplied to the sub-procedure and what is returned

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

Advantages of specifying preconditions

A
  • Makes program components reusable
  • Cutting out unnecessary checks
  • Makes programs easier to debug and maintain
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are some examples of reusable program concepts?

A

Libraries and components

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

List some typical standards for reusable modules

A
  • Inputs, outputs and preconditions should be documented
  • Variable identifiers should conform to a standard convention
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Cashing

A

Temporary storage of data and instructions

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

Advantages of caching

A
  • Faster access to cached resources
  • Saving on costly use of bandwidth
  • Reduced load on web services in a client-server environment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Drawbacks of caching

A
  • Slower performance if the resource isn’t found in the cache
  • Could be given a stale copy of a resource when an up-to-date copy is needed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly