SlideShare a Scribd company logo
1 of 20
SOFTWARE
DEFECTS
(BUGS)
VIOLATIONS
DEFECTS VIOLATIONS
CODE QUALITY
CODE
COST
ENGINEERING
WORKING CODE
CLEANCODE
CODE
NIRVANA
YOU
MS
RULE #1
ALWAYS HAVE A
WORKING SYSTEM
RULE #2
DO NOT ATTEMPT
TO FUTURE-PROOF
IMPROVING
CODE QUALITY
EXPERTISE
SOFTWARE
PROCESS
REUSE
REFACTORING
VERSIONING
ANALYSIS
BUILD
MANAGEMENT
ISSUE
TRACKING
SUMMARY
• Violations are not visible to stakeholders
• Violations have a greater effect on code quality
• Remove a defect/violation only if doing so costs less
• Over a longer timeframe, avoiding/removing
violations dominates, resulting in higher code quality
• Over a shorter timeframe, avoiding/removing defects
dominates, resulting in lower code quality
• The timeframe of a startup should be short
• Rule #1: Always have a working system
• Rule #2: Do not attempt to future-proof your code
• Use the development stack to improve code quality

More Related Content

Viewers also liked

Are We Overdoing Silicon Valley?
Are We Overdoing Silicon Valley?Are We Overdoing Silicon Valley?
Are We Overdoing Silicon Valley?TetuanValley
 
Tetuan Valley Startup School V (Session 3)
Tetuan Valley Startup School V (Session 3)Tetuan Valley Startup School V (Session 3)
Tetuan Valley Startup School V (Session 3)TetuanValley
 
TVSS8 week 1 - 4. business model canvas
TVSS8 week 1 - 4. business model canvasTVSS8 week 1 - 4. business model canvas
TVSS8 week 1 - 4. business model canvasTetuanValley
 
TVSS8 week 1 - 1. introduction
TVSS8 week 1 - 1. introductionTVSS8 week 1 - 1. introduction
TVSS8 week 1 - 1. introductionTetuanValley
 
Battledeck for alex
Battledeck for alexBattledeck for alex
Battledeck for alexTetuanValley
 
Tetuan Valley Presentation
Tetuan Valley PresentationTetuan Valley Presentation
Tetuan Valley PresentationTetuanValley
 
TVSS8 week 1 - 2. the way of the startup
TVSS8 week 1 - 2. the way of the startupTVSS8 week 1 - 2. the way of the startup
TVSS8 week 1 - 2. the way of the startupTetuanValley
 
Tetuan Valley Startup School V (Intro)
Tetuan Valley Startup School V (Intro)Tetuan Valley Startup School V (Intro)
Tetuan Valley Startup School V (Intro)TetuanValley
 
Effective Presentations
Effective PresentationsEffective Presentations
Effective PresentationsTetuanValley
 

Viewers also liked (12)

Are We Overdoing Silicon Valley?
Are We Overdoing Silicon Valley?Are We Overdoing Silicon Valley?
Are We Overdoing Silicon Valley?
 
Tetuan Valley Startup School V (Session 3)
Tetuan Valley Startup School V (Session 3)Tetuan Valley Startup School V (Session 3)
Tetuan Valley Startup School V (Session 3)
 
TVSS8 week 1 - 4. business model canvas
TVSS8 week 1 - 4. business model canvasTVSS8 week 1 - 4. business model canvas
TVSS8 week 1 - 4. business model canvas
 
Battledeck5
Battledeck5Battledeck5
Battledeck5
 
TVSS8 week 1 - 1. introduction
TVSS8 week 1 - 1. introductionTVSS8 week 1 - 1. introduction
TVSS8 week 1 - 1. introduction
 
Battledeck for alex
Battledeck for alexBattledeck for alex
Battledeck for alex
 
Tetuan Valley Presentation
Tetuan Valley PresentationTetuan Valley Presentation
Tetuan Valley Presentation
 
Cil2012bd
Cil2012bdCil2012bd
Cil2012bd
 
Cherokee
CherokeeCherokee
Cherokee
 
TVSS8 week 1 - 2. the way of the startup
TVSS8 week 1 - 2. the way of the startupTVSS8 week 1 - 2. the way of the startup
TVSS8 week 1 - 2. the way of the startup
 
Tetuan Valley Startup School V (Intro)
Tetuan Valley Startup School V (Intro)Tetuan Valley Startup School V (Intro)
Tetuan Valley Startup School V (Intro)
 
Effective Presentations
Effective PresentationsEffective Presentations
Effective Presentations
 

Similar to Code quality

Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference CardSeapine Software
 
Expert Code Review best practices
Expert Code Review best practicesExpert Code Review best practices
Expert Code Review best practicesjeetendra mandal
 
Quality over Continuous Delivery
Quality over Continuous DeliveryQuality over Continuous Delivery
Quality over Continuous DeliveryRussell Allen
 
Topic production code
Topic production codeTopic production code
Topic production codeKavi Kumar
 
The Next Static Code Analysis Tool - Today and Tomorrow
The Next Static Code Analysis Tool - Today and TomorrowThe Next Static Code Analysis Tool - Today and Tomorrow
The Next Static Code Analysis Tool - Today and TomorrowM Firdaus Harun
 
[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
 
Issre2014 test defectprediction
Issre2014 test defectpredictionIssre2014 test defectprediction
Issre2014 test defectpredictionKim Herzig
 
Kudo codefest : Delivering High Quality Software Through Better Release Process
Kudo codefest : Delivering High Quality Software Through Better Release ProcessKudo codefest : Delivering High Quality Software Through Better Release Process
Kudo codefest : Delivering High Quality Software Through Better Release ProcessKudo Developers
 
Rtc2014 automate the_process_deliver_quality_ady_beleanu
Rtc2014 automate the_process_deliver_quality_ady_beleanuRtc2014 automate the_process_deliver_quality_ady_beleanu
Rtc2014 automate the_process_deliver_quality_ady_beleanuAdy Beleanu
 
Ady beleanu automate-theprocessdelivery
Ady beleanu   automate-theprocessdeliveryAdy beleanu   automate-theprocessdelivery
Ady beleanu automate-theprocessdeliveryRomania Testing
 
Defect Prevention & Predictive Analytics - XBOSoft Webinar
Defect Prevention & Predictive Analytics - XBOSoft WebinarDefect Prevention & Predictive Analytics - XBOSoft Webinar
Defect Prevention & Predictive Analytics - XBOSoft WebinarXBOSoft
 
Backward thinking design qa system for quality goals
Backward thinking   design qa system for quality goalsBackward thinking   design qa system for quality goals
Backward thinking design qa system for quality goalsgaoliang641
 
Unit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptxUnit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptxtaxegap762
 
Week 14 Unit Testing.pptx
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptxmianshafa
 
Understand release engineering
Understand release engineeringUnderstand release engineering
Understand release engineeringgaoliang641
 
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1Blue Elephant Consulting
 
Introduction to dev ops
Introduction to dev opsIntroduction to dev ops
Introduction to dev opsLen Bass
 

Similar to Code quality (20)

Code Reviews
Code ReviewsCode Reviews
Code Reviews
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference Card
 
Expert Code Review best practices
Expert Code Review best practicesExpert Code Review best practices
Expert Code Review best practices
 
Quality over Continuous Delivery
Quality over Continuous DeliveryQuality over Continuous Delivery
Quality over Continuous Delivery
 
Topic production code
Topic production codeTopic production code
Topic production code
 
Testing Times
Testing TimesTesting Times
Testing Times
 
The Next Static Code Analysis Tool - Today and Tomorrow
The Next Static Code Analysis Tool - Today and TomorrowThe Next Static Code Analysis Tool - Today and Tomorrow
The Next Static Code Analysis Tool - Today and Tomorrow
 
[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
 
Issre2014 test defectprediction
Issre2014 test defectpredictionIssre2014 test defectprediction
Issre2014 test defectprediction
 
Kudo codefest : Delivering High Quality Software Through Better Release Process
Kudo codefest : Delivering High Quality Software Through Better Release ProcessKudo codefest : Delivering High Quality Software Through Better Release Process
Kudo codefest : Delivering High Quality Software Through Better Release Process
 
Rtc2014 automate the_process_deliver_quality_ady_beleanu
Rtc2014 automate the_process_deliver_quality_ady_beleanuRtc2014 automate the_process_deliver_quality_ady_beleanu
Rtc2014 automate the_process_deliver_quality_ady_beleanu
 
Ady beleanu automate-theprocessdelivery
Ady beleanu   automate-theprocessdeliveryAdy beleanu   automate-theprocessdelivery
Ady beleanu automate-theprocessdelivery
 
Defect Prevention & Predictive Analytics - XBOSoft Webinar
Defect Prevention & Predictive Analytics - XBOSoft WebinarDefect Prevention & Predictive Analytics - XBOSoft Webinar
Defect Prevention & Predictive Analytics - XBOSoft Webinar
 
Backward thinking design qa system for quality goals
Backward thinking   design qa system for quality goalsBackward thinking   design qa system for quality goals
Backward thinking design qa system for quality goals
 
Unit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptxUnit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptx
 
Testing Plan
Testing PlanTesting Plan
Testing Plan
 
Week 14 Unit Testing.pptx
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptx
 
Understand release engineering
Understand release engineeringUnderstand release engineering
Understand release engineering
 
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1
 
Introduction to dev ops
Introduction to dev opsIntroduction to dev ops
Introduction to dev ops
 

More from TetuanValley

Tvss8 week 3 software in a startup
Tvss8 week 3   software in a startupTvss8 week 3   software in a startup
Tvss8 week 3 software in a startupTetuanValley
 
Fall 2012 week 3 Fin 101
Fall 2012 week 3 Fin 101Fall 2012 week 3 Fin 101
Fall 2012 week 3 Fin 101TetuanValley
 
Fall 2012 week 2 Biz Models and Metrics
Fall 2012 week 2 Biz Models and MetricsFall 2012 week 2 Biz Models and Metrics
Fall 2012 week 2 Biz Models and MetricsTetuanValley
 
Week 2 Biz Models and Metrics
Week 2 Biz Models and MetricsWeek 2 Biz Models and Metrics
Week 2 Biz Models and MetricsTetuanValley
 
TvSS7 Week 1 The way of the Startup
TvSS7 Week 1 The way of the StartupTvSS7 Week 1 The way of the Startup
TvSS7 Week 1 The way of the StartupTetuanValley
 
Tetuan Valley Startup School VI (Session 6)
Tetuan Valley Startup School VI (Session 6)Tetuan Valley Startup School VI (Session 6)
Tetuan Valley Startup School VI (Session 6)TetuanValley
 
Tetuan Valley Startup School VI (Session 4)
Tetuan Valley Startup School VI (Session 4)Tetuan Valley Startup School VI (Session 4)
Tetuan Valley Startup School VI (Session 4)TetuanValley
 
Tetuan Valley Startup School VI (Session 3)
Tetuan Valley Startup School VI (Session 3)Tetuan Valley Startup School VI (Session 3)
Tetuan Valley Startup School VI (Session 3)TetuanValley
 
Tetuan Valley Startup School VI (Session 1 - The Way of the Startup)
Tetuan Valley Startup School VI (Session 1 - The Way of the Startup)Tetuan Valley Startup School VI (Session 1 - The Way of the Startup)
Tetuan Valley Startup School VI (Session 1 - The Way of the Startup)TetuanValley
 
Tetuan Valley Startup School VI (Session 1 - Intro)
Tetuan Valley Startup School VI (Session 1 - Intro)Tetuan Valley Startup School VI (Session 1 - Intro)
Tetuan Valley Startup School VI (Session 1 - Intro)TetuanValley
 
Tetuan Valley Startup School V (Session 6)
Tetuan Valley Startup School V (Session 6)Tetuan Valley Startup School V (Session 6)
Tetuan Valley Startup School V (Session 6)TetuanValley
 
Tetuan Valley Startup School V (Session 4)
Tetuan Valley Startup School V (Session 4)Tetuan Valley Startup School V (Session 4)
Tetuan Valley Startup School V (Session 4)TetuanValley
 
Tetuan Valley Startup School V (Session 2)
Tetuan Valley Startup School V (Session 2)Tetuan Valley Startup School V (Session 2)
Tetuan Valley Startup School V (Session 2)TetuanValley
 
Tetuan Valley Startup School V (Session 1)
Tetuan Valley Startup School V (Session 1)Tetuan Valley Startup School V (Session 1)
Tetuan Valley Startup School V (Session 1)TetuanValley
 
TVSS Zaragoza Summit 2011 Battledeck 3
TVSS Zaragoza Summit 2011 Battledeck 3TVSS Zaragoza Summit 2011 Battledeck 3
TVSS Zaragoza Summit 2011 Battledeck 3TetuanValley
 
TVSS Zaragoza Summit 2011 Battledeck 2
TVSS Zaragoza Summit 2011 Battledeck 2TVSS Zaragoza Summit 2011 Battledeck 2
TVSS Zaragoza Summit 2011 Battledeck 2TetuanValley
 
TVSS Zaragoza Summit 2011 Battledeck 1
TVSS Zaragoza Summit 2011 Battledeck 1TVSS Zaragoza Summit 2011 Battledeck 1
TVSS Zaragoza Summit 2011 Battledeck 1TetuanValley
 
TVSS Zaragoza Summit 2011 Battledeck 4
TVSS Zaragoza Summit 2011 Battledeck 4TVSS Zaragoza Summit 2011 Battledeck 4
TVSS Zaragoza Summit 2011 Battledeck 4TetuanValley
 

More from TetuanValley (20)

Tvss8 week 3 software in a startup
Tvss8 week 3   software in a startupTvss8 week 3   software in a startup
Tvss8 week 3 software in a startup
 
Fall 2012 week 3 Fin 101
Fall 2012 week 3 Fin 101Fall 2012 week 3 Fin 101
Fall 2012 week 3 Fin 101
 
Tvss s12 w2
Tvss s12 w2Tvss s12 w2
Tvss s12 w2
 
Fall 2012 week 2 Biz Models and Metrics
Fall 2012 week 2 Biz Models and MetricsFall 2012 week 2 Biz Models and Metrics
Fall 2012 week 2 Biz Models and Metrics
 
Week 2 Biz Models and Metrics
Week 2 Biz Models and MetricsWeek 2 Biz Models and Metrics
Week 2 Biz Models and Metrics
 
TvSS7 Kickoff
TvSS7 KickoffTvSS7 Kickoff
TvSS7 Kickoff
 
TvSS7 Week 1 The way of the Startup
TvSS7 Week 1 The way of the StartupTvSS7 Week 1 The way of the Startup
TvSS7 Week 1 The way of the Startup
 
Tetuan Valley Startup School VI (Session 6)
Tetuan Valley Startup School VI (Session 6)Tetuan Valley Startup School VI (Session 6)
Tetuan Valley Startup School VI (Session 6)
 
Tetuan Valley Startup School VI (Session 4)
Tetuan Valley Startup School VI (Session 4)Tetuan Valley Startup School VI (Session 4)
Tetuan Valley Startup School VI (Session 4)
 
Tetuan Valley Startup School VI (Session 3)
Tetuan Valley Startup School VI (Session 3)Tetuan Valley Startup School VI (Session 3)
Tetuan Valley Startup School VI (Session 3)
 
Tetuan Valley Startup School VI (Session 1 - The Way of the Startup)
Tetuan Valley Startup School VI (Session 1 - The Way of the Startup)Tetuan Valley Startup School VI (Session 1 - The Way of the Startup)
Tetuan Valley Startup School VI (Session 1 - The Way of the Startup)
 
Tetuan Valley Startup School VI (Session 1 - Intro)
Tetuan Valley Startup School VI (Session 1 - Intro)Tetuan Valley Startup School VI (Session 1 - Intro)
Tetuan Valley Startup School VI (Session 1 - Intro)
 
Tetuan Valley Startup School V (Session 6)
Tetuan Valley Startup School V (Session 6)Tetuan Valley Startup School V (Session 6)
Tetuan Valley Startup School V (Session 6)
 
Tetuan Valley Startup School V (Session 4)
Tetuan Valley Startup School V (Session 4)Tetuan Valley Startup School V (Session 4)
Tetuan Valley Startup School V (Session 4)
 
Tetuan Valley Startup School V (Session 2)
Tetuan Valley Startup School V (Session 2)Tetuan Valley Startup School V (Session 2)
Tetuan Valley Startup School V (Session 2)
 
Tetuan Valley Startup School V (Session 1)
Tetuan Valley Startup School V (Session 1)Tetuan Valley Startup School V (Session 1)
Tetuan Valley Startup School V (Session 1)
 
TVSS Zaragoza Summit 2011 Battledeck 3
TVSS Zaragoza Summit 2011 Battledeck 3TVSS Zaragoza Summit 2011 Battledeck 3
TVSS Zaragoza Summit 2011 Battledeck 3
 
TVSS Zaragoza Summit 2011 Battledeck 2
TVSS Zaragoza Summit 2011 Battledeck 2TVSS Zaragoza Summit 2011 Battledeck 2
TVSS Zaragoza Summit 2011 Battledeck 2
 
TVSS Zaragoza Summit 2011 Battledeck 1
TVSS Zaragoza Summit 2011 Battledeck 1TVSS Zaragoza Summit 2011 Battledeck 1
TVSS Zaragoza Summit 2011 Battledeck 1
 
TVSS Zaragoza Summit 2011 Battledeck 4
TVSS Zaragoza Summit 2011 Battledeck 4TVSS Zaragoza Summit 2011 Battledeck 4
TVSS Zaragoza Summit 2011 Battledeck 4
 

Recently uploaded

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Code quality

Editor's Notes

  1. German WWII Tiger Tank at the Bovington Tank Museum in the UK.
  2. You want an automated system to perform some behavior.Software is the description of that behavior, using specifications (code) that can be processed by the automated system.Software is an expression of what you want the automated system to do.Thus, software is an expression of your intention.== EXTRA ==A software system is a collection of formal specifications.A formal specification conforms to a formal specification language.• well defined limit on complexity• unambiguous translation semantics (syntax)• unambiguous execution semanticsSoftware is difficult because formal specification languages are cognitively dissonant from spoke languages.(Many lawyers effectively “program” using spoken languages by attempting to eliminate ambiguity.)
  3. A defect is an inconsistency between your software and your intention.Defects may cause problems (symptoms) when executing the software:• crash• hang• incorrect outputA symptom is indicative of one or more defects.A symptom is not itself a defect.Example: A hang is a symptom. Acquiring locks in an order that can cause a deadlock is a defect.
  4. A violation is an inconsistency between your software and how an “ideal” developer would have written it.A “violation of best practices”.Each technology (language, library, etc.) has its own set of best practices.Best practices are recommended constraints on the use of a technology, constraints that are not part of the definition of the technology.Violations may cause problems when maintaining the software:• confusion (you don’t know what the software does)• misunderstanding (you think you know what the software does, but it does something else)Example: Acquiring locks in an order that is inconsistent with their total ordering is a violation.Unlike defects, which may have symptoms, violations are not visible to stakeholders.== EXTRA ==Violations may be subjective (and contentious), since they may simply be a matter of style; e.g., “the nested statement of an ‘if’ statement must be a block”.
  5. Code quality is determined by the combined lack of defects and violations (maximize the green area).A defect is not necessarily a violation, and vice versa.Code quality is considered worse when the combined severity of defects and violations is higher.Code quality is considered better when the combined severity of defects and violations is lower.Code quality is determined by the severity of defects and voliations, not the number of defects and violations.The severity of a defect or violation corresponds to its maximum potential cost, not its actual cost.== EXTRA ==Messy software can be free of defects (but probably isn’t).Buggy software can be free of violations (but probably isn’t).Virtually no software system is free of defects.Virtually no software system is free of violations.
  6. Pseudo-functions:• quantities are not all independent• quantities are subjective estimatesFollowing processes that help to avoid introducing defects has an operational cost.Example: TDD.Following processes that help to avoid introducing violations has an operational cost.Example: Adhering to naming conventions.Processes that help to avoid introducing violations theoretically also help to avoid introducing defects; e.g., “define a total ordering for locks, and acquire locks according to the total ordering”.Removing a defect has a cost, which can be high. (Think Dr. House.)• detect the symptom• diagnose the probably causes of the symptom• identify the defect (or defects)• remove the defect (or defects)Removing a violation has a cost.Removing a defect or a violation is a code modification.Any code modification can potentially introduce defects and violations.The presence of violations increases the probability of introducting defects and violations.The presence of a defect has a cost only if it causes a problem when executing the software.The presence of a violation has a cost only if it causes a problem when maintaining the software.A symptom of a defect has a cost.== EXTRA ==c(Sd) = ∑(p(si)*c(si)), each si caused by dca(Dv) = ∑(pa(di)*c(di)), each di introduced due to vca(Vv) = ∑(pa(vi)*c(vi)) , each vi introduced due to vcr(DD) = ∑(pr(di)*c(di)), each di avoidedcr(DV) = ∑(pr(di)*c(di)) , each di avoidedcr(VV) = ∑(pr(vi)*c(vi)) , each vi avoided
  7. Everything has a cost.• following processes that help to avoid introducing defects/violations in the code• removing defects/violations from the code• leaving defects/violations in the codeCosts are ultimately:• the engineering effort required to avoid introducing defects/violations • the engineering effort required to remove defects/violations• the problems caused by the symptoms of defectsRemoving a defect or a violation is a code modification.Any code modification can potentially introduce defects and violations.The presence of violations increases the probability of introducting defects and violations.The maximum potential cost of a defect is limited by the worst combination of problems that can be caused by the symptoms of the defect; this cost can be high.The maximum potential cost of a violation is theoretically unlimited (though intuitively moderated), since the number of times the relevant code can be modified is unlimited.Consequently, violations have a disproportionate effect on code quality.However, the actual cost of a violation is limited by an engineering timeframe, which limits the number of times the relevant code can be modified.
  8. Engineering is the maximizing of net value over a timeframe with respect to building and maintaining something.Question: Should a startup be targeting a longer timeframe or a shorter timeframe?Processes to avoid introducing defects should be followed if the cost of the processes is less than the cost of defects that would otherwise be introduced.A defect should be removed if the cost of removing the defect is less than the cost of the defect.Over a longer timeframe, the cost of a defect is lower.• the cost of the defect diminishes with respect to cumulative functionalityOver a shorter timeframe, the cost of a defect is higher.• the cost of the defect is high with respect to initial functionalityProcesses to avoid introducing violations should be followed if the cost of the processes is less than the cost of violations that would otherwise be introduced.• When learning a technology, the cost of the processes can be high.A violation should be removed if the cost of removing the violation is less than the cost of the violation.Over a longer timeframe, the cost of a violation is higher.• usually remove violations• more likely to follow processes to avoid introducing violationsOver a shorter timeframe, the cost of a violation is lower, even though it has the same effect on code quality.• seldom remove violations• less likely to follow processes to avoid introducing violationsOver a longer timeframe, violations are more of a consideration than defects. This results in higher code quality.Over a shorter timeframe, defects are more of a consideration than violations, even though this results in lower code quality because violations have a disproportionate effect on code quality.== EXTRA ==Architecting, on the other hand, is the maximizing of experience with respect to building and maintaining something.• Architect: Determines what should be built in order to maximize experience.• Engineering: Determines how it should be built in order to maximize net value.
  9. Working code corresponds to a lack of defects.Clean code corresponds to a lack of violations.It’s probably safe to assume the scale of both axes is logarithmic.Avoiding defects/violations, and removing defects/violations, both contribute to engineering effort.
  10. If you do not have a working system, you might as well not have a system.Your stakeholders don’t care how hard you worked on almost finishing a feature.
  11. Over-engineering occurs when the engineering effort goes beyond what is necessary for the timeframe, resulting in a suboptimal net value.Return to the Tiger Tank.• German WWII tanks were superior to Russian WWII tanks.• German WWII tanks were over-engineered because they didn’t respect the timeframe; they could not be manufactured quickly enough, thus reducing their net value.With respect to features:• Concentrate on the immediate need.• The later need will probably change and you will have reduced net value by wasting engineering effort.• In particular, this is a problem with engineering for performance before testing the performance, or engineering for scale before needing to scale.With respect to defects/violations:• Concentrate on the shorter timeframe.• The longer timeframe will probably change and you will have reduced net value by wasting engineering effort.• Follow processes to avoid introducing defects/violations only if the cost of doing so is less than the cost of defects/violations that would otherwise be introduced.• Remove a defect/violation only if the cost of doing so is less than the cost of the defect/violation.•If your code works but your code quality is shit, get over it.• If your code is pretty, you are spending too much time doing things that stakeholders don’t care about.•Quit dicking around with making the code pretty, because you’re going to break it (see rule #1).
  12. Problem: You don’t want your code quality to be shit (as shitty).Eventually (hopefully), the cost of violations will go up as you consider longer timeframes.Eventually (hopefully), you will be in a position to sell and your code quality will become part of your company’s valuation.Solution: Improve code quality by using techniques that have low cost.The ammortized cost must be lower than the cost of violations, which is already low for the shorter timeframe.• familiarity with best practices• discipline• automation with low configuration and maintenance costsAdd infrastructure to your development stack in order to encourage discipline and to automate.
  13. Know and understand the best practices for relevant technologies.Your familiarity with the best practices of a technology should be proportional to your use of the technology.Learn and apply best practices as you move forward.Do not go backward to apply newly learned best practices.Sometimes it is cheaper to hire.
  14. Be disciplined about following a software development process.A software development process aids coordination among developers and helps to eliminate confusion and consequential mistakes.If you do not currently follow a software development process, start. Now.Integrate the software development process with your business process.I recommend Scrum for development teams of 5-7 people.I recommend a lean version of Scrum for development teams of 3-5 people.I recommend “whatever works” for development teams of 1-2 people.
  15. The best way to improve your code quality is to use someone else’s code.Prefer an existing technology when available.• check the license• check the communityThe time to find+learn+integrate an existing technology is usually less than building it yourself.Even if the time is greater, an existing technology is likely to be more robust and will thus have a lower net cost.
  16. Clean up your mess.Apply best practices to existing code while writing related new code.Large changes can be implemented piecemeal, or in rare cases using an experimental source branch (with the help of version control).Confidence in refactoring is bolstered by tests; the more tests, the higher the confidence.Immediately kill a new hire who proposes sweeping changes to the code.== EXTRA ==A rewrite of working software is almost never necessary.A rewrite is necessary only when the average cost of a modification is a net loss.
  17. If you do not currently use a version control system, start. Now.Version control facilitates rolling back unwanted modifications.Version control aids coordination among developers and helps to eliminate confusion and consequential mistakes.Prefer a hosted solution:• outstanding availability (even Pingdom uses github; can even work offline with git)• better security and privacy than you can probably maintain• transparent backupsI recommend github. Start by splurging for a low-end paid account.
  18. Perform analyses of your code.Many freeware tools exist, particularly in the Java space.• If you write Java, you should at least use FindBugs, Static analysis (analyzing the formal specifications that comprise the software system):• prefer tools that attempt to find serious violations (that is, violations that are likely defects or are likely to cause defects)• style checkers can be difficult to configure and may produce many false negativesDynamic analysis (analyzing the processing of the formal specifications that comprise the software system):• testing suite (at least unit testing and regression testing)• testing code coverage• concurrency profiling• performance profiling (especially for mobile apps)
  19. Automate your build.Build management also automates analyses that can find defects and serious violations.Local builds (using tools such as make, Ant, or Maven):• include “fast” analyses• exclude “slow” analyses• require before commit to version controlRemote builds (contiguous integration, using tools such as CruiseControl, Hudson, or Continuum):• include all anayses• require after commit to version control
  20. Be disciplined about recording symptoms of defects and other issues.Issue tracking centralizes knowledge of problems and even requests.Issue tracking aids coordination among all personnel and helps to eliminate confusion and consequential mistakes.Train non-development personnel to use the issue tracking system.Limit the issue tracking system to the software system (and related artifacts, like user documentation).• The issue tracking system is not the place to record that the build server is too slow.Integrate the issue tracking system with the planning tool of your software process, if possible.