8 actualization programmers implement the new functionality –according to change request the...

28
8 Actualization • Programmers implement the new functionality – according to change request • The process of actualization varies – depends on the size of the change © 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 1 Initiation Concept Location Impact Analysis Prefactoring Actualization Postfactorin g Conclusion Conclusion V E R I F I C A T I O N

Upload: irene-boyd

Post on 02-Jan-2016

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

8 Actualization

• Programmers implement the new functionality – according to change request

• The process of actualization varies – depends on the size of the

change

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 1

Initiation

Concept Location

Impact Analysis

Prefactoring

Actualization

Postfactoring

ConclusionConclusion

VERIFICATION

Page 2: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Small changes

• Done directly in old codeclass Address

{

public move();

protected String name;

protected String streetAddress;

protected String city;

protected char state[2], zip[5];};© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 2

Page 3: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Small changes

• Done directly in old codeclass Address

{

public move();

protected String name;

protected String streetAddress;

protected String city;

protected char state[2], zip[9];};© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 3

Page 4: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Small changes

• Done directly in old codeclass Address

{

public move();protected String name;

protected String streetAddress;

protected String city;

protected char state[2], zip[9];};© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 4

Page 5: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Larger changes

• Programmers implement the new classes separately from the old code

• The new code is plugged into the the existing code – incorporation

• The change can propagate to other components of the system – ripple effect

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 5

Page 6: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Polymorphism

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 6

Page 7: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Polymorphic class

class Pig : public FarmAnimal

{

public:

void makeSound() {cout<<”Oink”;}

};•Farm now can declare objects of the type Cow, Sheep, or Pig

– the composite responsibility of Farm was extended by the concept Pig.

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 7

Page 8: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Adding New Component

• Implement the new classes separately from the clients in the old code– new classes assume the responsibilities

demanded by the change request

• New classes are plugged as components into the appropriate place of the existing code – incorporation

• Change propagation© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 8

Page 9: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

New responsibility is local

Old Code New Code

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 9

Page 10: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

New responsibility is compositeOld Code New Code

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 10

Page 11: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Incorporating new supplierOld Code New Code

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 11

Page 12: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Point of Sale

• The old application did not require authorization– anyone was able to launch it

• The change request:– “Create a cashier login that will control the

user log in with a username and password.”

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 12

Page 13: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

PoS + new class

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 13

Page 14: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Incorporation of Cashier

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 14

Page 15: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Replacement of a class

Old Code New Code

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 15

Page 16: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Example incorporation

sale

register

saleLineItem

store item

taxCategory

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 16

Page 17: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Change propagation

sale

register

saleLineItem

store item

taxCategory

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 17

Page 18: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Change propagation

sale

register

saleLineItem

store item

taxCategory

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 18

Page 19: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Change propagation

sale

register

saleLineItem

store item

taxCategory

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 19

Page 20: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Change propagation

sale

register

saleLineItem

store item

taxCategory

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 20

Page 21: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Change propagation ends

sale

register

saleLineItem

store item

taxCategory

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 21

Page 22: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Deletion of obsolete functionality

• Also causes change propagation

• All references to the deleted functionality must be deleted– secondary changes propagate to other

classes

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 22

Page 23: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Underestimated Impact Set

• Impact analysis estimates which classes are impacted

• Change propagation modifies the code of impacted classes– change propagation is the moment of truth – it confirms or refutes the predictions of impact

analysis– accuracy of impact analysis predictions is

important for software managers

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 23

Page 24: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Ericsson Radio Systems

Unchanged ChangedUnchanged 42 0Changed 64 30

Predicted

Actual

• total number of classes = 42 + 0 + 64 + 30 = 136

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 24

Page 25: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Categories

• true positives = 30

• false positives = 0

• true negatives = 42

• false negatives = 64

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 25

Page 26: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Precision

• Used in the information retrieval

• Precision = (true positives)/(true positives + false positives)

• Ericson, precision = 30/(30 + 0) = 1 = 100%.

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 26

Page 27: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Recall

• Recall = (true positives)/(true positives + false negatives)

• Ericson recall = 30/(30 + 64) = 0.32 = 32%

• Programmers estimated that the changes will impact only about a third of all classes that actually changed– missed the other two thirds!

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 27

Page 28: 8 Actualization Programmers implement the new functionality –according to change request The process of actualization varies –depends on the size of the

Underestimation

• Common in software engineering– consequence of invisibility

• Makes planning difficult

• Common in other field also

© 2012 Václav Rajlich Software Engineering: The Current Practice Ch. 8 28