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

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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
🐬 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
 
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
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
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
 
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
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Recently uploaded (20)

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...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.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 🐘
 
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
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

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