Law of demeter Flashcards

(13 cards)

1
Q

What is Software rigidity?

A

The tendency for software to be hard to change even in simple ways.

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

Symptom and effect of rigidity

A

Symptom: Every change becomes a cascade of subsequent changes in dependent modules

Effect: Managers fear developers to fix non critical issues

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

What is Software fragility?

A

The tendency for software to break in many places every time it is changed. Breakage occurs in areas that have no conceptual relationship with the area that was changed

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

Symptoms and effects of Fragility

A

Symptom: Every fix makes it worse, introducing more problems than are solved.

Effect: Every time managers auth a fix, they are scared to what in the system will break

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

What is Software immobility?

A

the inability to reuse software from other projects or part of the same project

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

Software immobility symptoms and effects:

A

Dev discovers he needs to use a module that is similar to what another wrote but their is too much baggage to use it

effect: Software is rewritten

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

What is Software viscosity?

A

The tendency of software development environment to encourage software changes that are hacks rather than software that keeps the original design intent.

Best way to understand it is working software vs good software

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

Software viscosity symptoms and effects:

A

Symptom: Easy to do the wrong thing, hard to do the right thing.

Effect: Software maintainability suffers

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

Why do such problems occur

A
  • Domain complexity
  • Time/resource constraints
  • Changing tech
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the Law of Demeter?

A

The law to only talk to your immediate friends/classes.

IE keep access within an objects scope, don’t force outside access

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

Law of Demeter for methods

A

Requires that a method m of an object O may only invoke the methods of the following objects:

O itself
M parameters
Objects made in M
Object made components
Global variables in O

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

Law of Demeter features:

A
  • Minimize the no of acquaintances which directly communicate with a supplier
  • Access the supplier method only through methods of preferred acquaintances
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Acceptable law of Demeter violations

A
  • Optimization
  • If module accessed is a fully stable black box
How well did you know this?
1
Not at all
2
3
4
5
Perfectly