Architecting Complexity HOW UNDERSTANDING COMPLEXITY PROMOTES SIMPLICITY.

Slides:



Advertisements
Similar presentations
SPEC Workshop 2008 Laboratory for Computer Architecture1/27/2008 On the Object Orientedness of C++ programs in SPEC CPU 2006 Ciji Isen & Lizy K. John University.
Advertisements

Bartłomiej Bodziechowski 1, Eryk Ciepiela 2, Marian Bubak 1,2 1 AGH University of Science and Technology, Department of Computer Science AGH, 2 AGH University.
Metrics for OO Design Distinct & measurable characteristics of OO design:- Size:-it is defined as – population,volume,length & functionality Population.
Software Metrics for Object Oriented Design
General OO Concepts and Principles CSE301 University of Sunderland Harry R. Erwin, PhD.
Lecture 9 Improving Software Design CSC301-Winter 2011 – University of Toronto – Department of Computer Science Hesam C. Esfahani
1 Predicting Bugs From History Software Evolution Chapter 4: Predicting Bugs from History T. Zimmermann, N. Nagappan, A Zeller.
Prediction of fault-proneness at early phase in object-oriented development Toshihiro Kamiya †, Shinji Kusumoto † and Katsuro Inoue †‡ † Osaka University.
Figures – Chapter 24.
Metrics for Object Oriented Design Shyam R. Chidamber Chris F. Kemerer Presented by Ambikadevi Damodaran.
Applying and Interpreting Object Oriented Metrics
March 25, R. McFadyen1 Metrics Fan-in/fan-out Lines of code Cyclomatic complexity Comment percentage Length of identifiers Depth of conditional.
Page 1 Building Reliable Component-based Systems Chapter 7 - Role-Based Component Engineering Chapter 7 Role-Based Component Engineering.
Analysis of CK Metrics “Empirical Analysis of Object-Oriented Design Metrics for Predicting High and Low Severity Faults” Yuming Zhou and Hareton Leung,
Design Metrics Software Engineering Fall 2003 Aditya P. Mathur Last update: October 28, 2003.
Object-Oriented Metrics
Empirical Validation of OO Metrics in Two Different Iterative Software Processes Mohammad Alshayeb Information and Computer Science Department King Fahd.
March R. McFadyen1 Software Metrics Software metrics help evaluate development and testing efforts needed, understandability, maintainability.
PVK-Ht061 Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance Maintenance.
Object Oriented Metrics XP project group – Saskia Schmitz.
An Approach to Measure Java Code Quality in Reuse Environment Aline Timóteo Advisor: Silvio Meira Co-advisor: Eduardo Almeida UFPE.
Software Metrics.
Chidamber & Kemerer Suite of Metrics
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Refactoring.
An Approach to Measure Java Code Quality in Reuse Environment Aline Timóteo Advisor: Silvio Meira UFPE – Federal University of Pernambuco
Company Confidential – Do Not Duplicate 2 Copyright 2008 McLane Advanced Technologies, LLC S.O.L.I.D. Software Development Achieving Object Oriented Principles,
Software Measurement & Metrics
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 15b: Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6/e Chapter.
The CK Metrics Suite. Weighted Methods Per Class b To use this metric, the software engineer must repeat this process n times, where n is the number of.
1 OO Metrics-Sept2001 Principal Components of Orthogonal Object-Oriented Metrics Victor Laing SRS Information Services Software Assurance Technology Center.
The CK Metrics Suite. Weighted Methods Per Class b To use this metric, the software engineer must repeat this process n times, where n is the number of.
OHTO -99 SOFTWARE ENGINEERING “SOFTWARE PRODUCT QUALITY” Today: - Software quality - Quality Components - ”Good” software properties.
Concepts of Software Quality Yonglei Tao 1. Software Quality Attributes  Reliability  correctness, completeness, consistency, robustness  Testability.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University 1 Evaluation of a Business Application Framework Using Complexity.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 12-5 Software Engineering Design Goals.
1 Metrics and lessons learned for OO projects Kan Ch 12 Steve Chenoweth, RHIT Above – New chapter, same Halstead. He also predicted various other project.
An Automatic Software Quality Measurement System.
1 Venkat Subramaniam Quality of Software Design Good design is critical to a software application A good design has following characteristics –Specific.
An Approach to Measure Java Code Quality in Reuse Environment Master: Aline Timóteo Professor: Silvio Meira UFPE – Federal University.
CSc 461/561 Information Systems Engineering Lecture 5 – Software Metrics.
Measurement and quality assessment Framework for product metrics – Measure, measurement, and metrics – Formulation, collection, analysis, interpretation,
Daniel Liu & Yigal Darsa - Presentation Early Estimation of Software Quality Using In-Process Testing Metrics: A Controlled Case Study Presenters: Yigal.
© 2009, Cognizant Technology Solutions. All Rights Reserved. The information contained herein is subject to change without notice. Software Architecture.
Design Patterns in Context ©SoftMoore ConsultingSlide 1.
Object-Oriented (OO) estimation Martin Vigo Gabriel H. Lozano M.
Ontology Support for Abstraction Layer Modularization Hyun Cho, Jeff Gray Department of Computer Science University of Alabama
SOLID Design Principles
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
An Approach to Measure Java Code Quality in Reuse Environment Author: Aline Timóteo Professor: Silvio Meira UFPE – Federal University.
Object Oriented Metrics
1 OO Technical Metrics CIS 375 Bruce R. Maxim UM-Dearborn.
Software Engineering Object Oriented Metrics. Objectives 1.To describe the distinguishing characteristics of Object-Oriented Metrics. 2.To introduce metrics.
Design Metrics CS 406 Software Engineering I Fall 2001 Aditya P. Mathur Last update: October 23, 2001.
Object Oriented Systems Design
Mantas Radzevičius ifm-2/2
Object Oriented Metrics
Software Metrics 1.
Course Notes Set 12: Object-Oriented Metrics
Design Characteristics and Metrics
Object-Oriented Metrics
CS427: Software Engineering I
Design Metrics Software Engineering Fall 2003
Design Metrics Software Engineering Fall 2003
Why Object-oriented Programming?
Software Metrics SAD ::: Fall 2015 Sabbir Muhammad Saleh.
A (partial) blueprint for dealing with change
S. Single Responsibility Principle O. L. I. D.
Chapter 8: Design: Characteristics and Metrics
Presentation transcript:

Architecting Complexity HOW UNDERSTANDING COMPLEXITY PROMOTES SIMPLICITY

Why is writing software hard? ^ great

Our duty as software architects is to understand and manage complexity

Simple is not Easy Simple is objective Easy is subjective

Simple is not Easy Simple is to Complex Easy is to Hard As

Simple is not Easy Development Speed Time

Simple vs Complex Simple Complex

Complexity Complexity is analogous to heat and simplicity is analogous to cold There is no such thing as cold, just absence of heat We can never add simplicity, only remove complexity

Software Complexity “The true meaning of software complexity is the difficulty to maintain, change and understand software” -H. Zuse, Software Complexity Measures and Models

Software Complexity Understanding Software TestingReasoning Trying to understand the software from the outside Trying to understand the software from the inside

Software Complexity Understanding Software TestingReasoning Cyclomatic Complexity CouplingCohesionSize

Epistemic Complexity Understanding Software Reasoning CouplingCohesionSizeObserver DevelopersCustomers "The richness of the knowledge that is embedded in an artifact" -Dasgupta

Environmental Complexity Resource Contention CPU RAM Segmentation Execution System Root Loop

Software Complexity Complexity is the root cause of the vast majority of problems with our software Unreliability Late delivery Poor performance

Complexity Metric: Coupling Coupling is the degree of interdependence between software modules A change in one module usually forces changes in other modules Assembly of modules requires more time and effort due to inter-module dependency Modules might be harder to reuse and or/test

Complexity Metric: Coupling CBO: Coupling Between Objects Number of classes to which a class is coupled Two classes are coupled when methods declared in one class use methods defined by another class Multiple access to the same class are counted as one access High CBO is undesirable: CBO>14 is too high Shyam R. Chidamber, Chris F. Kemerer. A Metrics suite for Object Oriented design. M.I.T. Sloan School of Management E Victor Basili, Lionel Briand and Walcelio Melo. A Validation of Object-Oriented Design Metrics as Quality Indicators. IEEE Transactions on Software Engineering. Vol. 22, No. 10, October Lionel C. Briand, John W. Daly, and Jürgen Wüst: A Unified Framework for Coupling Measurement in Object-Oriented Systems. Fraunhofer Institute for Experimental Software Engineering. Kaiserslautern, Germany Houari A. Sahraoui, Robert Godin, Thierry Miceli: Can Metrics Help Bridging the Gap Between the Improvement of OO Design Quality and Its Automation?

Complexity Metric: Cohesion Cohesion is the degree to which the elements of a module belong together High cohesion reduces module complexity High cohesion increases system maintainability High Cohesion increases module reusability

Complexity Metric: Cohesion LCOM4: Lack of Cohesion of Methods LCOM4 = 1 indicates a cohesive class LCOM4 >=2 indicates a potential for low cohesion LCOM4 = 0 indicates a class with no methods Hitz M., Montazeri B.: Measuring Coupling and Cohesion In Object-Oriented Systems. Proc. Int. Symposium on Applied Corporate Computing, Oct , Monterrey, Mexico, 75-76, 197, 78-84

Complexity Metric: Cohesion A B x C D E Y A B x C D E Y LCOM4 = 2 This class consists of 2 unrelated components. You could split it as {A, B, x} and {C, D, E, y} LCOM4 = 1 This class consists of a single component. It is a cohesive class

Complexity Metric: Size WMC: Weighted Method Count WMC is a predictor of how much time and effort is required to develop and maintain the class A large number of methods means greater potential impact of change on derived classes 10% of classes can have more than 24 methods Shyam R. Chidamber, Chris F. Kemerer. A Metrics suite for Object Oriented design. M.I.T. Sloan School of Management E Victor Basili, Lionel Briand and Walcelio Melo. A Validation of Object-Oriented Design Metrics as Quality Indicators. IEEE Transactions on Software Engineering. Vol. 22, No. 10, October 1996

Complexity Metric: Case Study System Analyzed JavaC++Java Classes Lines50,000500,000300,000 CBO LCOM RFC NOC DIT WMC QualityLOWMEDIUMHIGH Laing, Victor & Coleman, Charles: Principal Components of Orthogonal Object-Oriented Metrics. White Paper Analyzing Results of NASA Object- Oriented Data. SATC, NASA,

Complexity Metric: Case Study System Analyzed JavaC++Java Classes Lines50,000500,000300,000 CBO LCOM RFC NOC DIT WMC QualityLOWMEDIUMHIGH Laing, Victor & Coleman, Charles: Principal Components of Orthogonal Object-Oriented Metrics. White Paper Analyzing Results of NASA Object- Oriented Data. SATC, NASA,

Demo: Class Analyzer

How do we use this information?

Complect

SOLID Software Dependency Inversion Principle : Control your coupling Single Responsibility Principle : Control your cohesion Open/Closed Principle : Aid cohesion by closing your classes to the most common kinds of change Interface Segregation Principle : Carrying around unused methods will hurt cohesion and size Liskov Substitution Principle : Code the fulfills its contracts is easier to reason about and test

Composed Software Componentized Software : Move the complexity management up a level of abstraction

Summary Complexity impairs our ability to reason about our code Simplicity improves our ability to understand, change, and test our code Using complexity metrics can help us manage technical debt and improve quality

Simple is not Easy “…we have to keep it crisp, disentangled, and simple if we refuse to be crushed by the complexities of our own making” - Dijkstra

How does this fit with Agile?

Agile Complexity Understanding Software TestingReasoning Trying to understand the software from the outside Trying to understand the software from the inside Scrum, XP Test Driven Design

Is Emergent Design Sustainable? Sprint 1Sprint 2Sprint 3Sprint 4Sprint 5 Simple Complex Problem Solution Simple Complex Sprint Release Plan

Links      ?next_slideshow= ?next_slideshow=1      enough-up-front-design enough-up-front-design

Complex vs Complicated Complex Complicated

Complex vs Complicated “Complexity arises when the dependencies among the elements become important. In such a system, removing one such element destroys behavior to an extent that goes well beyond what is embodied by the particular element that is removed” -John Miller & Scott Page, Complex Adaptive Systems

Complex vs Complicated