SlideShare uma empresa Scribd logo
1 de 34
successful projects
  doen‘t happen
    You have to make them
success rate and
              project duration
            80%


            60%


            40%
GULP poll




            20%
                                                  successful
            0%                                    changed
                  1-3   3-6   6-12   >12 months   stopped
why do they fail
•   deficit of soft-skills

•   dogmatism

•   no universal IT-architecture

•   no clearly defined interfaces

•   lack of clearness & precision

•   lack of manageability
working in projects


                 New Development
    Support           30 %
     40 %




              Maintenance
                 30 %
working in projects
 under-                                    normal
estimated                                   work

                         New Development
            Support           30 %
             40 %




                      Maintenance
                         30 %
these:

     increasing project
          runtime
these:

     increasing project
          runtime


more complex         eroding
architecture     architecture
eroding architecture
• is normal
• quality of architecture is not easy to
  measure
• typical signs:
    • many dependancies
    • cyclic dependancies
reasons

• distributed system knowledge
• size generates complexity
• outgrowing dependancies and complexity
• time pressure and money is a good reason
  to loose structure
• no one pays attention
what next?

• cycle check with JDepend / SonarJ
• code reviews
• CheckStyle and FindBugs
• using metrics
• generate abstraction with own frameworks
what to do?
•   definition of architecture

•   use of relevant metrics

•   pattern and rules to keep the system simple

•   early violation recognition

•   regular reviews

•   agile development
abstract architecture
User Interface

Business Logic

  Data Access


                 1. layer
abstract architecture
User Interface




                                 Customer
                     Contracts




                                                   Common
                                            User
Business Logic

  Data Access


                 1. layer
                 2. functional slice
abstract architecture
User Interface




                                 Customer
                     Contracts




                                                   Common
                                            User
Business Logic

  Data Access


                 1. layer
                 2. functional slice
                 3. allowed interactions
abstract architecture
User Interface




                                 Customer
                     Contracts




                                                   Common
                                                            subsystem




                                            User
Business Logic

  Data Access


                 1. layer
                 2. functional slice
                 3. allowed interactions
layer, slices and subsystems
•   a subsystem belongs to one layer

•   a subsystem may belong to a functional slice (not
    required)

•   classification by naming conventions

•   not all layer need functional slices

•   subsystems can be private
assignment of elements

•   physical
    •  type
    •  build unit
    •  package
•   logical
    •  subsystem is a set of packages with naming conventions
        for packages and interfaces
    •   layer is a set of subsystems
    •   functional slices with naming conventions
reduce dependancies
•   Dependency Inversion Principle (Robert C. Martin)
    • use interfaces / traits
reduce dependancies
  •      Dependency Inversion Principle (Robert C. Martin)
         • use interfaces / traits



                  Main



    Mid 1                 Mid 2



Detail       Detail   Detail   Detail
reduce dependancies
  •      Dependency Inversion Principle (Robert C. Martin)
         • use interfaces / traits



                                                       High Level
                  Main                                   Policy




    Mid 1                 Mid 2           Interface    Interface    Interface




                                           Detailed     Detailed     Detailed
Detail       Detail   Detail   Detail     Implement.   Implement.   Implement.
metrics
Average Component
Dependency (ACD metric)
Average Component
         Dependency (ACD metric)

         6




     3       3




 1       1       1

ACD=15/6=2.5
Average Component
         Dependency (ACD metric)

         6                    3




     3       3            1       1




 1       1       1    2       3        2

ACD=15/6=2.5         ACD=12/6=2
                     Dependancy Inversion
Average Component
         Dependency (ACD metric)

         6                    3                      6

                                                         cycles

     3       3            1       1              6       6




 1       1       1    2       3        2     1       6        1

ACD=15/6=2.5         ACD=12/6=2             ACD=26/6=4.33
                     Dependancy Inversion
stability vs. instability
                (Robert C. Martin)
                            This metric has the range [0,1].
                            I=0 indicates a maximally stable category
                  Ca        I=1 indicates a maximally instable category
Instability I =
                (Ce+Ca)
                            Ce = Efferent Couplings (incoming)
                            Ca = Afferent Couplings (outgoing)
stability vs. instability
                (Robert C. Martin)
                               This metric has the range [0,1].
                               I=0 indicates a maximally stable category
                  Ca           I=1 indicates a maximally instable category
Instability I =
                (Ce+Ca)
                               Ce = Efferent Couplings (incoming)
                               Ca = Afferent Couplings (outgoing)


     Y is instable
         Y     3 / (0+3) = 1
stability vs. instability
                (Robert C. Martin)
                                 This metric has the range [0,1].
                                 I=0 indicates a maximally stable category
                  Ca             I=1 indicates a maximally instable category
Instability I =
                (Ce+Ca)
                                 Ce = Efferent Couplings (incoming)
                                 Ca = Afferent Couplings (outgoing)


     Y is instable                         X is stable
         Y     3 / (0+3) = 1




                               0 / (3+0) = 0     X
stability vs. instability
                  (Robert C. Martin)
                                   This metric has the range [0,1].
                                   I=0 indicates a maximally stable category
                  Ca               I=1 indicates a maximally instable category
Instability I =
                (Ce+Ca)
                                   Ce = Efferent Couplings (incoming)
                                   Ca = Afferent Couplings (outgoing)


     Y is instable                           X is stable
         Y       3 / (0+3) = 1




                                 0 / (3+0) = 0     X

             lower elements need to be more stable
abstractness
           (Robert C. Martin)
                                     na
 abstractness A =
                                     nc

na = number of abstract classes in category
nc = total number of classes in category


                            This metric has the range [0,1].
                            0 means concrete and 1 means completely abstract
abstractness vs. instability
                        (Robert C. Martin)

  1
               Th
                e
Abstraction



                 M
                  ain
                      Se
                        qu
                          en
                             c e




      0          Instability       1
abstractness vs. instability
                                (Robert C. Martin)

  1

                                   Th o ss
                                    Zo l es
                                     U


                                      e f
                                       se
                                       ne sne
                   Th
                     e
Abstraction



                         M
                          ain
                              Se
                                qu
                                  en
                                     c e
              Th
              e Pain
               Zo
                 ne
                    of




      0                  Instability        1
distance
              (Robert C. Martin)
                                   1




                                                                         Th o ss
                                                                          Zo les
                                                                           U


                                                                            e f
                                                                             se
                                                                             ne sne
  D = A + I – 1




                                                      Th
                                                           e
                                  Abstraction




                                                           M
                                                            ain

                                                                     D
  range [-1 .. +1]




                                                                Se
                                                                  qu
                                                                    en
                                                                         ce
                                                Th
                                                e Pain
                                                 Zo
                                                   ne
                                                      of
                                        0                  Instability
                                                                                  1
„Any category that has a D value that is not
near zero can be reexamined and restructured“
design rules
•   create a logical architecture based on layer, functional
    slices and subsystems as an incremental process
•   no cycles beginning at package level
•   use metrics (e.g. as part of the build process)
    •   rACD less less than 15% (for smaller systems and less
        than 4% for bigger systems)
    •   compile units should have less than 1000 LOC
    •   limit for CCN
•   implement frequent architecture reviews

Mais conteúdo relacionado

Semelhante a Software metrics

Fuzzy Logic based watermarking using non – blind HVS technique
Fuzzy Logic based watermarking using non – blind HVS techniqueFuzzy Logic based watermarking using non – blind HVS technique
Fuzzy Logic based watermarking using non – blind HVS techniqueIRJET Journal
 
Java Unit Test and Coverage Introduction
Java Unit Test and Coverage IntroductionJava Unit Test and Coverage Introduction
Java Unit Test and Coverage IntroductionAlex Su
 
Esoteric LINQ and Structural Madness
Esoteric LINQ and Structural MadnessEsoteric LINQ and Structural Madness
Esoteric LINQ and Structural MadnessChris Eargle
 
Ontonix: Engineering - Healthcare applications
Ontonix: Engineering - Healthcare applicationsOntonix: Engineering - Healthcare applications
Ontonix: Engineering - Healthcare applicationsDavid Wilson
 
FEA good practices presentation
FEA good practices presentationFEA good practices presentation
FEA good practices presentationMahdi Damghani
 
feagoodpracticepresentation-191125101221.pdf
feagoodpracticepresentation-191125101221.pdffeagoodpracticepresentation-191125101221.pdf
feagoodpracticepresentation-191125101221.pdfJethallalGada
 
Huong dan cu the svm
Huong dan cu the svmHuong dan cu the svm
Huong dan cu the svmtaikhoan262
 
Lightning talk: highly scalable databases and the PACELC theorem
Lightning talk: highly scalable databases and the PACELC theoremLightning talk: highly scalable databases and the PACELC theorem
Lightning talk: highly scalable databases and the PACELC theoremVishal Bardoloi
 
CSUN 2018 Analyzing and Extending WCAG Beyond 3 Digits
CSUN 2018 Analyzing and Extending WCAG Beyond 3 DigitsCSUN 2018 Analyzing and Extending WCAG Beyond 3 Digits
CSUN 2018 Analyzing and Extending WCAG Beyond 3 DigitsBill Tyler
 
European critical infrastructures: which analysis framework for supporting ef...
European critical infrastructures: which analysis framework for supporting ef...European critical infrastructures: which analysis framework for supporting ef...
European critical infrastructures: which analysis framework for supporting ef...Global Risk Forum GRFDavos
 
Microservices and Azure App Services
Microservices and Azure App ServicesMicroservices and Azure App Services
Microservices and Azure App ServicesDamir Dobric
 
Fundamentals of reliability engineering and applications part3of3
Fundamentals of reliability engineering and applications part3of3Fundamentals of reliability engineering and applications part3of3
Fundamentals of reliability engineering and applications part3of3ASQ Reliability Division
 
Acm Tech Talk - Decomposition Paradigms for Large Scale Systems
Acm Tech Talk - Decomposition Paradigms for Large Scale SystemsAcm Tech Talk - Decomposition Paradigms for Large Scale Systems
Acm Tech Talk - Decomposition Paradigms for Large Scale SystemsVinayak Hegde
 
Financial Networks III. Centrality and Systemic Importance
Financial Networks III. Centrality and Systemic ImportanceFinancial Networks III. Centrality and Systemic Importance
Financial Networks III. Centrality and Systemic ImportanceKimmo Soramaki
 
Graph Analysis Beyond Linear Algebra
Graph Analysis Beyond Linear AlgebraGraph Analysis Beyond Linear Algebra
Graph Analysis Beyond Linear AlgebraJason Riedy
 
Partition Configuration RTNS 2013 Presentation
Partition Configuration RTNS 2013 PresentationPartition Configuration RTNS 2013 Presentation
Partition Configuration RTNS 2013 PresentationJoseph Porter
 

Semelhante a Software metrics (20)

Fuzzy Logic based watermarking using non – blind HVS technique
Fuzzy Logic based watermarking using non – blind HVS techniqueFuzzy Logic based watermarking using non – blind HVS technique
Fuzzy Logic based watermarking using non – blind HVS technique
 
Java Unit Test and Coverage Introduction
Java Unit Test and Coverage IntroductionJava Unit Test and Coverage Introduction
Java Unit Test and Coverage Introduction
 
Esoteric LINQ and Structural Madness
Esoteric LINQ and Structural MadnessEsoteric LINQ and Structural Madness
Esoteric LINQ and Structural Madness
 
Ontonix: Engineering - Healthcare applications
Ontonix: Engineering - Healthcare applicationsOntonix: Engineering - Healthcare applications
Ontonix: Engineering - Healthcare applications
 
FEA good practices presentation
FEA good practices presentationFEA good practices presentation
FEA good practices presentation
 
Representing and querying norm states using temporal ontology-based data access
Representing and querying norm states using temporal ontology-based data accessRepresenting and querying norm states using temporal ontology-based data access
Representing and querying norm states using temporal ontology-based data access
 
feagoodpracticepresentation-191125101221.pdf
feagoodpracticepresentation-191125101221.pdffeagoodpracticepresentation-191125101221.pdf
feagoodpracticepresentation-191125101221.pdf
 
Guide
GuideGuide
Guide
 
Huong dan cu the svm
Huong dan cu the svmHuong dan cu the svm
Huong dan cu the svm
 
Lightning talk: highly scalable databases and the PACELC theorem
Lightning talk: highly scalable databases and the PACELC theoremLightning talk: highly scalable databases and the PACELC theorem
Lightning talk: highly scalable databases and the PACELC theorem
 
CSUN 2018 Analyzing and Extending WCAG Beyond 3 Digits
CSUN 2018 Analyzing and Extending WCAG Beyond 3 DigitsCSUN 2018 Analyzing and Extending WCAG Beyond 3 Digits
CSUN 2018 Analyzing and Extending WCAG Beyond 3 Digits
 
European critical infrastructures: which analysis framework for supporting ef...
European critical infrastructures: which analysis framework for supporting ef...European critical infrastructures: which analysis framework for supporting ef...
European critical infrastructures: which analysis framework for supporting ef...
 
Microservices and Azure App Services
Microservices and Azure App ServicesMicroservices and Azure App Services
Microservices and Azure App Services
 
Fundamentals of reliability engineering and applications part3of3
Fundamentals of reliability engineering and applications part3of3Fundamentals of reliability engineering and applications part3of3
Fundamentals of reliability engineering and applications part3of3
 
Acm Tech Talk - Decomposition Paradigms for Large Scale Systems
Acm Tech Talk - Decomposition Paradigms for Large Scale SystemsAcm Tech Talk - Decomposition Paradigms for Large Scale Systems
Acm Tech Talk - Decomposition Paradigms for Large Scale Systems
 
Financial Networks III. Centrality and Systemic Importance
Financial Networks III. Centrality and Systemic ImportanceFinancial Networks III. Centrality and Systemic Importance
Financial Networks III. Centrality and Systemic Importance
 
Graph Analysis Beyond Linear Algebra
Graph Analysis Beyond Linear AlgebraGraph Analysis Beyond Linear Algebra
Graph Analysis Beyond Linear Algebra
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
Partition Configuration RTNS 2013 Presentation
Partition Configuration RTNS 2013 PresentationPartition Configuration RTNS 2013 Presentation
Partition Configuration RTNS 2013 Presentation
 
CSMR06a.ppt
CSMR06a.pptCSMR06a.ppt
CSMR06a.ppt
 

Software metrics

  • 1. successful projects doen‘t happen You have to make them
  • 2. success rate and project duration 80% 60% 40% GULP poll 20% successful 0% changed 1-3 3-6 6-12 >12 months stopped
  • 3. why do they fail • deficit of soft-skills • dogmatism • no universal IT-architecture • no clearly defined interfaces • lack of clearness & precision • lack of manageability
  • 4. working in projects New Development Support 30 % 40 % Maintenance 30 %
  • 5. working in projects under- normal estimated work New Development Support 30 % 40 % Maintenance 30 %
  • 6. these: increasing project runtime
  • 7. these: increasing project runtime more complex eroding architecture architecture
  • 8. eroding architecture • is normal • quality of architecture is not easy to measure • typical signs: • many dependancies • cyclic dependancies
  • 9. reasons • distributed system knowledge • size generates complexity • outgrowing dependancies and complexity • time pressure and money is a good reason to loose structure • no one pays attention
  • 10. what next? • cycle check with JDepend / SonarJ • code reviews • CheckStyle and FindBugs • using metrics • generate abstraction with own frameworks
  • 11. what to do? • definition of architecture • use of relevant metrics • pattern and rules to keep the system simple • early violation recognition • regular reviews • agile development
  • 12. abstract architecture User Interface Business Logic Data Access 1. layer
  • 13. abstract architecture User Interface Customer Contracts Common User Business Logic Data Access 1. layer 2. functional slice
  • 14. abstract architecture User Interface Customer Contracts Common User Business Logic Data Access 1. layer 2. functional slice 3. allowed interactions
  • 15. abstract architecture User Interface Customer Contracts Common subsystem User Business Logic Data Access 1. layer 2. functional slice 3. allowed interactions
  • 16. layer, slices and subsystems • a subsystem belongs to one layer • a subsystem may belong to a functional slice (not required) • classification by naming conventions • not all layer need functional slices • subsystems can be private
  • 17. assignment of elements • physical • type • build unit • package • logical • subsystem is a set of packages with naming conventions for packages and interfaces • layer is a set of subsystems • functional slices with naming conventions
  • 18. reduce dependancies • Dependency Inversion Principle (Robert C. Martin) • use interfaces / traits
  • 19. reduce dependancies • Dependency Inversion Principle (Robert C. Martin) • use interfaces / traits Main Mid 1 Mid 2 Detail Detail Detail Detail
  • 20. reduce dependancies • Dependency Inversion Principle (Robert C. Martin) • use interfaces / traits High Level Main Policy Mid 1 Mid 2 Interface Interface Interface Detailed Detailed Detailed Detail Detail Detail Detail Implement. Implement. Implement.
  • 23. Average Component Dependency (ACD metric) 6 3 3 1 1 1 ACD=15/6=2.5
  • 24. Average Component Dependency (ACD metric) 6 3 3 3 1 1 1 1 1 2 3 2 ACD=15/6=2.5 ACD=12/6=2 Dependancy Inversion
  • 25. Average Component Dependency (ACD metric) 6 3 6 cycles 3 3 1 1 6 6 1 1 1 2 3 2 1 6 1 ACD=15/6=2.5 ACD=12/6=2 ACD=26/6=4.33 Dependancy Inversion
  • 26. stability vs. instability (Robert C. Martin) This metric has the range [0,1]. I=0 indicates a maximally stable category Ca I=1 indicates a maximally instable category Instability I = (Ce+Ca) Ce = Efferent Couplings (incoming) Ca = Afferent Couplings (outgoing)
  • 27. stability vs. instability (Robert C. Martin) This metric has the range [0,1]. I=0 indicates a maximally stable category Ca I=1 indicates a maximally instable category Instability I = (Ce+Ca) Ce = Efferent Couplings (incoming) Ca = Afferent Couplings (outgoing) Y is instable Y 3 / (0+3) = 1
  • 28. stability vs. instability (Robert C. Martin) This metric has the range [0,1]. I=0 indicates a maximally stable category Ca I=1 indicates a maximally instable category Instability I = (Ce+Ca) Ce = Efferent Couplings (incoming) Ca = Afferent Couplings (outgoing) Y is instable X is stable Y 3 / (0+3) = 1 0 / (3+0) = 0 X
  • 29. stability vs. instability (Robert C. Martin) This metric has the range [0,1]. I=0 indicates a maximally stable category Ca I=1 indicates a maximally instable category Instability I = (Ce+Ca) Ce = Efferent Couplings (incoming) Ca = Afferent Couplings (outgoing) Y is instable X is stable Y 3 / (0+3) = 1 0 / (3+0) = 0 X lower elements need to be more stable
  • 30. abstractness (Robert C. Martin) na abstractness A = nc na = number of abstract classes in category nc = total number of classes in category This metric has the range [0,1]. 0 means concrete and 1 means completely abstract
  • 31. abstractness vs. instability (Robert C. Martin) 1 Th e Abstraction M ain Se qu en c e 0 Instability 1
  • 32. abstractness vs. instability (Robert C. Martin) 1 Th o ss Zo l es U e f se ne sne Th e Abstraction M ain Se qu en c e Th e Pain Zo ne of 0 Instability 1
  • 33. distance (Robert C. Martin) 1 Th o ss Zo les U e f se ne sne D = A + I – 1 Th e Abstraction M ain D range [-1 .. +1] Se qu en ce Th e Pain Zo ne of 0 Instability 1 „Any category that has a D value that is not near zero can be reexamined and restructured“
  • 34. design rules • create a logical architecture based on layer, functional slices and subsystems as an incremental process • no cycles beginning at package level • use metrics (e.g. as part of the build process) • rACD less less than 15% (for smaller systems and less than 4% for bigger systems) • compile units should have less than 1000 LOC • limit for CCN • implement frequent architecture reviews

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n