2.1.2) Thinking Ahead Flashcards

(11 cards)

1
Q

Thinking Ahead titles

A
  • Identifying Inputs and Outputs
  • Determining Preconditions
  • Caching
  • Reusable Program components
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you think ahead?

A
  • Program is decomposed
  • I/Os are defined
  • preconditions are defined
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why do we identify inputs/outputs?

A

If not defined explicitly errors and problems can occur.

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

What are preconditions?

A

Conditions that must be true for an algorithm to complete successfully.

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

Where are preconditions stored?

A

Programmed into code
OR
Supplied in documentation

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

What are the advantages of determining preconditions?

A

If preconditions are provided, developer is aware of checks needed
Allows subroutine to be reusable.

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

What is Caching?

A

The act of storing data and instructions in registers close to the CPU.

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

How is caching handled?

A

Usually automatic by the operating system.

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

What is Web Caching?

A

Where HTML pages and images are cached allowing for faster access

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

When are subroutines put into libraries?

A
  • When they are commonly used
  • When developers will make multiple other projects with the same subroutines.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the advantage of making reusable program components?

A

As they have already been thoroughly tested and documented saves time later.

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