SlideShare a Scribd company logo
1 of 13
The Naïve Bayes approach to code reviews Mark Needham (Markeshwa) Ashwin Raghav (Ashley)
 
Why don’t we use code metrics to do code reviews?
Why don’t we use code metrics to do code reviews? We need a human to do it - quality of code isn’t only about code metrics, it’s a subjective thing
Why don’t we use code metrics to do code reviews? We need a human to do it - quality of code isn’t only about code metrics, it’s a subjective thing But what if we based it on the outcome of code reviews that have already been done? It’d be more consistent and less effort!
Why don’t we use code metrics to do code reviews? We need a human to do it - quality of code isn’t only about code metrics, it’s a subjective thing But what if we based it on the outcome of code reviews that have already been done? It’d be more consistent and less effort! Let’s do it!
SIQ Initiative “ We think that we can help people better understand the internal quality of software.  We plan to do this by employing visualisation techniques for metrics and other characteristics of software.  Our approach is reflective and we want to evolve our visualisations towards a commonly useful set.”
Erik Doernenburg
Notes C API Erik’s shell script Metrics  + code Mercurial  Repository Java NCSS Code Reviews
Metrics + code Some sort of algorithm Would a code review be passed/pursued?
Naïve Bayes Classifier “ A simple probabilistic classifier based on applying Bayes' theorem (from Bayesian statistics) with strong (naive) independence assumptions. In simple terms, a naive Bayes classifier assumes that the presence (or absence) of a particular feature of a class is unrelated to the presence (or absence) of any other feature.”
Metrics + class Bayes Algorithm Training
Metrics + class Bayes Algorithm Training Metrics Bayes Algorithm Predicting Class

More Related Content

Similar to Reviewing Code- The Naive Bayes Way

DevSecOps The Evolution of DevOps
DevSecOps The Evolution of DevOpsDevSecOps The Evolution of DevOps
DevSecOps The Evolution of DevOpsMichael Man
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit TestingShaun Abram
 
Agile Mumbai 2020 Conference | Value of DevOps - Journey from Automation to N...
Agile Mumbai 2020 Conference | Value of DevOps - Journey from Automation to N...Agile Mumbai 2020 Conference | Value of DevOps - Journey from Automation to N...
Agile Mumbai 2020 Conference | Value of DevOps - Journey from Automation to N...AgileNetwork
 
How to become a DevOps
How to become a DevOpsHow to become a DevOps
How to become a DevOpsDaniel Pokusa
 
11 best practices_for_peer_code_review
11 best practices_for_peer_code_review11 best practices_for_peer_code_review
11 best practices_for_peer_code_reviewSmartBear Software
 
TorontoRb Intro to BDD
TorontoRb   Intro to BDDTorontoRb   Intro to BDD
TorontoRb Intro to BDDnunick
 
Information Needs for Software Development Analytics
Information Needs for Software Development AnalyticsInformation Needs for Software Development Analytics
Information Needs for Software Development AnalyticsRay Buse
 
Agnitio: its static analysis, but not as we know it
Agnitio: its static analysis, but not as we know itAgnitio: its static analysis, but not as we know it
Agnitio: its static analysis, but not as we know itSecurity BSides London
 
DevSecops: Defined, tools, characteristics, tools, frameworks, benefits and c...
DevSecops: Defined, tools, characteristics, tools, frameworks, benefits and c...DevSecops: Defined, tools, characteristics, tools, frameworks, benefits and c...
DevSecops: Defined, tools, characteristics, tools, frameworks, benefits and c...Mohamed Nizzad
 
Automating good coding practices
Automating good coding practicesAutomating good coding practices
Automating good coding practicesKevin Peterson
 
Hawkeye case financial na1
Hawkeye case financial na1Hawkeye case financial na1
Hawkeye case financial na1Roy Masrani
 
WSO2Con EU 2015: API Readiness: Is Your API Ready for Primetime?
WSO2Con EU 2015: API Readiness: Is Your API Ready for Primetime?WSO2Con EU 2015: API Readiness: Is Your API Ready for Primetime?
WSO2Con EU 2015: API Readiness: Is Your API Ready for Primetime?WSO2
 
CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...Sergii Shmarkatiuk
 
CI/CD Pipelines for Your Infrastructure...as Code!
CI/CD Pipelines for Your Infrastructure...as Code!CI/CD Pipelines for Your Infrastructure...as Code!
CI/CD Pipelines for Your Infrastructure...as Code!Harvey Bendaña
 
Caring About Code Quality (Clean Code, GRASP, Effective Java, Design Pattern)
Caring About Code Quality (Clean Code, GRASP, Effective Java, Design Pattern)Caring About Code Quality (Clean Code, GRASP, Effective Java, Design Pattern)
Caring About Code Quality (Clean Code, GRASP, Effective Java, Design Pattern)El Mahdi Benzekri
 

Similar to Reviewing Code- The Naive Bayes Way (20)

Coding Naked
Coding NakedCoding Naked
Coding Naked
 
DevSecOps The Evolution of DevOps
DevSecOps The Evolution of DevOpsDevSecOps The Evolution of DevOps
DevSecOps The Evolution of DevOps
 
Introduction to DevSecOps
Introduction to DevSecOpsIntroduction to DevSecOps
Introduction to DevSecOps
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit Testing
 
Agile Mumbai 2020 Conference | Value of DevOps - Journey from Automation to N...
Agile Mumbai 2020 Conference | Value of DevOps - Journey from Automation to N...Agile Mumbai 2020 Conference | Value of DevOps - Journey from Automation to N...
Agile Mumbai 2020 Conference | Value of DevOps - Journey from Automation to N...
 
My life as a cyborg
My life as a cyborg My life as a cyborg
My life as a cyborg
 
How to become a DevOps
How to become a DevOpsHow to become a DevOps
How to become a DevOps
 
11 best practices_for_peer_code_review
11 best practices_for_peer_code_review11 best practices_for_peer_code_review
11 best practices_for_peer_code_review
 
TorontoRb Intro to BDD
TorontoRb   Intro to BDDTorontoRb   Intro to BDD
TorontoRb Intro to BDD
 
Information Needs for Software Development Analytics
Information Needs for Software Development AnalyticsInformation Needs for Software Development Analytics
Information Needs for Software Development Analytics
 
Agnitio: its static analysis, but not as we know it
Agnitio: its static analysis, but not as we know itAgnitio: its static analysis, but not as we know it
Agnitio: its static analysis, but not as we know it
 
Continuous testing the new must have skill of tomorrow's tech leaders
Continuous testing  the new must have skill of tomorrow's tech leadersContinuous testing  the new must have skill of tomorrow's tech leaders
Continuous testing the new must have skill of tomorrow's tech leaders
 
DevSecops: Defined, tools, characteristics, tools, frameworks, benefits and c...
DevSecops: Defined, tools, characteristics, tools, frameworks, benefits and c...DevSecops: Defined, tools, characteristics, tools, frameworks, benefits and c...
DevSecops: Defined, tools, characteristics, tools, frameworks, benefits and c...
 
Automating good coding practices
Automating good coding practicesAutomating good coding practices
Automating good coding practices
 
JavaScript Architectures
JavaScript ArchitecturesJavaScript Architectures
JavaScript Architectures
 
Hawkeye case financial na1
Hawkeye case financial na1Hawkeye case financial na1
Hawkeye case financial na1
 
WSO2Con EU 2015: API Readiness: Is Your API Ready for Primetime?
WSO2Con EU 2015: API Readiness: Is Your API Ready for Primetime?WSO2Con EU 2015: API Readiness: Is Your API Ready for Primetime?
WSO2Con EU 2015: API Readiness: Is Your API Ready for Primetime?
 
CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...
 
CI/CD Pipelines for Your Infrastructure...as Code!
CI/CD Pipelines for Your Infrastructure...as Code!CI/CD Pipelines for Your Infrastructure...as Code!
CI/CD Pipelines for Your Infrastructure...as Code!
 
Caring About Code Quality (Clean Code, GRASP, Effective Java, Design Pattern)
Caring About Code Quality (Clean Code, GRASP, Effective Java, Design Pattern)Caring About Code Quality (Clean Code, GRASP, Effective Java, Design Pattern)
Caring About Code Quality (Clean Code, GRASP, Effective Java, Design Pattern)
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

Reviewing Code- The Naive Bayes Way

  • 1. The Naïve Bayes approach to code reviews Mark Needham (Markeshwa) Ashwin Raghav (Ashley)
  • 2.  
  • 3. Why don’t we use code metrics to do code reviews?
  • 4. Why don’t we use code metrics to do code reviews? We need a human to do it - quality of code isn’t only about code metrics, it’s a subjective thing
  • 5. Why don’t we use code metrics to do code reviews? We need a human to do it - quality of code isn’t only about code metrics, it’s a subjective thing But what if we based it on the outcome of code reviews that have already been done? It’d be more consistent and less effort!
  • 6. Why don’t we use code metrics to do code reviews? We need a human to do it - quality of code isn’t only about code metrics, it’s a subjective thing But what if we based it on the outcome of code reviews that have already been done? It’d be more consistent and less effort! Let’s do it!
  • 7. SIQ Initiative “ We think that we can help people better understand the internal quality of software. We plan to do this by employing visualisation techniques for metrics and other characteristics of software. Our approach is reflective and we want to evolve our visualisations towards a commonly useful set.”
  • 9. Notes C API Erik’s shell script Metrics + code Mercurial Repository Java NCSS Code Reviews
  • 10. Metrics + code Some sort of algorithm Would a code review be passed/pursued?
  • 11. Naïve Bayes Classifier “ A simple probabilistic classifier based on applying Bayes' theorem (from Bayesian statistics) with strong (naive) independence assumptions. In simple terms, a naive Bayes classifier assumes that the presence (or absence) of a particular feature of a class is unrelated to the presence (or absence) of any other feature.”
  • 12. Metrics + class Bayes Algorithm Training
  • 13. Metrics + class Bayes Algorithm Training Metrics Bayes Algorithm Predicting Class