SlideShare a Scribd company logo
Lessons from the real-world
Software Quality in
Practice
Ganesh Samarthyam
sgganesh@gmail.com
www.designsmells.com
Why care about software quality?
Reason #1. Software defects cost huge money!
computer defects cost
the global economy
more than £192 billion
a year (or US $307 bn)!
Cambridge
University Study
(2012)
Global 'IT Debt' - $500
billion for the year 2010;
potential to grow to $1
trillion by 2015
Gartner Study
(2010)
http://www.cambridge-news.co.uk/
Education/Universities/Experts-
battle-192bn-loss-to-computer-
bugs-18122012.htm
http://www.gartner.com/
newsroom/id/1439513
Reason #2. Software defects cause project failures
”The most common
reason for schedule slippages,
cost overruns, and outright
cancellation of major systems is that
they contain too many bugs or
defects to operate successfully”
http://en.wikipedia.org/wiki/Capers_Jones
Capers Jones in “Why Projects Fail?”, CrossTalk,
The Journal of Defense Software Engineering, 2006.
Reason #3. Software defects result in losses
• Depending on the criticality of
the software, losses could be in
the form of
• lower-sales (in case of
software products)
• financial losses (in business
critical systems)
• even human lives (in case of
safety critical systems such as
medical devices, or mission-
critical systems such as
rockets)
Some real-world software failures
Crash in Blackberry phone
• Supporting multimedia
software for my Blackberry
crashed with this design error!
• Classic OO design problem of
“polymorphic call in
constructors”
• Constructors do not support fully
as the derived objects are not
constructed yet when base class
constructor executes
ignorance on
design practices
Zune media player freeze
• On Dec 31 2008, all Zune media
players froze!
• Cause traced back to a non-
terminating loop error in code
corner-case
Mars Climate Orbiter loss
• Mars Climate Orbiter reached Mars
(1999)
• Lost after entering the atmosphere
• Ground software used “metric
units” (‘Newton-seconds’) instead of
“English units” (‘pounds-seconds‘)
• Jet Propulsion Laboratory (JPL)
and Lockheed Martin Astronautics
(LMA) located in different places
and used different units
mis-
communication
Wrong generated code
• Missing {ordered} constraint for association
• in UML, the association by default is {unordered}
• Automated UML code generator used for generating Java code
• java.util.HashSet generated instead of java.util.TreeSet by the tool
• Defect: PurchaseRequests given by customers processed in some
unspecified order
omission
Unreadable Customer ID
• Simple mistake - using wrong data type for representing Customer ID!
• Programmer wanted to save few bytes of space
• Because a String object occupy few more bytes compared to a
floating point number!
wrong
datatype to save
space
Stock market undervaluation
• Many floating-point numbers cannot
be accurately represented in digital
computers (e.g., the number 0.1 - yes
that’s true!)
• In 1984, the Vancouver stock
exchange was under-valued by 48%
(index value was 524.811 instead of
correct 1098.892) compared to its real
value because of an accumulating
error
• Slow-accumulation of round-off
error
• 3 decimal places instead of 4
decimal places
unintuitive
floating-points
http://en.wikipedia.org/wiki/Vancouver_Stock_Exchange
Practical and effective approaches
for developing high-quality software
More and more testing? No!
❖ Testing is necessary but not
sufficient
❖ “Program testing can be used to
show the presence of defects,
but never their absence” -
Dijkstra
❖ Already testing takes 30% to 75%
of development cost!
❖ Considerably difficult to test
complex software
❖ Return-On-Investment (ROI) on
testing goes down over time
reactive,
costly, too late
Disciplined personal practices
❖ Study results from Barry Boehm &
Victor R. Basili (Well-respected
Researchers in Empirical Software
Engineering): “Disciplined personal
practices can reduce defect
introduction rates by up to 75
percent”!
❖ Approaches for realising it:
peer-reviews, automated on-
the-fly analysers, incentivise
writing quality code
Solution #1. Extensive peer-reviews
❖ Just like daily exercises, peer-
reviews are unattractive
❖ Time and again, studies
show they are most effective
in catching most defects
❖ Not just code reviews, but
design and architectural
reviews
Solution #2. Institutionalise automated analyzers
❖ Automated analysis tools can
find up to 70% of the defects
that can be caught using
manual reviews!
❖ Not just code analysers -
design, architecture, clone, and
metric tools are equally
important
❖ Not just integration, but
institutionalise using them as
part of the development
process
A must-to-have list of useful analysers
❖ Clone detectors (C++, Java,
C#)
❖ PMD Copy Paste Detector
❖ Simian
❖ Metric tools (C++, Java, C#)
❖ RSM Metrics
❖ Understand
❖ McCabe Metrics
❖ Architectural analyzers (C++,
Java, C#)
❖ Sotograph
❖ Structure101
❖ Design analysers
❖ Stan4J (Java)
❖ InFusion (C++, Java)
❖ NDepend (C#)
❖ JDepend (Java)
❖ CppDepend (C++)
❖ Code analyzers
❖ PMD (Java)
❖ FindBugs (Java)
❖ Goanna (C++)
❖ PC-lint (C++)
❖ FxCop (C#)
❖ Gendarme (C#)
❖ ReSharper (C#)
Marked in underscore are free tools
Solution #3. Encourage creation of quality code
❖ War story:
❖ Crisis in my earlier company when two
patches recalled (with customers
screaming)
❖ After dousing fire, management decided
to improve processes to ensure creating
quality code
❖ Developers encouraged to file defects
on software (number of defects filed
considered in performance evaluation)
❖ Target ratio of development:testing:
customer defects set to 64:27:9
❖ No patch-recalls, reduced testing costs,
customer filed defects reduced by 25%!
Solution #4. Quality first. Features next!
❖ Usual approach: Features first,
quality next (or as after-
thought)
❖ Perform impact-analysis
seriously before accepting
feature requests or making
defect fixes
❖ Example: Look out for
architecturally-significant
requirements
Summary & Key takeaways
❖ Why care about software quality?
❖ Software defects cost huge money!
❖ Software defects cause project failures
❖ Software defects result in various kinds of losses
❖ Practical and effective approaches for developing high-quality software
❖ Extensive (arch., design, code) peer-reviews
❖ Institutionalize (arch, design, code, metric, and clone) analysers
❖ Encourage and incentivise developers to create quality code
❖ Adopt quality first, features next approach
email sgganesh@gmail.com
website www.designsmells.com
twitter @GSamarthyam
linkedin bit.ly/sgganesh
slideshare slideshare.net/sgganesh

More Related Content

What's hot

Open-DO Update
Open-DO UpdateOpen-DO Update
Open-DO Update
AdaCore
 
Andrew spoden Software Engineer resume
Andrew spoden Software Engineer resumeAndrew spoden Software Engineer resume
Andrew spoden Software Engineer resume
Andrew Spoden
 
The Design, Evolution and Use of KernelF
The Design, Evolution and Use of KernelFThe Design, Evolution and Use of KernelF
The Design, Evolution and Use of KernelF
Markus Voelter
 
Static Code Analysis
Static Code AnalysisStatic Code Analysis
Static Code Analysis
Obika Gellineau
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applicationsnadeembtech
 
Top 10 static code analysis tool
Top 10 static code analysis toolTop 10 static code analysis tool
Top 10 static code analysis tool
scmGalaxy Inc
 

What's hot (9)

Code Inspection
Code InspectionCode Inspection
Code Inspection
 
Open-DO Update
Open-DO UpdateOpen-DO Update
Open-DO Update
 
Resume
ResumeResume
Resume
 
Andrew spoden Software Engineer resume
Andrew spoden Software Engineer resumeAndrew spoden Software Engineer resume
Andrew spoden Software Engineer resume
 
Introduction
IntroductionIntroduction
Introduction
 
The Design, Evolution and Use of KernelF
The Design, Evolution and Use of KernelFThe Design, Evolution and Use of KernelF
The Design, Evolution and Use of KernelF
 
Static Code Analysis
Static Code AnalysisStatic Code Analysis
Static Code Analysis
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
 
Top 10 static code analysis tool
Top 10 static code analysis toolTop 10 static code analysis tool
Top 10 static code analysis tool
 

Viewers also liked

Search quality in practice
Search quality in practiceSearch quality in practice
Search quality in practice
Alexander Sibiryakov
 
Ramona Wendt Rn Resume 2010 3
Ramona Wendt Rn Resume 2010 3Ramona Wendt Rn Resume 2010 3
Ramona Wendt Rn Resume 2010 3mona57
 
ICU RN Resume Sample
ICU RN Resume SampleICU RN Resume Sample
ICU RN Resume Sample
RN Resume
 
2016 Resume of Tiffany Tindall RN 727.804.4466
2016 Resume of Tiffany Tindall RN 727.804.44662016 Resume of Tiffany Tindall RN 727.804.4466
2016 Resume of Tiffany Tindall RN 727.804.4466
Tiffany Tindall
 
Dana Resume, current 2015
Dana Resume, current 2015Dana Resume, current 2015
Dana Resume, current 2015Dana O'Harold
 
Carly Final Resume
Carly Final ResumeCarly Final Resume
Carly Final ResumeCarly Weddle
 
Overview of Stage 2 Clinical Quality Measures for the Medicare and Medicaid E...
Overview of Stage 2 Clinical Quality Measures for the Medicare and Medicaid E...Overview of Stage 2 Clinical Quality Measures for the Medicare and Medicaid E...
Overview of Stage 2 Clinical Quality Measures for the Medicare and Medicaid E...
Brian Ahier
 
MAE TEMPORAL RAMIREZ- cv.docx
MAE TEMPORAL RAMIREZ- cv.docxMAE TEMPORAL RAMIREZ- cv.docx
MAE TEMPORAL RAMIREZ- cv.docxMae Ramirez
 
ExtraHop Product Overview Datasheet
ExtraHop Product Overview DatasheetExtraHop Product Overview Datasheet
ExtraHop Product Overview Datasheet
ExtraHop Networks
 
Clinical Quality Measures: Measuring and monitoring clinical quality measures...
Clinical Quality Measures: Measuring and monitoring clinical quality measures...Clinical Quality Measures: Measuring and monitoring clinical quality measures...
Clinical Quality Measures: Measuring and monitoring clinical quality measures...
Practice Fusion
 
Steve Stephens Epic Go Live and Credentialed Trainer Resume
Steve Stephens Epic Go Live and Credentialed Trainer ResumeSteve Stephens Epic Go Live and Credentialed Trainer Resume
Steve Stephens Epic Go Live and Credentialed Trainer Resume
Steve J Stephens
 
Lisa_Johnson_Resume 032816
Lisa_Johnson_Resume 032816Lisa_Johnson_Resume 032816
Lisa_Johnson_Resume 032816Lisa Johnson
 
Hl7 Analytics for IT and Clinical Insights
Hl7 Analytics for IT and Clinical InsightsHl7 Analytics for IT and Clinical Insights
Hl7 Analytics for IT and Clinical Insights
ExtraHop Networks
 

Viewers also liked (18)

Search quality in practice
Search quality in practiceSearch quality in practice
Search quality in practice
 
Resume
ResumeResume
Resume
 
DEBORAH M Resume
DEBORAH M ResumeDEBORAH M Resume
DEBORAH M Resume
 
Ramona Wendt Rn Resume 2010 3
Ramona Wendt Rn Resume 2010 3Ramona Wendt Rn Resume 2010 3
Ramona Wendt Rn Resume 2010 3
 
resume cheng
resume chengresume cheng
resume cheng
 
ICU RN Resume Sample
ICU RN Resume SampleICU RN Resume Sample
ICU RN Resume Sample
 
2016 Resume of Tiffany Tindall RN 727.804.4466
2016 Resume of Tiffany Tindall RN 727.804.44662016 Resume of Tiffany Tindall RN 727.804.4466
2016 Resume of Tiffany Tindall RN 727.804.4466
 
Dana Resume, current 2015
Dana Resume, current 2015Dana Resume, current 2015
Dana Resume, current 2015
 
Carly Final Resume
Carly Final ResumeCarly Final Resume
Carly Final Resume
 
Overview of Stage 2 Clinical Quality Measures for the Medicare and Medicaid E...
Overview of Stage 2 Clinical Quality Measures for the Medicare and Medicaid E...Overview of Stage 2 Clinical Quality Measures for the Medicare and Medicaid E...
Overview of Stage 2 Clinical Quality Measures for the Medicare and Medicaid E...
 
MAE TEMPORAL RAMIREZ- cv.docx
MAE TEMPORAL RAMIREZ- cv.docxMAE TEMPORAL RAMIREZ- cv.docx
MAE TEMPORAL RAMIREZ- cv.docx
 
ExtraHop Product Overview Datasheet
ExtraHop Product Overview DatasheetExtraHop Product Overview Datasheet
ExtraHop Product Overview Datasheet
 
Regina Cole Resume 520152
Regina Cole Resume 520152Regina Cole Resume 520152
Regina Cole Resume 520152
 
Clinical Quality Measures: Measuring and monitoring clinical quality measures...
Clinical Quality Measures: Measuring and monitoring clinical quality measures...Clinical Quality Measures: Measuring and monitoring clinical quality measures...
Clinical Quality Measures: Measuring and monitoring clinical quality measures...
 
Steve Stephens Epic Go Live and Credentialed Trainer Resume
Steve Stephens Epic Go Live and Credentialed Trainer ResumeSteve Stephens Epic Go Live and Credentialed Trainer Resume
Steve Stephens Epic Go Live and Credentialed Trainer Resume
 
Lisa_Johnson_Resume 032816
Lisa_Johnson_Resume 032816Lisa_Johnson_Resume 032816
Lisa_Johnson_Resume 032816
 
Hl7 Analytics for IT and Clinical Insights
Hl7 Analytics for IT and Clinical InsightsHl7 Analytics for IT and Clinical Insights
Hl7 Analytics for IT and Clinical Insights
 
Resume of Moses O Adedipe
Resume of Moses O AdedipeResume of Moses O Adedipe
Resume of Moses O Adedipe
 

Similar to Software Quality in Practice

Machine programming
Machine programmingMachine programming
Machine programming
DESMOND YUEN
 
JavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep DiveJavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep Dive
Andreas Grabner
 
JUG Poznan - 2017.01.31
JUG Poznan - 2017.01.31 JUG Poznan - 2017.01.31
JUG Poznan - 2017.01.31
Omnilogy
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET Dmytro Mindra
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming
PostSharp Technologies
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
ikram_ahamed
 
Production Debugging at Code Camp Philly
Production Debugging at Code Camp PhillyProduction Debugging at Code Camp Philly
Production Debugging at Code Camp Philly
Brian Lyttle
 
MODEL-DRIVEN ENGINEERING (MDE) in Practice
MODEL-DRIVEN ENGINEERING (MDE) in PracticeMODEL-DRIVEN ENGINEERING (MDE) in Practice
MODEL-DRIVEN ENGINEERING (MDE) in Practice
Hussein Alshkhir
 
10290057.ppt
10290057.ppt10290057.ppt
10290057.ppt
ImXaib
 
Static Analysis Primer
Static Analysis PrimerStatic Analysis Primer
Static Analysis PrimerCoverity
 
Static-Analysis-in-Industry.pptx
Static-Analysis-in-Industry.pptxStatic-Analysis-in-Industry.pptx
Static-Analysis-in-Industry.pptx
ShivashankarHR1
 
Cleanroom montaser hamza iraq2016
Cleanroom montaser hamza   iraq2016Cleanroom montaser hamza   iraq2016
Cleanroom montaser hamza iraq2016
montaser185
 
Ensuring code quality
Ensuring code qualityEnsuring code quality
Ensuring code quality
MikhailVladimirov
 
Single Source of Truth for Network Automation
Single Source of Truth for Network AutomationSingle Source of Truth for Network Automation
Single Source of Truth for Network Automation
Andy Davidson
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
Inductive Automation
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
Inductive Automation
 
Compiler design
Compiler designCompiler design
Compiler design
Thakur Ganeshsingh Thakur
 
Measuring Your Code
Measuring Your CodeMeasuring Your Code
Measuring Your Code
Nate Abele
 
GPCE16: Automatic Non-functional Testing of Code Generators Families
GPCE16: Automatic Non-functional Testing of Code Generators FamiliesGPCE16: Automatic Non-functional Testing of Code Generators Families
GPCE16: Automatic Non-functional Testing of Code Generators Families
Mohamed BOUSSAA
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)lqi
 

Similar to Software Quality in Practice (20)

Machine programming
Machine programmingMachine programming
Machine programming
 
JavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep DiveJavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep Dive
 
JUG Poznan - 2017.01.31
JUG Poznan - 2017.01.31 JUG Poznan - 2017.01.31
JUG Poznan - 2017.01.31
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
 
Production Debugging at Code Camp Philly
Production Debugging at Code Camp PhillyProduction Debugging at Code Camp Philly
Production Debugging at Code Camp Philly
 
MODEL-DRIVEN ENGINEERING (MDE) in Practice
MODEL-DRIVEN ENGINEERING (MDE) in PracticeMODEL-DRIVEN ENGINEERING (MDE) in Practice
MODEL-DRIVEN ENGINEERING (MDE) in Practice
 
10290057.ppt
10290057.ppt10290057.ppt
10290057.ppt
 
Static Analysis Primer
Static Analysis PrimerStatic Analysis Primer
Static Analysis Primer
 
Static-Analysis-in-Industry.pptx
Static-Analysis-in-Industry.pptxStatic-Analysis-in-Industry.pptx
Static-Analysis-in-Industry.pptx
 
Cleanroom montaser hamza iraq2016
Cleanroom montaser hamza   iraq2016Cleanroom montaser hamza   iraq2016
Cleanroom montaser hamza iraq2016
 
Ensuring code quality
Ensuring code qualityEnsuring code quality
Ensuring code quality
 
Single Source of Truth for Network Automation
Single Source of Truth for Network AutomationSingle Source of Truth for Network Automation
Single Source of Truth for Network Automation
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Compiler design
Compiler designCompiler design
Compiler design
 
Measuring Your Code
Measuring Your CodeMeasuring Your Code
Measuring Your Code
 
GPCE16: Automatic Non-functional Testing of Code Generators Families
GPCE16: Automatic Non-functional Testing of Code Generators FamiliesGPCE16: Automatic Non-functional Testing of Code Generators Families
GPCE16: Automatic Non-functional Testing of Code Generators Families
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
 

More from Ganesh Samarthyam

Wonders of the Sea
Wonders of the SeaWonders of the Sea
Wonders of the Sea
Ganesh Samarthyam
 
Animals - for kids
Animals - for kids Animals - for kids
Animals - for kids
Ganesh Samarthyam
 
Applying Refactoring Tools in Practice
Applying Refactoring Tools in PracticeApplying Refactoring Tools in Practice
Applying Refactoring Tools in Practice
Ganesh Samarthyam
 
CFP - 1st Workshop on “AI Meets Blockchain”
CFP - 1st Workshop on “AI Meets Blockchain”CFP - 1st Workshop on “AI Meets Blockchain”
CFP - 1st Workshop on “AI Meets Blockchain”
Ganesh Samarthyam
 
Great Coding Skills Aren't Enough
Great Coding Skills Aren't EnoughGreat Coding Skills Aren't Enough
Great Coding Skills Aren't Enough
Ganesh Samarthyam
 
College Project - Java Disassembler - Description
College Project - Java Disassembler - DescriptionCollege Project - Java Disassembler - Description
College Project - Java Disassembler - Description
Ganesh Samarthyam
 
Coding Guidelines - Crafting Clean Code
Coding Guidelines - Crafting Clean CodeCoding Guidelines - Crafting Clean Code
Coding Guidelines - Crafting Clean Code
Ganesh Samarthyam
 
Design Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on ExamplesDesign Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on Examples
Ganesh Samarthyam
 
Bangalore Container Conference 2017 - Brief Presentation
Bangalore Container Conference 2017 - Brief PresentationBangalore Container Conference 2017 - Brief Presentation
Bangalore Container Conference 2017 - Brief Presentation
Ganesh Samarthyam
 
Bangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - PosterBangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - Poster
Ganesh Samarthyam
 
Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)
Ganesh Samarthyam
 
OO Design and Design Patterns in C++
OO Design and Design Patterns in C++ OO Design and Design Patterns in C++
OO Design and Design Patterns in C++
Ganesh Samarthyam
 
Bangalore Container Conference 2017 - Sponsorship Deck
Bangalore Container Conference 2017 - Sponsorship DeckBangalore Container Conference 2017 - Sponsorship Deck
Bangalore Container Conference 2017 - Sponsorship Deck
Ganesh Samarthyam
 
Let's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageLet's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming Language
Ganesh Samarthyam
 
Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction
Ganesh Samarthyam
 
Java Generics - Quiz Questions
Java Generics - Quiz QuestionsJava Generics - Quiz Questions
Java Generics - Quiz Questions
Ganesh Samarthyam
 
Java Generics - by Example
Java Generics - by ExampleJava Generics - by Example
Java Generics - by Example
Ganesh Samarthyam
 
Software Architecture - Quiz Questions
Software Architecture - Quiz QuestionsSoftware Architecture - Quiz Questions
Software Architecture - Quiz Questions
Ganesh Samarthyam
 
Docker by Example - Quiz
Docker by Example - QuizDocker by Example - Quiz
Docker by Example - Quiz
Ganesh Samarthyam
 
Core Java: Best practices and bytecodes quiz
Core Java: Best practices and bytecodes quizCore Java: Best practices and bytecodes quiz
Core Java: Best practices and bytecodes quiz
Ganesh Samarthyam
 

More from Ganesh Samarthyam (20)

Wonders of the Sea
Wonders of the SeaWonders of the Sea
Wonders of the Sea
 
Animals - for kids
Animals - for kids Animals - for kids
Animals - for kids
 
Applying Refactoring Tools in Practice
Applying Refactoring Tools in PracticeApplying Refactoring Tools in Practice
Applying Refactoring Tools in Practice
 
CFP - 1st Workshop on “AI Meets Blockchain”
CFP - 1st Workshop on “AI Meets Blockchain”CFP - 1st Workshop on “AI Meets Blockchain”
CFP - 1st Workshop on “AI Meets Blockchain”
 
Great Coding Skills Aren't Enough
Great Coding Skills Aren't EnoughGreat Coding Skills Aren't Enough
Great Coding Skills Aren't Enough
 
College Project - Java Disassembler - Description
College Project - Java Disassembler - DescriptionCollege Project - Java Disassembler - Description
College Project - Java Disassembler - Description
 
Coding Guidelines - Crafting Clean Code
Coding Guidelines - Crafting Clean CodeCoding Guidelines - Crafting Clean Code
Coding Guidelines - Crafting Clean Code
 
Design Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on ExamplesDesign Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on Examples
 
Bangalore Container Conference 2017 - Brief Presentation
Bangalore Container Conference 2017 - Brief PresentationBangalore Container Conference 2017 - Brief Presentation
Bangalore Container Conference 2017 - Brief Presentation
 
Bangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - PosterBangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - Poster
 
Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)
 
OO Design and Design Patterns in C++
OO Design and Design Patterns in C++ OO Design and Design Patterns in C++
OO Design and Design Patterns in C++
 
Bangalore Container Conference 2017 - Sponsorship Deck
Bangalore Container Conference 2017 - Sponsorship DeckBangalore Container Conference 2017 - Sponsorship Deck
Bangalore Container Conference 2017 - Sponsorship Deck
 
Let's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageLet's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming Language
 
Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction
 
Java Generics - Quiz Questions
Java Generics - Quiz QuestionsJava Generics - Quiz Questions
Java Generics - Quiz Questions
 
Java Generics - by Example
Java Generics - by ExampleJava Generics - by Example
Java Generics - by Example
 
Software Architecture - Quiz Questions
Software Architecture - Quiz QuestionsSoftware Architecture - Quiz Questions
Software Architecture - Quiz Questions
 
Docker by Example - Quiz
Docker by Example - QuizDocker by Example - Quiz
Docker by Example - Quiz
 
Core Java: Best practices and bytecodes quiz
Core Java: Best practices and bytecodes quizCore Java: Best practices and bytecodes quiz
Core Java: Best practices and bytecodes quiz
 

Recently uploaded

Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 

Recently uploaded (20)

Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 

Software Quality in Practice

  • 1. Lessons from the real-world Software Quality in Practice Ganesh Samarthyam sgganesh@gmail.com www.designsmells.com
  • 2. Why care about software quality?
  • 3. Reason #1. Software defects cost huge money! computer defects cost the global economy more than £192 billion a year (or US $307 bn)! Cambridge University Study (2012) Global 'IT Debt' - $500 billion for the year 2010; potential to grow to $1 trillion by 2015 Gartner Study (2010) http://www.cambridge-news.co.uk/ Education/Universities/Experts- battle-192bn-loss-to-computer- bugs-18122012.htm http://www.gartner.com/ newsroom/id/1439513
  • 4. Reason #2. Software defects cause project failures ”The most common reason for schedule slippages, cost overruns, and outright cancellation of major systems is that they contain too many bugs or defects to operate successfully” http://en.wikipedia.org/wiki/Capers_Jones Capers Jones in “Why Projects Fail?”, CrossTalk, The Journal of Defense Software Engineering, 2006.
  • 5. Reason #3. Software defects result in losses • Depending on the criticality of the software, losses could be in the form of • lower-sales (in case of software products) • financial losses (in business critical systems) • even human lives (in case of safety critical systems such as medical devices, or mission- critical systems such as rockets)
  • 7. Crash in Blackberry phone • Supporting multimedia software for my Blackberry crashed with this design error! • Classic OO design problem of “polymorphic call in constructors” • Constructors do not support fully as the derived objects are not constructed yet when base class constructor executes ignorance on design practices
  • 8. Zune media player freeze • On Dec 31 2008, all Zune media players froze! • Cause traced back to a non- terminating loop error in code corner-case
  • 9. Mars Climate Orbiter loss • Mars Climate Orbiter reached Mars (1999) • Lost after entering the atmosphere • Ground software used “metric units” (‘Newton-seconds’) instead of “English units” (‘pounds-seconds‘) • Jet Propulsion Laboratory (JPL) and Lockheed Martin Astronautics (LMA) located in different places and used different units mis- communication
  • 10. Wrong generated code • Missing {ordered} constraint for association • in UML, the association by default is {unordered} • Automated UML code generator used for generating Java code • java.util.HashSet generated instead of java.util.TreeSet by the tool • Defect: PurchaseRequests given by customers processed in some unspecified order omission
  • 11. Unreadable Customer ID • Simple mistake - using wrong data type for representing Customer ID! • Programmer wanted to save few bytes of space • Because a String object occupy few more bytes compared to a floating point number! wrong datatype to save space
  • 12. Stock market undervaluation • Many floating-point numbers cannot be accurately represented in digital computers (e.g., the number 0.1 - yes that’s true!) • In 1984, the Vancouver stock exchange was under-valued by 48% (index value was 524.811 instead of correct 1098.892) compared to its real value because of an accumulating error • Slow-accumulation of round-off error • 3 decimal places instead of 4 decimal places unintuitive floating-points http://en.wikipedia.org/wiki/Vancouver_Stock_Exchange
  • 13. Practical and effective approaches for developing high-quality software
  • 14. More and more testing? No! ❖ Testing is necessary but not sufficient ❖ “Program testing can be used to show the presence of defects, but never their absence” - Dijkstra ❖ Already testing takes 30% to 75% of development cost! ❖ Considerably difficult to test complex software ❖ Return-On-Investment (ROI) on testing goes down over time reactive, costly, too late
  • 15. Disciplined personal practices ❖ Study results from Barry Boehm & Victor R. Basili (Well-respected Researchers in Empirical Software Engineering): “Disciplined personal practices can reduce defect introduction rates by up to 75 percent”! ❖ Approaches for realising it: peer-reviews, automated on- the-fly analysers, incentivise writing quality code
  • 16. Solution #1. Extensive peer-reviews ❖ Just like daily exercises, peer- reviews are unattractive ❖ Time and again, studies show they are most effective in catching most defects ❖ Not just code reviews, but design and architectural reviews
  • 17. Solution #2. Institutionalise automated analyzers ❖ Automated analysis tools can find up to 70% of the defects that can be caught using manual reviews! ❖ Not just code analysers - design, architecture, clone, and metric tools are equally important ❖ Not just integration, but institutionalise using them as part of the development process
  • 18. A must-to-have list of useful analysers ❖ Clone detectors (C++, Java, C#) ❖ PMD Copy Paste Detector ❖ Simian ❖ Metric tools (C++, Java, C#) ❖ RSM Metrics ❖ Understand ❖ McCabe Metrics ❖ Architectural analyzers (C++, Java, C#) ❖ Sotograph ❖ Structure101 ❖ Design analysers ❖ Stan4J (Java) ❖ InFusion (C++, Java) ❖ NDepend (C#) ❖ JDepend (Java) ❖ CppDepend (C++) ❖ Code analyzers ❖ PMD (Java) ❖ FindBugs (Java) ❖ Goanna (C++) ❖ PC-lint (C++) ❖ FxCop (C#) ❖ Gendarme (C#) ❖ ReSharper (C#) Marked in underscore are free tools
  • 19. Solution #3. Encourage creation of quality code ❖ War story: ❖ Crisis in my earlier company when two patches recalled (with customers screaming) ❖ After dousing fire, management decided to improve processes to ensure creating quality code ❖ Developers encouraged to file defects on software (number of defects filed considered in performance evaluation) ❖ Target ratio of development:testing: customer defects set to 64:27:9 ❖ No patch-recalls, reduced testing costs, customer filed defects reduced by 25%!
  • 20. Solution #4. Quality first. Features next! ❖ Usual approach: Features first, quality next (or as after- thought) ❖ Perform impact-analysis seriously before accepting feature requests or making defect fixes ❖ Example: Look out for architecturally-significant requirements
  • 21. Summary & Key takeaways ❖ Why care about software quality? ❖ Software defects cost huge money! ❖ Software defects cause project failures ❖ Software defects result in various kinds of losses ❖ Practical and effective approaches for developing high-quality software ❖ Extensive (arch., design, code) peer-reviews ❖ Institutionalize (arch, design, code, metric, and clone) analysers ❖ Encourage and incentivise developers to create quality code ❖ Adopt quality first, features next approach
  • 22. email sgganesh@gmail.com website www.designsmells.com twitter @GSamarthyam linkedin bit.ly/sgganesh slideshare slideshare.net/sgganesh