SlideShare a Scribd company logo
1 of 41
Download to read offline
How to improve
the quality of your application
(I wish I’d known this earlier!)
Monday 16th September 2019
Oracle Code One, San Francisco / USA
Ioannis Kolaxis – Coding Architect / Senior Expert
1
@IoannisKolaxis
Our application: CMP
• Automates the configuration & provisioning of our products,
achieving significant time savings for our service.
2
@IoannisKolaxis
Are you working for a software
product, where …?
• Customers keep complaining
about bugs
• New features take too much
time to be implemented
Software quality issues
3
@IoannisKolaxis
• Can you improve the quality of your software?
• How?
What can you do?
4
@IoannisKolaxis
Customer tickets ✔
• We usually measure quality via customer tickets:
CMP Customer tickets
5
@IoannisKolaxis
Code coverage ✔
• When we refer to quality, we usually think of code
coverage!
Increased coverage:
• from 67% (Feb 2017)
• to 72% (Jun 2018)
6
@IoannisKolaxis
Should you pay off your debt?
Decreased debt:
• from 1.359 days (Feb 2017)
• to 392 days (Jun 2018)
7
@IoannisKolaxis
Do not touch old code!
You will probably introduce new defects!
Old code is more reliable
“If a module is, on the average, a year older than an otherwise
similar module, the older module will have roughly a third fewer
faults.”
T. L. Graves, A. F. Karr, J. S. Marron and H. Siy, "Predicting fault incidence using software change history" in IEEE Transactions on
Software Engineering, vol. 26, no. 7, pp. 653-661, Jul 2000.
8
@IoannisKolaxis
Stop creating new debt
• Install SonarLint
plugin in your IDE.
• It helps you
detect, and fix
quality issues as
you write code.
• Download at:
www.sonarlint.org
9
@IoannisKolaxis
Stop creating new debt
• Setup Quality Gates in SonarQube
10
@IoannisKolaxis
• As a developer, where do you spend most of your time?
A. Reading existing code,
B. Writing new code,
C. Waiting for a full build to complete,
D.Other
Quiz
11
@IoannisKolaxis
• As a developer, where do you spend most of your time?
A. Reading existing code,
B. Writing new code,
C. Waiting for a full build to complete,
D.Other
Quiz
12
@IoannisKolaxis
Which parts of your code
do you read most often?
Just think …
13
@IoannisKolaxis
• Use git to find out where you spend most of your
development efforts:
git log --format=format: --name-only | egrep -v '^$' | sort | uniq -c | sort -r >
files_change_frequency.txt
258 usermanagementportlet/…/UserManagement_de.properties
250 usermanagementportlet/…/UserManagement_en.properties
227 usermanagement/…/RetrieveUserTmpltForUsersDataControlImpl.java
205 usermanagement/…/UserManagementImpl.java
154 usermanagement/…/EditUserResourceTemplateRulesBean.java
135 usermanagementportlet/…/AddEditUserBean.java
109 usermanagementportlet/…/ConfigureNewUserResourceBean.java
103 usermanagementportlet/…/addEditUser.jsp
Data never lies
Commits
per file
14
@IoannisKolaxis
The pattern
From a total of 10.007 files:
• 11 files → more than 100 commits
• 91 files → 31 < commits < 100
• 455 files → 10 < commits < 30
• 9.450 files → less than 10 commits
• Only a few files change frequently!
• This is where you spend
most of your time!
15
@IoannisKolaxis
A well-aimed refactoring will
help you:
• Spend less time to read code
& extend functionality.
• Become more productive!
Refactor frequently-changing files
16
@IoannisKolaxis
• “Churn measures based on counts of lines added, deleted, and
modified are very effective for fault prediction.”
R. M. Bell, T. J. Ostrand, and E.J. Weyuker, “Does Measuring Code Change Improve Fault Prediction?“, ACM Press, 2011.
• Files involved in a lot of bug fixing activities are most likely to be
defective
R. Moser, W. Pedrycz, and G. Succi, “A Comparative Analysis of the Efficiency of Change Metrics and Static Code Attributes for
Defect Prediction“, Proceedings of the 30th International Conference on Software Engineering, 181-190, 2008.
Changing files predict system failures
17
@IoannisKolaxis
• Do not waste your time testing mature
functionality (=components that do not
change).
• Focus all your testing efforts on the
frequently-changing parts; those are
most likely to fail!
Focus your Quality Assurance efforts
Unit
Tests
Integration
Tests
E2E
Tests
18
@IoannisKolaxis
What is the coverage of
your new/changing code?
Ask the right questions
19
@IoannisKolaxis
• Files not changed in the past years → stable
components → mature features
• Is every mature feature still used by your customers?
• If a feature is not used, then delete its code!
• Else, extract stable features in separate libraries.
Identify stable components
20
@IoannisKolaxis
• Save time from your builds.
• Achieve faster onboarding of
new developers, by:
Go faster with deleted/extracted code
• Focusing only on actively developed code.
• Not having to familiarize with old/stable code.
21
@IoannisKolaxis
• Gain more insight, by measuring code
complexity for each one of the
frequently changing files.
• Language-neutral metrics for code
complexity:
• Number of lines
• Number of tabs
Measure code complexity
22
@IoannisKolaxis
• How many times did you provide a
bug fix, by adding a nested
conditional in your code?
if (…) {
for (…) {
if (customerSpecificSetup) {
// Do some magic, so that the
// application works for this customer!
}
}
}
Tabs increase complexity
tabs
23
@IoannisKolaxis
Rising complexity calls for refactoring
227
commits
24
@IoannisKolaxis
Our #1 priority for refactoring
205
commits
25
@IoannisKolaxis
Our #1 priority for refactoring
6.767 → 8.396 lines
22.421→ 29.310 tabs
Sept 2014
205
commits
26
@IoannisKolaxis
• Released on 8th November 2006.
• > 50 million lines of code.
• ~ 2.000 developers.
Do you remember Windows Vista?
27
@IoannisKolaxis
• Microsoft measured several organizational metrics, and studied their
correlation with the defects of Windows Vista.
Organizational structure vs Quality
Organizational metric Assertion
Number of Engineers The more people who touch the code, the lower the quality.
Number of Ex-Engineers A large loss of team members affects the knowledge retention, and thus
quality.
Organization Intersection
Factor
The more diffused the different organizations contributing code, the lower is
the quality.
N. Nagappan, B. Murphy, and V.R. Basili, “The Influence of Organizational Structure on Software Quality: An Empirical Case
Study“, ACM, 2008.
• Can the structure of your organization affect the quality of your
software application?
28
@IoannisKolaxis
• Organizational metrics are better
predictors of failure-proneness than
the traditional metrics used so far,
such as code coverage, code
complexity, etc.
Organizational structure impacts Quality
Model Precision
Organizational
structure
86,2%
Code coverage 83,8%
Code complexity 79,3%
Code churn 78,6%
Dependencies 74,4%
Pre-release bugs 73,8%
N. Nagappan, B. Murphy, and V.R. Basili, “The Influence of Organizational Structure on Software Quality: An Empirical Case
Study“, ACM, 2008.
29
@IoannisKolaxis
• In another research, focused on Windows 7, Microsoft
distinguished between the following kinds of developers,
depending on their commits for a given component:
• Owner: has the most commits to that component.
• Major contributor: has more than 5% of total commits.
• Minor contributor: has less than 5% of total commits.
More organizational metrics
C.Bird, N. Nagappan, B. Murphy, H. Gall, and P. Devanbu, “Don’t Touch My Code! Examining the Effects of Code Ownership on
Software Quality“, ACM, 2011.
30
@IoannisKolaxis
• The researchers concluded that:
• “The number of minor contributors has a strong positive
relationship with both pre- and post-release failures …”
• “Higher levels of ownership for the top contributor to a
component results in fewer failures when controlling for the
same metrics, but the effect is smaller than the number of
minor contributors”
Effects of minor contributors
C.Bird, N. Nagappan, B. Murphy, H. Gall, and P. Devanbu, “Don’t Touch My Code! Examining the Effects of Code Ownership on
Software Quality“, ACM, 2011.
31
@IoannisKolaxis
• In one of our software components, we
had a total of 427 commits:
Gain insight into your components
Commits per developer
Metric Value
Minor
contributors
15
Major
contributors
6
Total
contributors
21
Ownership 20,37%
• The top contributing
developer made 87
commits:
87/427 = 20,37% ownership
32
@IoannisKolaxis
• In another software component, we had
a total of 253 commits for the same
period:
Gain insight into your components
Commits per developer
Metric Value
Minor
contributors
3
Major
contributors
6
Total
contributors
9
Ownership 28,85%
• The top contributing
developer made 73
commits:
73/253 = 28,85% ownership
33
@IoannisKolaxis
• Which component will probably
have more defects?
• Where would you focus your
testing efforts?
Know where you are standing …
Metric Component
A
Component
B
Minor
contributors
15 3
Major
contributors
6 6
Total
contributors
21 9
Ownership 20,37% 28,85%
34
@IoannisKolaxis
• More minor contributors
→ More defects
• Bigger ownership
→ Less defects
Beware of minor contributors!
Metric Component
A
Component
B
Minor
contributors
15 3
Major
contributors
6 6
Total
contributors
21 9
Ownership 20,37% 28,85%
35
@IoannisKolaxis
• Minor contributors must be consulting a
major contributor of a component before
making any changes to it.
• Pay more attention when reviewing
code submitted by minor contributors.
• More extensive testing should be
performed for components with low
ownership.
Use metrics to build better software
36
@IoannisKolaxis
• A customer asks for a new feature to be implemented,
but the major contributors of that component are not
available. What will you do?
• Ask from minor contributors, to start implementing this
new feature right away, or
• Delay the implementation of the feature, until one or
more major contributors are available?
Planning new features
37
@IoannisKolaxis
• Use git to find out all the contributors for a component:
git shortlog -s your_component > contributors.txt
17 Ioannis Kolaxis
18 …
34 …
• Or, to limit the results to contributors after a given date
(e.g. due to an organizational restructuring)
git shortlog -s --after=2018-05-01 your_component > contributors.txt
Learn your contributors
Commits per
developer
Folder
38
@IoannisKolaxis
1. Stop creating new quality issues.
2. Don’t touch old code.
3. Refactor your most complex, frequently
changing files.
4. Focus your testing on frequently changing files.
5. Pay attention to minor contributors.
Summary of proposed actions
39
@IoannisKolaxis
How do you build quality software?
Let’s share
our knowledge &
experience!
Atos, the Atos logo, Atos Codex, Atos Consulting, Atos Worldgrid, Worldline, BlueKiwi, Bull, Canopy the
Open Cloud Company, Unify, Yunano, Zero Email, Zero Email Certified and The Zero Email Company are
registered trademarks of the Atos group. June 2016. © 2016 Atos. Confidential information owned by
Atos, to be used by the recipient only. This document, or any part of it, may not be reproduced, copied,
circulated and/or distributed nor quoted without prior written approval from Atos.
Thank you!
Email : ioannis.kolaxis@atos.net
Twitter : @IoannisKolaxis

More Related Content

What's hot

Programming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT worldProgramming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT worldRogue Wave Software
 
5 Ways to Accelerate Standards Compliance with Static Code Analysis
5 Ways to Accelerate Standards Compliance with Static Code Analysis 5 Ways to Accelerate Standards Compliance with Static Code Analysis
5 Ways to Accelerate Standards Compliance with Static Code Analysis Perforce
 
Scaling Enterprise DevOps with CloudBees
Scaling Enterprise DevOps with CloudBeesScaling Enterprise DevOps with CloudBees
Scaling Enterprise DevOps with CloudBeesDevOps.com
 
Why Do We Break APIs? First Answers from Developers
Why Do We Break APIs? First Answers from DevelopersWhy Do We Break APIs? First Answers from Developers
Why Do We Break APIs? First Answers from DevelopersLaerte Xavier
 
Maturing your path toward DevOps with Continuous Testing
Maturing your path toward DevOps with Continuous TestingMaturing your path toward DevOps with Continuous Testing
Maturing your path toward DevOps with Continuous TestingPerfecto Mobile
 
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...SAIL_QU
 
Curiosity and Xray present - In sprint testing: Aligning tests and teams to r...
Curiosity and Xray present - In sprint testing: Aligning tests and teams to r...Curiosity and Xray present - In sprint testing: Aligning tests and teams to r...
Curiosity and Xray present - In sprint testing: Aligning tests and teams to r...Curiosity Software Ireland
 
SCA in an Agile World | June 2010
SCA in an Agile World | June 2010SCA in an Agile World | June 2010
SCA in an Agile World | June 2010Klocwork
 
Aligning Software Testing With Modern Age Development Practices
Aligning Software Testing With Modern Age Development PracticesAligning Software Testing With Modern Age Development Practices
Aligning Software Testing With Modern Age Development PracticesAspire Systems
 
Jenkins Test Automation with codeBeamer ALM
Jenkins Test Automation with codeBeamer ALMJenkins Test Automation with codeBeamer ALM
Jenkins Test Automation with codeBeamer ALMIntland Software GmbH
 
Scope master introduction presentation feb 2020 w vid
Scope master introduction presentation feb 2020 w vidScope master introduction presentation feb 2020 w vid
Scope master introduction presentation feb 2020 w vidColin Hammond
 
A "Firewall" for Bad Binaries
A "Firewall" for Bad BinariesA "Firewall" for Bad Binaries
A "Firewall" for Bad BinariesSonatype
 
[Europe merge world tour] Coverity Development Testing
[Europe   merge world tour] Coverity Development Testing[Europe   merge world tour] Coverity Development Testing
[Europe merge world tour] Coverity Development TestingPerforce
 
Fse2012 shihab
Fse2012 shihabFse2012 shihab
Fse2012 shihabSAIL_QU
 
Increasing Quality with DevOps
Increasing Quality with DevOpsIncreasing Quality with DevOps
Increasing Quality with DevOpsCoveros, Inc.
 
10 Things You Might Not Know: Continuous Integration
10 Things You Might Not Know: Continuous Integration10 Things You Might Not Know: Continuous Integration
10 Things You Might Not Know: Continuous IntegrationCoveros, Inc.
 

What's hot (20)

Apex triggers i
Apex triggers iApex triggers i
Apex triggers i
 
Programming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT worldProgramming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT world
 
5 Ways to Accelerate Standards Compliance with Static Code Analysis
5 Ways to Accelerate Standards Compliance with Static Code Analysis 5 Ways to Accelerate Standards Compliance with Static Code Analysis
5 Ways to Accelerate Standards Compliance with Static Code Analysis
 
Scaling Enterprise DevOps with CloudBees
Scaling Enterprise DevOps with CloudBeesScaling Enterprise DevOps with CloudBees
Scaling Enterprise DevOps with CloudBees
 
Why Do We Break APIs? First Answers from Developers
Why Do We Break APIs? First Answers from DevelopersWhy Do We Break APIs? First Answers from Developers
Why Do We Break APIs? First Answers from Developers
 
Maturing your path toward DevOps with Continuous Testing
Maturing your path toward DevOps with Continuous TestingMaturing your path toward DevOps with Continuous Testing
Maturing your path toward DevOps with Continuous Testing
 
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
 
Curiosity and Xray present - In sprint testing: Aligning tests and teams to r...
Curiosity and Xray present - In sprint testing: Aligning tests and teams to r...Curiosity and Xray present - In sprint testing: Aligning tests and teams to r...
Curiosity and Xray present - In sprint testing: Aligning tests and teams to r...
 
SCA in an Agile World | June 2010
SCA in an Agile World | June 2010SCA in an Agile World | June 2010
SCA in an Agile World | June 2010
 
Rash
RashRash
Rash
 
Aligning Software Testing With Modern Age Development Practices
Aligning Software Testing With Modern Age Development PracticesAligning Software Testing With Modern Age Development Practices
Aligning Software Testing With Modern Age Development Practices
 
Vishakantaiah validating
Vishakantaiah validatingVishakantaiah validating
Vishakantaiah validating
 
Jenkins Test Automation with codeBeamer ALM
Jenkins Test Automation with codeBeamer ALMJenkins Test Automation with codeBeamer ALM
Jenkins Test Automation with codeBeamer ALM
 
Scope master introduction presentation feb 2020 w vid
Scope master introduction presentation feb 2020 w vidScope master introduction presentation feb 2020 w vid
Scope master introduction presentation feb 2020 w vid
 
A "Firewall" for Bad Binaries
A "Firewall" for Bad BinariesA "Firewall" for Bad Binaries
A "Firewall" for Bad Binaries
 
[Europe merge world tour] Coverity Development Testing
[Europe   merge world tour] Coverity Development Testing[Europe   merge world tour] Coverity Development Testing
[Europe merge world tour] Coverity Development Testing
 
Fse2012 shihab
Fse2012 shihabFse2012 shihab
Fse2012 shihab
 
Increasing Quality with DevOps
Increasing Quality with DevOpsIncreasing Quality with DevOps
Increasing Quality with DevOps
 
What is DevOps?
What is DevOps?What is DevOps?
What is DevOps?
 
10 Things You Might Not Know: Continuous Integration
10 Things You Might Not Know: Continuous Integration10 Things You Might Not Know: Continuous Integration
10 Things You Might Not Know: Continuous Integration
 

Similar to How to improve the quality of your application

Technical debt strategy
Technical debt strategyTechnical debt strategy
Technical debt strategyMasas Dani
 
Software engineering practices and software quality empirical research results
Software engineering practices and software quality empirical research resultsSoftware engineering practices and software quality empirical research results
Software engineering practices and software quality empirical research resultsNikolai Avteniev
 
Introducing Systems Analysis Design Development
Introducing Systems Analysis Design DevelopmentIntroducing Systems Analysis Design Development
Introducing Systems Analysis Design Developmentbsadd
 
Xen Project Contributor Training - Part 1 introduction v1.0
Xen Project Contributor Training - Part 1 introduction v1.0Xen Project Contributor Training - Part 1 introduction v1.0
Xen Project Contributor Training - Part 1 introduction v1.0The Linux Foundation
 
Introducing systems analysis, design & development Concepts
Introducing systems analysis, design & development ConceptsIntroducing systems analysis, design & development Concepts
Introducing systems analysis, design & development ConceptsShafiul Azam Chowdhury
 
Problems of testing 64-bit applications
Problems of testing 64-bit applicationsProblems of testing 64-bit applications
Problems of testing 64-bit applicationsPVS-Studio
 
How Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom LineHow Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom LineImaginet
 
The Case for Low-code Development
The Case for Low-code DevelopmentThe Case for Low-code Development
The Case for Low-code DevelopmentLinx
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Maven Logix
 
Automated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps NextAutomated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps NextPerfecto by Perforce
 
boughtonalexand jdjdjfjjfjfjfjnfjfjjjfkdifij
boughtonalexand jdjdjfjjfjfjfjnfjfjjjfkdifijboughtonalexand jdjdjfjjfjfjfjnfjfjjjfkdifij
boughtonalexand jdjdjfjjfjfjfjnfjfjjjfkdifijakd3143
 
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...VincitOy
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applicationsnadeembtech
 
code_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pptx
code_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pptxcode_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pptx
code_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pptxsarah david
 
Using Static Analysis Tools to Become a Superhero Programmer.pptx
Using Static Analysis Tools to Become a Superhero Programmer.pptxUsing Static Analysis Tools to Become a Superhero Programmer.pptx
Using Static Analysis Tools to Become a Superhero Programmer.pptxJamie Coleman
 

Similar to How to improve the quality of your application (20)

Javantura v6 - How can you improve the quality of your application - Ioannis ...
Javantura v6 - How can you improve the quality of your application - Ioannis ...Javantura v6 - How can you improve the quality of your application - Ioannis ...
Javantura v6 - How can you improve the quality of your application - Ioannis ...
 
Technical debt strategy
Technical debt strategyTechnical debt strategy
Technical debt strategy
 
Software engineering practices and software quality empirical research results
Software engineering practices and software quality empirical research resultsSoftware engineering practices and software quality empirical research results
Software engineering practices and software quality empirical research results
 
Software testing
Software testingSoftware testing
Software testing
 
Introducing Systems Analysis Design Development
Introducing Systems Analysis Design DevelopmentIntroducing Systems Analysis Design Development
Introducing Systems Analysis Design Development
 
Xen Project Contributor Training - Part 1 introduction v1.0
Xen Project Contributor Training - Part 1 introduction v1.0Xen Project Contributor Training - Part 1 introduction v1.0
Xen Project Contributor Training - Part 1 introduction v1.0
 
Introducing systems analysis, design & development Concepts
Introducing systems analysis, design & development ConceptsIntroducing systems analysis, design & development Concepts
Introducing systems analysis, design & development Concepts
 
Problems of testing 64-bit applications
Problems of testing 64-bit applicationsProblems of testing 64-bit applications
Problems of testing 64-bit applications
 
How Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom LineHow Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom Line
 
The Case for Low-code Development
The Case for Low-code DevelopmentThe Case for Low-code Development
The Case for Low-code Development
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening
 
Automated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps NextAutomated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps Next
 
ppt chapter 1.ppt
ppt chapter 1.pptppt chapter 1.ppt
ppt chapter 1.ppt
 
boughtonalexand jdjdjfjjfjfjfjnfjfjjjfkdifij
boughtonalexand jdjdjfjjfjfjfjnfjfjjjfkdifijboughtonalexand jdjdjfjjfjfjfjnfjfjjjfkdifij
boughtonalexand jdjdjfjjfjfjfjnfjfjjjfkdifij
 
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
 
Case study
Case studyCase study
Case study
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
 
code_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pptx
code_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pptxcode_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pptx
code_review_checklist_6_actions_to_improve_the_quality_of_your_reviews.pptx
 
Using Static Analysis Tools to Become a Superhero Programmer.pptx
Using Static Analysis Tools to Become a Superhero Programmer.pptxUsing Static Analysis Tools to Become a Superhero Programmer.pptx
Using Static Analysis Tools to Become a Superhero Programmer.pptx
 
The Waterfall Model
The Waterfall ModelThe Waterfall Model
The Waterfall Model
 

Recently uploaded

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 

Recently uploaded (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 

How to improve the quality of your application

  • 1. How to improve the quality of your application (I wish I’d known this earlier!) Monday 16th September 2019 Oracle Code One, San Francisco / USA Ioannis Kolaxis – Coding Architect / Senior Expert
  • 2. 1 @IoannisKolaxis Our application: CMP • Automates the configuration & provisioning of our products, achieving significant time savings for our service.
  • 3. 2 @IoannisKolaxis Are you working for a software product, where …? • Customers keep complaining about bugs • New features take too much time to be implemented Software quality issues
  • 4. 3 @IoannisKolaxis • Can you improve the quality of your software? • How? What can you do?
  • 5. 4 @IoannisKolaxis Customer tickets ✔ • We usually measure quality via customer tickets: CMP Customer tickets
  • 6. 5 @IoannisKolaxis Code coverage ✔ • When we refer to quality, we usually think of code coverage! Increased coverage: • from 67% (Feb 2017) • to 72% (Jun 2018)
  • 7. 6 @IoannisKolaxis Should you pay off your debt? Decreased debt: • from 1.359 days (Feb 2017) • to 392 days (Jun 2018)
  • 8. 7 @IoannisKolaxis Do not touch old code! You will probably introduce new defects! Old code is more reliable “If a module is, on the average, a year older than an otherwise similar module, the older module will have roughly a third fewer faults.” T. L. Graves, A. F. Karr, J. S. Marron and H. Siy, "Predicting fault incidence using software change history" in IEEE Transactions on Software Engineering, vol. 26, no. 7, pp. 653-661, Jul 2000.
  • 9. 8 @IoannisKolaxis Stop creating new debt • Install SonarLint plugin in your IDE. • It helps you detect, and fix quality issues as you write code. • Download at: www.sonarlint.org
  • 10. 9 @IoannisKolaxis Stop creating new debt • Setup Quality Gates in SonarQube
  • 11. 10 @IoannisKolaxis • As a developer, where do you spend most of your time? A. Reading existing code, B. Writing new code, C. Waiting for a full build to complete, D.Other Quiz
  • 12. 11 @IoannisKolaxis • As a developer, where do you spend most of your time? A. Reading existing code, B. Writing new code, C. Waiting for a full build to complete, D.Other Quiz
  • 13. 12 @IoannisKolaxis Which parts of your code do you read most often? Just think …
  • 14. 13 @IoannisKolaxis • Use git to find out where you spend most of your development efforts: git log --format=format: --name-only | egrep -v '^$' | sort | uniq -c | sort -r > files_change_frequency.txt 258 usermanagementportlet/…/UserManagement_de.properties 250 usermanagementportlet/…/UserManagement_en.properties 227 usermanagement/…/RetrieveUserTmpltForUsersDataControlImpl.java 205 usermanagement/…/UserManagementImpl.java 154 usermanagement/…/EditUserResourceTemplateRulesBean.java 135 usermanagementportlet/…/AddEditUserBean.java 109 usermanagementportlet/…/ConfigureNewUserResourceBean.java 103 usermanagementportlet/…/addEditUser.jsp Data never lies Commits per file
  • 15. 14 @IoannisKolaxis The pattern From a total of 10.007 files: • 11 files → more than 100 commits • 91 files → 31 < commits < 100 • 455 files → 10 < commits < 30 • 9.450 files → less than 10 commits • Only a few files change frequently! • This is where you spend most of your time!
  • 16. 15 @IoannisKolaxis A well-aimed refactoring will help you: • Spend less time to read code & extend functionality. • Become more productive! Refactor frequently-changing files
  • 17. 16 @IoannisKolaxis • “Churn measures based on counts of lines added, deleted, and modified are very effective for fault prediction.” R. M. Bell, T. J. Ostrand, and E.J. Weyuker, “Does Measuring Code Change Improve Fault Prediction?“, ACM Press, 2011. • Files involved in a lot of bug fixing activities are most likely to be defective R. Moser, W. Pedrycz, and G. Succi, “A Comparative Analysis of the Efficiency of Change Metrics and Static Code Attributes for Defect Prediction“, Proceedings of the 30th International Conference on Software Engineering, 181-190, 2008. Changing files predict system failures
  • 18. 17 @IoannisKolaxis • Do not waste your time testing mature functionality (=components that do not change). • Focus all your testing efforts on the frequently-changing parts; those are most likely to fail! Focus your Quality Assurance efforts Unit Tests Integration Tests E2E Tests
  • 19. 18 @IoannisKolaxis What is the coverage of your new/changing code? Ask the right questions
  • 20. 19 @IoannisKolaxis • Files not changed in the past years → stable components → mature features • Is every mature feature still used by your customers? • If a feature is not used, then delete its code! • Else, extract stable features in separate libraries. Identify stable components
  • 21. 20 @IoannisKolaxis • Save time from your builds. • Achieve faster onboarding of new developers, by: Go faster with deleted/extracted code • Focusing only on actively developed code. • Not having to familiarize with old/stable code.
  • 22. 21 @IoannisKolaxis • Gain more insight, by measuring code complexity for each one of the frequently changing files. • Language-neutral metrics for code complexity: • Number of lines • Number of tabs Measure code complexity
  • 23. 22 @IoannisKolaxis • How many times did you provide a bug fix, by adding a nested conditional in your code? if (…) { for (…) { if (customerSpecificSetup) { // Do some magic, so that the // application works for this customer! } } } Tabs increase complexity tabs
  • 24. 23 @IoannisKolaxis Rising complexity calls for refactoring 227 commits
  • 25. 24 @IoannisKolaxis Our #1 priority for refactoring 205 commits
  • 26. 25 @IoannisKolaxis Our #1 priority for refactoring 6.767 → 8.396 lines 22.421→ 29.310 tabs Sept 2014 205 commits
  • 27. 26 @IoannisKolaxis • Released on 8th November 2006. • > 50 million lines of code. • ~ 2.000 developers. Do you remember Windows Vista?
  • 28. 27 @IoannisKolaxis • Microsoft measured several organizational metrics, and studied their correlation with the defects of Windows Vista. Organizational structure vs Quality Organizational metric Assertion Number of Engineers The more people who touch the code, the lower the quality. Number of Ex-Engineers A large loss of team members affects the knowledge retention, and thus quality. Organization Intersection Factor The more diffused the different organizations contributing code, the lower is the quality. N. Nagappan, B. Murphy, and V.R. Basili, “The Influence of Organizational Structure on Software Quality: An Empirical Case Study“, ACM, 2008. • Can the structure of your organization affect the quality of your software application?
  • 29. 28 @IoannisKolaxis • Organizational metrics are better predictors of failure-proneness than the traditional metrics used so far, such as code coverage, code complexity, etc. Organizational structure impacts Quality Model Precision Organizational structure 86,2% Code coverage 83,8% Code complexity 79,3% Code churn 78,6% Dependencies 74,4% Pre-release bugs 73,8% N. Nagappan, B. Murphy, and V.R. Basili, “The Influence of Organizational Structure on Software Quality: An Empirical Case Study“, ACM, 2008.
  • 30. 29 @IoannisKolaxis • In another research, focused on Windows 7, Microsoft distinguished between the following kinds of developers, depending on their commits for a given component: • Owner: has the most commits to that component. • Major contributor: has more than 5% of total commits. • Minor contributor: has less than 5% of total commits. More organizational metrics C.Bird, N. Nagappan, B. Murphy, H. Gall, and P. Devanbu, “Don’t Touch My Code! Examining the Effects of Code Ownership on Software Quality“, ACM, 2011.
  • 31. 30 @IoannisKolaxis • The researchers concluded that: • “The number of minor contributors has a strong positive relationship with both pre- and post-release failures …” • “Higher levels of ownership for the top contributor to a component results in fewer failures when controlling for the same metrics, but the effect is smaller than the number of minor contributors” Effects of minor contributors C.Bird, N. Nagappan, B. Murphy, H. Gall, and P. Devanbu, “Don’t Touch My Code! Examining the Effects of Code Ownership on Software Quality“, ACM, 2011.
  • 32. 31 @IoannisKolaxis • In one of our software components, we had a total of 427 commits: Gain insight into your components Commits per developer Metric Value Minor contributors 15 Major contributors 6 Total contributors 21 Ownership 20,37% • The top contributing developer made 87 commits: 87/427 = 20,37% ownership
  • 33. 32 @IoannisKolaxis • In another software component, we had a total of 253 commits for the same period: Gain insight into your components Commits per developer Metric Value Minor contributors 3 Major contributors 6 Total contributors 9 Ownership 28,85% • The top contributing developer made 73 commits: 73/253 = 28,85% ownership
  • 34. 33 @IoannisKolaxis • Which component will probably have more defects? • Where would you focus your testing efforts? Know where you are standing … Metric Component A Component B Minor contributors 15 3 Major contributors 6 6 Total contributors 21 9 Ownership 20,37% 28,85%
  • 35. 34 @IoannisKolaxis • More minor contributors → More defects • Bigger ownership → Less defects Beware of minor contributors! Metric Component A Component B Minor contributors 15 3 Major contributors 6 6 Total contributors 21 9 Ownership 20,37% 28,85%
  • 36. 35 @IoannisKolaxis • Minor contributors must be consulting a major contributor of a component before making any changes to it. • Pay more attention when reviewing code submitted by minor contributors. • More extensive testing should be performed for components with low ownership. Use metrics to build better software
  • 37. 36 @IoannisKolaxis • A customer asks for a new feature to be implemented, but the major contributors of that component are not available. What will you do? • Ask from minor contributors, to start implementing this new feature right away, or • Delay the implementation of the feature, until one or more major contributors are available? Planning new features
  • 38. 37 @IoannisKolaxis • Use git to find out all the contributors for a component: git shortlog -s your_component > contributors.txt 17 Ioannis Kolaxis 18 … 34 … • Or, to limit the results to contributors after a given date (e.g. due to an organizational restructuring) git shortlog -s --after=2018-05-01 your_component > contributors.txt Learn your contributors Commits per developer Folder
  • 39. 38 @IoannisKolaxis 1. Stop creating new quality issues. 2. Don’t touch old code. 3. Refactor your most complex, frequently changing files. 4. Focus your testing on frequently changing files. 5. Pay attention to minor contributors. Summary of proposed actions
  • 40. 39 @IoannisKolaxis How do you build quality software? Let’s share our knowledge & experience!
  • 41. Atos, the Atos logo, Atos Codex, Atos Consulting, Atos Worldgrid, Worldline, BlueKiwi, Bull, Canopy the Open Cloud Company, Unify, Yunano, Zero Email, Zero Email Certified and The Zero Email Company are registered trademarks of the Atos group. June 2016. © 2016 Atos. Confidential information owned by Atos, to be used by the recipient only. This document, or any part of it, may not be reproduced, copied, circulated and/or distributed nor quoted without prior written approval from Atos. Thank you! Email : ioannis.kolaxis@atos.net Twitter : @IoannisKolaxis