Defensive Programming Flashcards

1
Q

What is a Software Crisis?

A

Difficult to write useful & efficient computer programs in the required time because of rapid increase in computer power and complexity of problems that need to be solved.

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

What is Spaghetti Code?

A

Unstructured and difficult to maintain source code.

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

Defensive Programming

A

Ensure the continuity of a piece of software in spite of unforeseeable usage of said software.

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

What are Invariants?

A

Conditions that do not vary.

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

Types of Invariants?

A

Loop invariants
Class invariants
Method invariants

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

Loop invariant

A

True at the beginning of each loop

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

Class Invariants

A

True before and after each method call

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

Method Invariants

A

Pre- and post conditions

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

What is Structured Programming?

A

component-level design technique which uses only small set of programming constructs

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

What are Code Guides

A

Set of rules to which programmers must adhere

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