+ All Categories
Transcript
Page 1: INGI2252 Software Measures & Maintenance

INGI2252Measures &

MaintenanceAn excerpt of some final presentations

by Prof. Kim Mens

partly based on a presentation by R. Capron & R. Wallez, Dec. 2012

Page 2: INGI2252 Software Measures & Maintenance

Concept of the Course« Software Measures and Maintenance »

• Two interleaved parts• Software development and maintenance

• Software measures and metrics

• Main objective• How to develop « better » and more « maintainable » software systems?

• and object-oriented software in particular

• How to assess the quality of a software system?

• and its maintainability in particular

• Side objective• Learn yet a new programming language (Smalltalk)

Page 3: INGI2252 Software Measures & Maintenance

Techniques and tools« Software Measures and Maintenance »

• “Pure” object-oriented programming

• Integrated development environments

• Best programming practices & design heuristics

• Framework development

• Refactoring & bad smells

• Unit testing

• Software metrics and measures

• And a whole bunch of software analysis tools

Page 4: INGI2252 Software Measures & Maintenance

Course assignment« Software Measures and Maintenance »

• No traditional exam

• Instead, analyze quality (maintainability) of an existing software systemwith techniques and tools seen in the course

• Part 1 : Manual code assessment

• Based on good practices, conventions, heuristics, design principles and patterns

• Part 2 : Automated analysis

• Using software metrics, visualisation and code querying tools like MOOSE, Mondrian, SOUL, ...

• Present overall results of the analysis to a « client »

Page 5: INGI2252 Software Measures & Maintenance

Global view of the analyzed systemUsing the « System Complexity » visualization

Page 6: INGI2252 Software Measures & Maintenance

NOP : Number of PackagesNOC : Number of ClassesNOM : Number of MethodsLOC : Lines of CodeCYCLO : McCabe’s Cyclomatic complexity number

ANDC : Average Number of Derived ClassesAHH : Average Hierarchy HeightCALLS : Number of Distinct Method InvocationsFANOUT : Number of Called Classes

Summary of the system’s measures

Using the « Overview Pyramid »

Page 7: INGI2252 Software Measures & Maintenance

Critical evaluation ofthresholds used

Compare predefined thresholds

(good, bad, average) used by

the tool with :

• The system being analyzed

• Some “good” reference

systems

Collection hierarchy

Pharo Kernel

Page 8: INGI2252 Software Measures & Maintenance

Evolution of a metricin terms of the chosen threshold

Page 9: INGI2252 Software Measures & Maintenance

Detailed analysis of FANOUT metric

per class of the analyzed system

Page 10: INGI2252 Software Measures & Maintenance

Number of Comments

Number of Public Methods

9

Illustration of the lack of comments

Page 11: INGI2252 Software Measures & Maintenance

Absence of accessors and mutators

Using the « Class Blueprint »

Page 12: INGI2252 Software Measures & Maintenance

After adding accessors and mutators

Using the « Class Blueprint »

Page 13: INGI2252 Software Measures & Maintenance

Number of statements vs. lines of code

Using a Mondrian « Scatter Plot »

Page 14: INGI2252 Software Measures & Maintenance
Page 15: INGI2252 Software Measures & Maintenance

Detection of code duplicationUsing the « Side-by-side Code Duplication »

tool

Page 16: INGI2252 Software Measures & Maintenance

Discovering dependenciesbetween packages

Using the« Dependency Structure Matrix »


Top Related