SlideShare une entreprise Scribd logo
1  sur  58
Télécharger pour lire hors ligne
Software: Good, Bad, or
Just a Matter of Taste?




                                      Arie van Deursen
       Delft University of Technology, The Netherlands
          SBES 2012, Natal, Brazil, 27 September 2012
                                                  1
Acknowledgements
• Marcio Delamaro &
  CBSoft organizers

• Joint work with
  Eric Bouwers & Joost Visser
  Software Improvement Group

• Co-workers TU Delft Software
  Engineering Research Group
                                 2
Collect detailed technical findings
               about software-intensive systems
www.sig.eu


Translate into actionable information
for high-level management


               Using methods from academic and
               self-funded research


                A. van Deursen and T. Kuipers.
     Source-Based Software Risk Assessments. ICSM, 2003.   3
Focus on Software Architecture
The organizational structure of a software
system including components, connectors,
        constraints, and rationale
                    -- Kogut & Clemens, 1994


 “Architectures allow or preclude nearly all of a
           system’s quality attributes.”
                          -- Clements et al, 2005

                                                    4
Early versus Late Evaluations
• Early: Making design decisions
     – Design space exploration
     – What-if analysis
• Late: Analyzing as-implemented architecture
     – Drift & erosion
     – Actual suitability

           van Deursen, Hofmeister, Koschke, Moonen, Riva:
   Symphony: View-Driven Software Architecture Reconstruction. WICSA 2004

L. Dobrica and E. Niemela. A survey on software architecture analysis methods.
                                                                             5
               IEEE Transactions on Software Engineering 2002.
The Software Risk Assessment Process




ICSM
2009                                6
Lord Kelvin
            Meten = Weten

       Medição = Conhecimento

        To measure = To know

      “when you cannot measure
      it, (…), your knowledge is of
               a meagre and
           unsatisfactory kind”
                                 7
Country Size
 Brazil - NL
               8
Population
Brazil - NL
              9
Gross Domestic
   Product
                 10
GDP Per
 Capita
          11
Brazil – NL
Football Wins
     4-3

                12
IT Labor Force?

                  13
IT Profitability?

                    14
IT Quality??

               15
Software metrics for
project management?

Beware!

E. Bouwers, J. Visser, and
A. van Deursen.
Getting what you Measure
Communications of the ACM,
May 2012


                             16
Pittfall 1:


Metric in a bubble:
No context, no goal




                      17
Pittfall 2:


Metrics galore:
Measuring everything




                       18
Pittfall 3:


One-track metric:
Narrow-minded




                    19
Pittfall 4:


Treating the metric:
Fighting symptoms




                       20
ISO25010 -- The Many Faces of
             Software Quality




                            21
What to
 measure?




Heitlager, Kuipers, Visser. A Practical Model for Measuring Maintainability. QUATIC 2007
        J. Visser. SIG/TÜViT Evaluation Criteria Trusted Product Maintainability:
                        Guidance for producers Version 4.2, 2012                       22
Metric Value: Good or Bad?
• Benchmark of many industrial systems
  – All metrics of interest collected


• Determine thresholds based on
  percentage of systems with given value.
  – E.g.: 90% of systems have McCabe <= 15
  – McCabe > 15 suggests high risk.

             Tiago L. Alves, Christiaan Ypma, Joost Visser.
    Deriving metric thresholds from benchmark data. ICSM 2010.
                                                                 23
2009: Re-assessing
Architectural Properties

Study of 40 risk
assessments

Rethinking
architectural
properties

Outcome: Metrics
refinement wanted
                Eric Bouwers, Joost Visser, Arie van Deursen:
                                                                         24
   Criteria for the evaluation of implemented architectures. ICSM 2009
Information Hiding

 Things that change at the
 same rate belong together

 Things that change quickly
  should be insulated from
 things that change slowly
Kent Beck. Naming From the Outside In.
Facebook Blog Post, September 6, 2012.   25
Encapsulation Metrics?


     Which software architecture metrics can serve
     as indicators for the success of encapsulation of
         an implemented software architecture?



             Eric Bouwers, Arie van Deursen, and Joost Visser.
  Quantifying the Encapsulation of Implemented Software Architectures
Technical Report TUD-SERG-2011-033-a, Delft University of Technology, 2012

                                                                         26
Approach
• Identification of candidate metrics

• Quantitative approach (repository mining):
  – Which metric is the best predictor of good
    encapsulation?

• Qualitative approach:
  – Is the selected metric useful in a late architecture
    evaluation context?

                                                           27
C1                                    C2
                          B
             A                                       Q

                                           P
                      C
         D
                                                         R
                                  E


                                           S


C3                                                           T

                              Z
     X            Y                            U




         Module                            Module dependency
         (size)           Component
                                                                  28
                                           Lifted (comp) dependency
Literature Study: Candidate Metrics




                                      29
C1                                       C2
                         B
             A                                         Q

                                              P
                     C
         D
                                                           R
                                 E


                                              S


C3                                                             T

                             Z
     X           Y                                U




         Commit in version repository results in change set        30
C1                                        C2
                         B
             A                                         Q

                                               P
                     C
         D
                                                           R
                                 E


                                               S


C3                                                             T

                             Z
     X           Y                                 U




                 Change set I: modules { A, C, Z }
                                                                   31
                  Affects components C1 and C3
C1                                        C2
                         B
             A                                          Q

                                               P
                     C
         D
                                                            R
                                 E


                                                S


C3                                                              T

                             Z
     X           Y                                  U




                 Change set II: modules { B, D, E }
                                                        Local change   32
                   Affects components C1 only
C1                                         C2
                          B
             A                                          Q

                                                P
                      C
         D
                                                            R
                                  E


                                                S


C3                                                              T

                              Z
     X            Y                                 U




                 Change set III: modules { Q, R, U }
                                                        Local change   33
                   Affects components C2 only
C1                                        C2
                         B
             A                                             Q

                                               P
                     C
         D
                                                               R
                                 E


                                                S


C3                                                                 T

                             Z
     X           Y                                  U




                 Change set IV: modules { S, T, Z }
                                                        Non-Local change
                                                                       34
                  Affects components C2 and C3
Observation 1:
   Local Change-Set Series are Good

• Combine change sets into series

• The more local changes in a series, the better
  the encapsulation worked out.




                                                   35
Observation 2:
         Metrics may change too

• A change may affect the value of the metrics.

• Cut large set of change sets into sequence of
  stable change-set series.




                                                  36
C1                                        C2
                         B
             A                                         Q

                                               P
                     C
         D
                                                           R
                                 E


                                               S


C3                                                             T

                             Z
     X           Y                                 U




                 Change set I: modules { A, C, Z }
                                                                   37
                  Affects components C1 and C3
C1                                        C2
             A            B
                                                       Q

                                               P
                         C
         D
                                                           R
                              E


                                               S


C3                                                             T


     X             Y              Z                U




                   Change set I: modules { A, C, Z }
                                                                   38
             The Change Set may affect metric outcomes!!
Solution: Stable Period Identification




                                         39
Approach
• Identify 10 long running open source systems
• Determine metrics on monthly snapshots
• Determine stable periods per metric:
    – Metric value
    – Ratio of local change in this period
•   Compute (Spearman) correlations [0, .30, .50, 1]
•   Assess significance (p < 0.01)
•   [ Assess project impact ]
•   Interpret results
                                                       40
Systems Under Study




                      41
Results




          42
Best Indicator for Encapsulation:
     Percentage of Internal Code

Module types:
1. Internal
2. Inbound
3. Outbound
4. Transit



                      Eric Bouwers, Arie van Deursen, Joost Visser.
        Dependency Profiles for Software Architecture Evaluations. ICSM ERA, 2011.
                                                                                     43
Threats to Validity
                         External
Construct validity       • Open source, Java
• Encapsulation ==       • IC behaves same on other
  local change?             technologies
• Commit == coherent?    Internal validity
• Commits too small?     • Stable periods: Length, nr,
• Commits too large?        volume
• Architectural (meta)   • Monthly snapshots
  model appropriate?     Reliability
                         • Open source systems
                         • All data available

                                                     44
Shifting paradigms
• Statistical hypothesis testing:
         Percentage of internal change is
         valid indicator for encapsulation

• But is it of any use?
• Can people work with?
• Shift to pragmatic knowledge paradigm

                                             45
Software Risk Assessments




                            46
Using “Percentage of Internal Change”
       For Evaluation Purposes

Setting
• SIG has included %IC in its revised
  maintainability model
• Used in risk assessments and monitors of
  many industrial systems
• Frequent discussion between clients,
  consultants, suppliers, and analysts.
                                             47
Evaluation Approach
• SIG consultants and analysts report any
  IC-related experience to investigator

• Collect “stories” of actual use in
  (anonymized) memos.
   – 6 months, 50 memos so far


• Analyze using grounded theory
  Michaela Greiler, Arie van Deursen, Margaret-Anne D. Storey: Test confessions: A
         study of testing practices for plug-in systems. ICSE 2012: 244-25           48
Preliminary Findings (1)
[ Still collecting, analyzing, and digesting ]

• Metrics added require componentization /
  architectural view.
  – Documenting it is a useful process
  – Low %IC values trigger discussion

• Important to see metric in full suite
  (avoid “one-track method”)
                                                 49
Preliminary Findings (2)
Different “architectures” exist:
1. In the minds of the developers
2. As-is on the file system
3. As used to compute the metrics

• These should be the same!
• Should [3] capture [1] or [2]?

                                    50
Preliminary Findings (3)
• Is low %IC fixable?
• Requires (substantial) refactoring:
  – Smaller components and interfaces,
  – Fewer dependencies.
• Consultant’s wish list: “what-if analysis”:
  – See effects of changing architecture
• Major refactoring for one of the systems
  monitored planned based on %IC insights
                                                51
Encapsulation Can be Measured!

Module types:
1. Internal
2. Inbound
3. Outbound
4. Transit




         And doing so, leads to meaningful
                   discussions.              52
Software: Good, Bad, or
        Just a Matter of Taste?


Ultimately a Matter of Engineering Tradeoffs

          Yet there is a difference
         between right and wrong


                                          53
Software Metrics Matter

• A key tool for informed decision making

• Benchmarking, monitoring,
  and interpretation are key

• Pitfalls are plentiful,
  in research as in practice
                                            54
(Open Source) Repositories:
         A Research Gold Mine

• Today: Metrics validation.

• GitHub! GitHub! GitHub!

• Relentless identification of threats to validity
  esstential: “Ameaças à validade”!

                                                     55
Paradigm: Pragmatism

• Evaluate based upon the
  possibilities of action

• Calls for rigorous qualitative studies
  capturing reality in rich narratives

• Rich palette of empirical methods needed
                                             56
The Final:
July 13, 2014




                57
The Final:
July 13, 2014


 Brazil vs
Netherlands


                58

Contenu connexe

Similaire à Software: Good, Bad, or Just a Matter of Taste?

20120612 07 - Portail qualimétrie mis en oeuvre chez Schneider Squoring
20120612 07 - Portail qualimétrie mis en oeuvre chez Schneider Squoring20120612 07 - Portail qualimétrie mis en oeuvre chez Schneider Squoring
20120612 07 - Portail qualimétrie mis en oeuvre chez Schneider SquoringLeClubQualiteLogicielle
 
Seminar pasqualina potena
Seminar pasqualina potenaSeminar pasqualina potena
Seminar pasqualina potenafbk-das
 
AI for PM.pptx
AI for PM.pptxAI for PM.pptx
AI for PM.pptxNatan Katz
 
ArchiInspection Project: Integrated Non Destructive Testing, A Building Infor...
ArchiInspection Project: Integrated Non Destructive Testing, A Building Infor...ArchiInspection Project: Integrated Non Destructive Testing, A Building Infor...
ArchiInspection Project: Integrated Non Destructive Testing, A Building Infor...Farid Mokhtar Noriega
 
Architecture Description Languages: An Overview
Architecture Description Languages: An OverviewArchitecture Description Languages: An Overview
Architecture Description Languages: An Overviewelliando dias
 
Hi tech engineering services [airport case study]
Hi tech engineering services [airport case study]Hi tech engineering services [airport case study]
Hi tech engineering services [airport case study]Naresh Dhingra
 
COCOMO methods for software size estimation
COCOMO methods for software size estimationCOCOMO methods for software size estimation
COCOMO methods for software size estimationPramod Parajuli
 

Similaire à Software: Good, Bad, or Just a Matter of Taste? (12)

20120612 07 - Portail qualimétrie mis en oeuvre chez Schneider Squoring
20120612 07 - Portail qualimétrie mis en oeuvre chez Schneider Squoring20120612 07 - Portail qualimétrie mis en oeuvre chez Schneider Squoring
20120612 07 - Portail qualimétrie mis en oeuvre chez Schneider Squoring
 
Seminar pasqualina potena
Seminar pasqualina potenaSeminar pasqualina potena
Seminar pasqualina potena
 
AI for PM.pptx
AI for PM.pptxAI for PM.pptx
AI for PM.pptx
 
ArchiInspection Project: Integrated Non Destructive Testing, A Building Infor...
ArchiInspection Project: Integrated Non Destructive Testing, A Building Infor...ArchiInspection Project: Integrated Non Destructive Testing, A Building Infor...
ArchiInspection Project: Integrated Non Destructive Testing, A Building Infor...
 
Data Intensive Engineering
Data Intensive EngineeringData Intensive Engineering
Data Intensive Engineering
 
What is C3D?
What is C3D?What is C3D?
What is C3D?
 
Staffing level estimation
Staffing level estimation Staffing level estimation
Staffing level estimation
 
Architecture Description Languages: An Overview
Architecture Description Languages: An OverviewArchitecture Description Languages: An Overview
Architecture Description Languages: An Overview
 
Hi tech engineering services [airport case study]
Hi tech engineering services [airport case study]Hi tech engineering services [airport case study]
Hi tech engineering services [airport case study]
 
Innovative BIM Solution For Project Management And Quantity Surveying Mr. Ken...
Innovative BIM Solution For Project Management And Quantity Surveying Mr. Ken...Innovative BIM Solution For Project Management And Quantity Surveying Mr. Ken...
Innovative BIM Solution For Project Management And Quantity Surveying Mr. Ken...
 
COCOMO methods for software size estimation
COCOMO methods for software size estimationCOCOMO methods for software size estimation
COCOMO methods for software size estimation
 
14 software technical_metrics
14 software technical_metrics14 software technical_metrics
14 software technical_metrics
 

Dernier

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Dernier (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Software: Good, Bad, or Just a Matter of Taste?

  • 1. Software: Good, Bad, or Just a Matter of Taste? Arie van Deursen Delft University of Technology, The Netherlands SBES 2012, Natal, Brazil, 27 September 2012 1
  • 2. Acknowledgements • Marcio Delamaro & CBSoft organizers • Joint work with Eric Bouwers & Joost Visser Software Improvement Group • Co-workers TU Delft Software Engineering Research Group 2
  • 3. Collect detailed technical findings about software-intensive systems www.sig.eu Translate into actionable information for high-level management Using methods from academic and self-funded research A. van Deursen and T. Kuipers. Source-Based Software Risk Assessments. ICSM, 2003. 3
  • 4. Focus on Software Architecture The organizational structure of a software system including components, connectors, constraints, and rationale -- Kogut & Clemens, 1994 “Architectures allow or preclude nearly all of a system’s quality attributes.” -- Clements et al, 2005 4
  • 5. Early versus Late Evaluations • Early: Making design decisions – Design space exploration – What-if analysis • Late: Analyzing as-implemented architecture – Drift & erosion – Actual suitability van Deursen, Hofmeister, Koschke, Moonen, Riva: Symphony: View-Driven Software Architecture Reconstruction. WICSA 2004 L. Dobrica and E. Niemela. A survey on software architecture analysis methods. 5 IEEE Transactions on Software Engineering 2002.
  • 6. The Software Risk Assessment Process ICSM 2009 6
  • 7. Lord Kelvin Meten = Weten Medição = Conhecimento To measure = To know “when you cannot measure it, (…), your knowledge is of a meagre and unsatisfactory kind” 7
  • 10. Gross Domestic Product 10
  • 12. Brazil – NL Football Wins 4-3 12
  • 16. Software metrics for project management? Beware! E. Bouwers, J. Visser, and A. van Deursen. Getting what you Measure Communications of the ACM, May 2012 16
  • 17. Pittfall 1: Metric in a bubble: No context, no goal 17
  • 20. Pittfall 4: Treating the metric: Fighting symptoms 20
  • 21. ISO25010 -- The Many Faces of Software Quality 21
  • 22. What to measure? Heitlager, Kuipers, Visser. A Practical Model for Measuring Maintainability. QUATIC 2007 J. Visser. SIG/TÜViT Evaluation Criteria Trusted Product Maintainability: Guidance for producers Version 4.2, 2012 22
  • 23. Metric Value: Good or Bad? • Benchmark of many industrial systems – All metrics of interest collected • Determine thresholds based on percentage of systems with given value. – E.g.: 90% of systems have McCabe <= 15 – McCabe > 15 suggests high risk. Tiago L. Alves, Christiaan Ypma, Joost Visser. Deriving metric thresholds from benchmark data. ICSM 2010. 23
  • 24. 2009: Re-assessing Architectural Properties Study of 40 risk assessments Rethinking architectural properties Outcome: Metrics refinement wanted Eric Bouwers, Joost Visser, Arie van Deursen: 24 Criteria for the evaluation of implemented architectures. ICSM 2009
  • 25. Information Hiding Things that change at the same rate belong together Things that change quickly should be insulated from things that change slowly Kent Beck. Naming From the Outside In. Facebook Blog Post, September 6, 2012. 25
  • 26. Encapsulation Metrics? Which software architecture metrics can serve as indicators for the success of encapsulation of an implemented software architecture? Eric Bouwers, Arie van Deursen, and Joost Visser. Quantifying the Encapsulation of Implemented Software Architectures Technical Report TUD-SERG-2011-033-a, Delft University of Technology, 2012 26
  • 27. Approach • Identification of candidate metrics • Quantitative approach (repository mining): – Which metric is the best predictor of good encapsulation? • Qualitative approach: – Is the selected metric useful in a late architecture evaluation context? 27
  • 28. C1 C2 B A Q P C D R E S C3 T Z X Y U Module Module dependency (size) Component 28 Lifted (comp) dependency
  • 30. C1 C2 B A Q P C D R E S C3 T Z X Y U Commit in version repository results in change set 30
  • 31. C1 C2 B A Q P C D R E S C3 T Z X Y U Change set I: modules { A, C, Z } 31 Affects components C1 and C3
  • 32. C1 C2 B A Q P C D R E S C3 T Z X Y U Change set II: modules { B, D, E } Local change 32 Affects components C1 only
  • 33. C1 C2 B A Q P C D R E S C3 T Z X Y U Change set III: modules { Q, R, U } Local change 33 Affects components C2 only
  • 34. C1 C2 B A Q P C D R E S C3 T Z X Y U Change set IV: modules { S, T, Z } Non-Local change 34 Affects components C2 and C3
  • 35. Observation 1: Local Change-Set Series are Good • Combine change sets into series • The more local changes in a series, the better the encapsulation worked out. 35
  • 36. Observation 2: Metrics may change too • A change may affect the value of the metrics. • Cut large set of change sets into sequence of stable change-set series. 36
  • 37. C1 C2 B A Q P C D R E S C3 T Z X Y U Change set I: modules { A, C, Z } 37 Affects components C1 and C3
  • 38. C1 C2 A B Q P C D R E S C3 T X Y Z U Change set I: modules { A, C, Z } 38 The Change Set may affect metric outcomes!!
  • 39. Solution: Stable Period Identification 39
  • 40. Approach • Identify 10 long running open source systems • Determine metrics on monthly snapshots • Determine stable periods per metric: – Metric value – Ratio of local change in this period • Compute (Spearman) correlations [0, .30, .50, 1] • Assess significance (p < 0.01) • [ Assess project impact ] • Interpret results 40
  • 42. Results 42
  • 43. Best Indicator for Encapsulation: Percentage of Internal Code Module types: 1. Internal 2. Inbound 3. Outbound 4. Transit Eric Bouwers, Arie van Deursen, Joost Visser. Dependency Profiles for Software Architecture Evaluations. ICSM ERA, 2011. 43
  • 44. Threats to Validity External Construct validity • Open source, Java • Encapsulation == • IC behaves same on other local change? technologies • Commit == coherent? Internal validity • Commits too small? • Stable periods: Length, nr, • Commits too large? volume • Architectural (meta) • Monthly snapshots model appropriate? Reliability • Open source systems • All data available 44
  • 45. Shifting paradigms • Statistical hypothesis testing: Percentage of internal change is valid indicator for encapsulation • But is it of any use? • Can people work with? • Shift to pragmatic knowledge paradigm 45
  • 47. Using “Percentage of Internal Change” For Evaluation Purposes Setting • SIG has included %IC in its revised maintainability model • Used in risk assessments and monitors of many industrial systems • Frequent discussion between clients, consultants, suppliers, and analysts. 47
  • 48. Evaluation Approach • SIG consultants and analysts report any IC-related experience to investigator • Collect “stories” of actual use in (anonymized) memos. – 6 months, 50 memos so far • Analyze using grounded theory Michaela Greiler, Arie van Deursen, Margaret-Anne D. Storey: Test confessions: A study of testing practices for plug-in systems. ICSE 2012: 244-25 48
  • 49. Preliminary Findings (1) [ Still collecting, analyzing, and digesting ] • Metrics added require componentization / architectural view. – Documenting it is a useful process – Low %IC values trigger discussion • Important to see metric in full suite (avoid “one-track method”) 49
  • 50. Preliminary Findings (2) Different “architectures” exist: 1. In the minds of the developers 2. As-is on the file system 3. As used to compute the metrics • These should be the same! • Should [3] capture [1] or [2]? 50
  • 51. Preliminary Findings (3) • Is low %IC fixable? • Requires (substantial) refactoring: – Smaller components and interfaces, – Fewer dependencies. • Consultant’s wish list: “what-if analysis”: – See effects of changing architecture • Major refactoring for one of the systems monitored planned based on %IC insights 51
  • 52. Encapsulation Can be Measured! Module types: 1. Internal 2. Inbound 3. Outbound 4. Transit And doing so, leads to meaningful discussions. 52
  • 53. Software: Good, Bad, or Just a Matter of Taste? Ultimately a Matter of Engineering Tradeoffs Yet there is a difference between right and wrong 53
  • 54. Software Metrics Matter • A key tool for informed decision making • Benchmarking, monitoring, and interpretation are key • Pitfalls are plentiful, in research as in practice 54
  • 55. (Open Source) Repositories: A Research Gold Mine • Today: Metrics validation. • GitHub! GitHub! GitHub! • Relentless identification of threats to validity esstential: “Ameaças à validade”! 55
  • 56. Paradigm: Pragmatism • Evaluate based upon the possibilities of action • Calls for rigorous qualitative studies capturing reality in rich narratives • Rich palette of empirical methods needed 56
  • 58. The Final: July 13, 2014 Brazil vs Netherlands 58