Top Banner
Pragmatic Design Quality Assessment Tudor Gîrba University of Bern, Switzerland Michele Lanza University of Lugano, Switzerland Radu Marinescu Politehnica University of Timisoara, Romania
100

Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Nov 08, 2018

Download

Documents

ngongoc
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 2: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Software is complex.

The Standish Group, 2004

53% Challenged

18% Failed

29% Succeeded

Page 3: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

How large is your project?

1’000’000 lines of code

Page 4: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

How large is your project?

1’000’000 lines of code

* 2 = 2’000’000 seconds

/ 3600 = 560 hours

/ 8 = 70 days

/ 20 = 3 months

Page 5: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

But, code is for the computer.

Why would we ever read it?

Page 6: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

forward engineering

actual development }

{

}

{

}

{

}

{}

{

}

{

}

{}

{

}

{

Page 7: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

reve

rse

engine

erin

gforw

ard engineering

}

{

}

{

}

{

}

{}

{

}

{

}

{}

{

}

{

actual development

Page 8: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Reverse engineering is analyzing a subject system to:

identify components and their relationships, and

create more abstract representations.

Chikofky & Cross, 90

Page 9: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

}

{

}

{

}

{}

{

}

{

A large system contains lots of details.

How to judge its quality

?

Page 10: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

1Software in numbers

Page 11: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

You cannot control

what you cannot measure.

Tom de Marco

Page 12: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Metrics are functions that assign numbers to

products, processes and resources.

Page 13: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Software metrics are measurements which

relate to software systems, processes or

related documents.

Page 14: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Metrics compress system traits into numbers.

Page 15: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Let’s see some examples...

Page 16: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Examples of size metrics

NOM - number of methods

NOA - number of attributes

LOC - number of lines of code

NOS - number of statements

NOC - number of children

Lorenz, Kidd, 1994

Chidamber, Kemerer, 1994

Page 17: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

McCabe, 1977

McCabe cyclomatic complexity (CYCLO) counts

the number of independent paths through the code of a function.

interpretation can’t directly lead to improvement action

it reveals the minimum number of tests to write

Page 18: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Chidamber, Kemerer, 1994

Weighted Method Count (WMC) sums up the

complexity of class’ methods (measured by the metric of your choice; usually CYCLO).

interpretation can’t directly lead to improvement action

it is configurable, thus adaptable to our precise needs

Page 19: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Chidamber, Kemerer, 1994

Depth of Inheritance Tree (DIT) is the (maximum)

depth level of a class in a class hierarchy.

only the potential and not the real impact is quantified

inheritance is measured

Page 20: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Coupling between objects (CBO) shows the number

of classes from which methods or attributes are used.

Chidamber, Kemerer, 1994

no differentiation of types and/or intensity of coupling

it takes into account real dependencies not just declared ones

Page 21: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Tight Class Cohesion (TCC) counts the relative

number of method-pairs that access attributes of the class in common.

Bieman, Kang, 1995

TCC = 2 / 10 = 0.2

ratio values allow comparison between systems

interpretation can lead to improvement action

Page 22: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

...

Page 23: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

McCall, 1977

Page 24: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Metrics Assess and Improve Quality!

Page 25: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Metrics Assess and Improve Quality!

Really?

Page 26: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

?Problem 2: implicit mapping

we don’t reason in terms of metrics, but in terms of design principles

Problem 1: metrics granularity

capture symptoms, not causes of problems

in isolation,they don’t lead to improvement solutions

Page 27: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

2 big obstacles in using metrics:

Thresholds make metrics hard to interpret

Granularity make metrics hard to use in isolation

Page 28: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Can metrics help me

in what I really care for? :)

Page 29: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

forward engineering

actual development }

{

}

{

}

{

}

{}

{

}

{

}

{}

{

}

{

How do I understand code?

How do I improve code?

How do I improve myself?

Page 30: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

forward engineering

actual development }

{

}

{

}

{

}

{}

{

}

{

}

{}

{

}

{

How do I understand code?

How do I improve code?

How do I improve myself?

I want nothing to do with metrics

!

Page 31: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

How to get an initial understanding of a system?

Page 32: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Metric ValueLOC 35175

NOM 3618

NOC 384

CYCLO 5579

NOP 19

CALLS 15128

FANOUT 8590

AHH 0.12

ANDC 0.31

Page 33: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Metric ValueLOC 35175

NOM 3618

NOC 384

CYCLO 5579

NOP 19

CALLS 15128

FANOUT 8590

AHH 0.12

ANDC 0.31

Page 34: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Metric ValueLOC 35175

NOM 3618

NOC 384

CYCLO 5579

NOP 19

CALLS 15128

FANOUT 8590

AHH 0.12

ANDC 0.31And now what?

Page 35: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

forward engineering

actual development }

{

}

{

}

{

}

{}

{

}

{

}

{}

{

}

{

How do I understand code?

How do I improve code?

How do I improve myself?

I want nothing to do with metrics

!

Page 36: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

How do I improve code?

Page 37: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Breaking design principles, rules and best practices

deteriorates the code;

it leads to design problems.

Quality is more than 0 bugs.

Page 38: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

and 33%of all classes would require changes

Imagine changing just a small design fragment

Page 39: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Design problems are

expensive

frequent

unavoidable

How to detect and eliminate them?

Page 40: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

God Classes tend to centralize the intelligence of the system, to do everything and to use data from small data-classes.

Riel, 1996

Page 41: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

God Classes tend

to centralize the intelligence of the system,

to do everything and

to use data from small data-classes.

Page 42: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

God Classes

centralize the intelligence of the system,

do everything and

use data from small data-classes.

Page 43: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

God Classes

are complex,

are not cohesive,

access external data.

Compose metrics into queries using

logical operato

rs

Page 44: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Detection Strategies are metric-based queries to detect design flaws.

METRIC 1 > Threshold 1

Rule 1

METRIC 2 < Threshold 2

Rule 2

AND Quality problem

Lanza, Marinescu 2006

Page 45: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

A God Class centralizes too much intelligence in the system.

ATFD > FEW

Class uses directly more than a

few attributes of other classes

WMC ! VERY HIGH

Functional complexity of the

class is very high

TCC < ONE THIRD

Class cohesion is low

AND GodClass

Lanza, Marinescu 2006

Page 46: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

forward engineering

actual development }

{

}

{

}

{

}

{}

{

}

{

}

{}

{

}

{

How do I understand code?

How do I improve code?

How do I improve myself?

Page 47: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

How do I improve myself?

Page 48: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Don’t reason about quality

in terms of numbers!

Follow a clear and repeatable process

Page 50: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Can we understand the beauty of a paintingby measuring its frame or counting its colors?

Page 51: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

2Software in pictures

Page 52: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Software is beautiful

Page 53: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

1854,

London,

cholera

epidemic

Page 54: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

1812, Napoleon’s Campaign in Russia

Page 55: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Numbers..

Page 56: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Visualization compresses the system into pictures.

Page 57: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

A picture is worth

a thousand words...

...depends on the picture

anonymous

Lanza

Page 58: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic
Page 59: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Software visualiza

tion is more than UML

Page 60: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

We are

visualbeings ...

... and we’re

good at

spotting

patterns

Page 61: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

How many groups do you see?

Page 62: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

How many groups do you see?

Page 63: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

How many groups do you see?

Page 64: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

How many groups do you see?

Page 65: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Gestalt principles

proximity

enclosure connectivity

similarity

Page 66: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Attributes of Form

Orientation Line Length Line Width Size

Shape Curvature Added Marks Enclosure

Page 67: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Attributes of Form

Line Length Line Width Size

Shape Curvature Added Marks Enclosure

Page 68: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Attributes of Form

Line Width Size

Shape Curvature Added Marks Enclosure

Page 69: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Attributes of Form

Size

Shape Curvature Added Marks Enclosure

Page 70: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Attributes of Form

Shape Curvature Added Marks Enclosure

Page 71: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Attributes of Form

Curvature Added Marks Enclosure

Page 72: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Attributes of Form

Added Marks Enclosure

Page 73: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Attributes of Form

Enclosure

Page 74: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Attributes of Form

Page 75: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Exemplifying Preattentive Processing

Page 76: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Exemplifying Preattentive Processing

8789364082376403128764532984732984732094873290845389274-0329874-32874-23198475098340983409832409832049823-0984903281453209481-0839393947896587436598

Page 77: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Exemplifying Preattentive Processing

8789364082376403128764532984732984732094873290845389274-0329874-32874-23198475098340983409832409832049823-0984903281453209481-0839393947896587436598

8789364082376403128764532984732984732094873290845389274-0329874-32874-23198475098340983409832409832049823-0984903281453209481-0839393947896587436598

Page 78: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

70%of all external

inputs come

through the eyes

Page 79: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Software visualization isthe use of the crafts of typography, graphic design, animation, and cinematography with modern human-computer interaction and computer graphics technology to facilitate both the human understanding and effective use of computer software.

Price, Becker, Small

Page 80: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Static Visualization

Page 81: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

no silver bullet

Page 82: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Software is complex

Page 83: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

A picture is worth

a thousand words.

Page 84: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

System Complexity shows class hierarchies.

lines

attributes

methods

Lanza, Ducasse, 2003

Page 85: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Class Blueprint shows class internals.

Initialize Interface Internal Accessor Attribute

invocation and access direction

Lanza, Ducasse, 2005

Page 86: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Class Blueprint reveals patterns.

schizophrenic classtwin classes

Page 87: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Softwarenaut explores the package structure.Lungu etal, 2006

Page 88: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Code City shows where your code lives.Wettel, Lanza, 2007

classes are buildings grouped in quarters of packages

Page 89: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Jmol - The Time Machine

Page 90: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Jmol - The Time Machine

Page 91: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Jmol - The Time Machine

Page 92: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Jmol - The Time Machine

Page 93: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Jmol - The Time Machine

Page 94: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Jmol - The Time Machine

Page 95: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Jmol - The Time Machine

Page 96: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Jmol - The Time Machine

Page 97: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

Software is beautiful

Page 98: Pragmatic Design Quality Assessment - unice.frmiageprojet2.unice.fr/@api/deki/files/2236/=Metrics-Lanza-Extract... · Coupling between objects (CBO) ... TCC = 2 / 10 = 0.2 ... Pragmatic

http://loose.upt.ro/incode

http://www.inf.unisi.ch/phd/wettel/codecity.html

http://moose.unibe.ch