SlideShare une entreprise Scribd logo
1  sur  39
Code Quality Paulin Solutions LLC
Paulin Solutions LLC ,[object Object],[object Object],[object Object],[object Object]
Topics ,[object Object],[object Object],[object Object],[object Object],[object Object]
Why Bother?
What your client sees
What you see
The Psychology of Computer Programming  ,[object Object],[object Object],[object Object]
Why would you do this to another Human Being!?!?
What is Code Quality? ,[object Object]
Good or Bad? protected   void  doGet(HttpServletRequest req, HttpServletResponse resp)  throws  ServletException, IOException { if (req !=  null ) { if (req.getParameter( "type" ) !=  null ) { String reqType =  req.getParameter( "type" ); if (reqType ==  "FOO" ) //Do something }}}
Good or Bad protected   void  doGet(HttpServletRequest req, HttpServletResponse resp)  throws  ServletException, IOException { String type = req.getParameter( "type" ); if ( FORWARD_TYPE .equalsIgnoreCase(type)) { countForward(req, resp); } else   if ( BACKWARD_TYPE .equalsIgnoreCase(type)) { countBackwards(req, resp); } else { throw   new  RuntimeException( "This type is not  supported." ); }
Bad Code Smells!
I've learned to live with the smell why else should I care?
Reduce Bugs
Lower Maintenance Effort
It's Easier to Extend Good Code
Create Good Code Karma
Give your client the warm and fuzzy feeling. Quality Code = Trust
Components of Code Quality
Good Code Should Work! Functional/Non-Functional
Components should be testable
Hard to Test ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Easy to test ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rule of thumb for writing testable code...
Practice good design!
Good code should be easy to maintain
Readable
Stay DRY
Avoid Excessive Complexity
Ummmmmm that sounds like a lot of work!
Making sure it works
Benefits of Functional Test Frameworks ,[object Object],[object Object],[object Object]
Making sure it's tested ,[object Object],[object Object],[object Object],[object Object],[object Object]
Benefits of Code Coverage Tools ,[object Object],[object Object],[object Object]
Making sure it's maintainable ,[object Object],[object Object],[object Object]
Benefits of Static Analysis ,[object Object],[object Object],[object Object]
Putting it all together
Benefits of Sonar ,[object Object],[object Object],[object Object],[object Object]
Parting thoughts Don't write crappy code. I know where you live.

Contenu connexe

Tendances

Tendances (20)

Karate for Complex Web-Service API Testing by Peter Thomas
Karate for Complex Web-Service API Testing by Peter ThomasKarate for Complex Web-Service API Testing by Peter Thomas
Karate for Complex Web-Service API Testing by Peter Thomas
 
Clean Code with Java 8 - Functional Patterns and Best Practices
Clean Code with Java 8 - Functional Patterns and Best PracticesClean Code with Java 8 - Functional Patterns and Best Practices
Clean Code with Java 8 - Functional Patterns and Best Practices
 
Automate right start from API
Automate right start from APIAutomate right start from API
Automate right start from API
 
Grading the Quality of Selenium Tests
Grading the Quality of Selenium TestsGrading the Quality of Selenium Tests
Grading the Quality of Selenium Tests
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance Testing
 
Whys and Hows of Automation
Whys and Hows of AutomationWhys and Hows of Automation
Whys and Hows of Automation
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
DDD with Behat
DDD with BehatDDD with Behat
DDD with Behat
 
Selenium Deep Dive
Selenium Deep DiveSelenium Deep Dive
Selenium Deep Dive
 
Angular Unit Testing from the Trenches
Angular Unit Testing from the TrenchesAngular Unit Testing from the Trenches
Angular Unit Testing from the Trenches
 
Continuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatlingContinuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatling
 
Don't Be Mocked by your Mocks - Best Practices using Mocks
Don't Be Mocked by your Mocks - Best Practices using MocksDon't Be Mocked by your Mocks - Best Practices using Mocks
Don't Be Mocked by your Mocks - Best Practices using Mocks
 
BDD with Behat and Symfony2
BDD with Behat and Symfony2BDD with Behat and Symfony2
BDD with Behat and Symfony2
 
Automated testing for client-side - Adam Klein, 500 Tech
Automated testing for client-side - Adam Klein, 500 TechAutomated testing for client-side - Adam Klein, 500 Tech
Automated testing for client-side - Adam Klein, 500 Tech
 
Clean tests good tests
Clean tests   good testsClean tests   good tests
Clean tests good tests
 
Selenium + Specflow
Selenium + SpecflowSelenium + Specflow
Selenium + Specflow
 
5 levels of api test automation
5 levels of api test automation5 levels of api test automation
5 levels of api test automation
 
Automate test, tools, advantages, and disadvantages
Automate test, tools, advantages,  and disadvantagesAutomate test, tools, advantages,  and disadvantages
Automate test, tools, advantages, and disadvantages
 
Build Reliable Asynchronous Code with Queueable Apex
Build Reliable Asynchronous Code with Queueable ApexBuild Reliable Asynchronous Code with Queueable Apex
Build Reliable Asynchronous Code with Queueable Apex
 
Automated Acceptance Tests in .NET
Automated Acceptance Tests in .NETAutomated Acceptance Tests in .NET
Automated Acceptance Tests in .NET
 

En vedette

Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)
David Stockton
 
Entrepreneur's World #7
Entrepreneur's World #7Entrepreneur's World #7
Entrepreneur's World #7
Lexvalorem
 
Портфолио агентства C4group
Портфолио агентства C4groupПортфолио агентства C4group
Портфолио агентства C4group
alladvertising
 
Регионы.Direct от Каванги
Регионы.Direct от КавангиРегионы.Direct от Каванги
Регионы.Direct от Каванги
alladvertising
 
Investiguem
InvestiguemInvestiguem
Investiguem
cspigros
 
Nina carlsen catching fire
Nina carlsen catching fireNina carlsen catching fire
Nina carlsen catching fire
Rochesspp
 

En vedette (20)

Tailor-Made Tax Practice Quality Controls presented at the West Michigan Tax ...
Tailor-Made Tax Practice Quality Controls presented at the West Michigan Tax ...Tailor-Made Tax Practice Quality Controls presented at the West Michigan Tax ...
Tailor-Made Tax Practice Quality Controls presented at the West Michigan Tax ...
 
Caring about Code Quality
Caring about Code QualityCaring about Code Quality
Caring about Code Quality
 
Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)
 
Code quality as a built-in process
Code quality as a built-in processCode quality as a built-in process
Code quality as a built-in process
 
Code Review
Code ReviewCode Review
Code Review
 
Entrepreneur's World #7
Entrepreneur's World #7Entrepreneur's World #7
Entrepreneur's World #7
 
Портфолио агентства C4group
Портфолио агентства C4groupПортфолио агентства C4group
Портфолио агентства C4group
 
Регионы.Direct от Каванги
Регионы.Direct от КавангиРегионы.Direct от Каванги
Регионы.Direct от Каванги
 
Indices 19 aug2013063506
Indices 19 aug2013063506Indices 19 aug2013063506
Indices 19 aug2013063506
 
Indices 04 sep2013051634
Indices 04 sep2013051634Indices 04 sep2013051634
Indices 04 sep2013051634
 
Connected Educators
Connected EducatorsConnected Educators
Connected Educators
 
Indices 10 apr2013054707
Indices 10 apr2013054707Indices 10 apr2013054707
Indices 10 apr2013054707
 
Presentación2 (2)
Presentación2 (2)Presentación2 (2)
Presentación2 (2)
 
Indices 25 apr2013071117
Indices 25 apr2013071117Indices 25 apr2013071117
Indices 25 apr2013071117
 
Publishing Trend @ Bologna Children Book Fair
Publishing Trend @ Bologna Children Book FairPublishing Trend @ Bologna Children Book Fair
Publishing Trend @ Bologna Children Book Fair
 
Indices 24 oct2013051811
Indices 24 oct2013051811Indices 24 oct2013051811
Indices 24 oct2013051811
 
Investiguem
InvestiguemInvestiguem
Investiguem
 
Nina carlsen catching fire
Nina carlsen catching fireNina carlsen catching fire
Nina carlsen catching fire
 
Indices 18 oct2013052548
Indices 18 oct2013052548Indices 18 oct2013052548
Indices 18 oct2013052548
 
Indices 22 aug2013061222
Indices 22 aug2013061222Indices 22 aug2013061222
Indices 22 aug2013061222
 

Similaire à Code Quality Practice and Tools

Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
Ran Mizrahi
 

Similaire à Code Quality Practice and Tools (20)

Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScript
 
Getting Started With Testing
Getting Started With TestingGetting Started With Testing
Getting Started With Testing
 
UI Testing
UI TestingUI Testing
UI Testing
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
 
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developersjBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
 
Android the Agile way
Android the Agile wayAndroid the Agile way
Android the Agile way
 
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroJoomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
 
Building unit tests correctly with visual studio 2013
Building unit tests correctly with visual studio 2013Building unit tests correctly with visual studio 2013
Building unit tests correctly with visual studio 2013
 
Coding Naked 2023
Coding Naked 2023Coding Naked 2023
Coding Naked 2023
 
AAA Automated Testing
AAA Automated TestingAAA Automated Testing
AAA Automated Testing
 
Automated Frontend Testing
Automated Frontend TestingAutomated Frontend Testing
Automated Frontend Testing
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture
 
SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web Apps
 
Java script unit testing
Java script unit testingJava script unit testing
Java script unit testing
 
Apex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsApex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong Foundations
 
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
 
Testing ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETTesting ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NET
 

Plus de Bob Paulin

Continuous delivery with Gradle
Continuous delivery with GradleContinuous delivery with Gradle
Continuous delivery with Gradle
Bob Paulin
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
Bob Paulin
 

Plus de Bob Paulin (12)

Fundraising At Apache
Fundraising At ApacheFundraising At Apache
Fundraising At Apache
 
Open Development When You're Not in Charge
Open Development When You're Not in ChargeOpen Development When You're Not in Charge
Open Development When You're Not in Charge
 
Apache When You're Not in Charge
Apache When You're Not in ChargeApache When You're Not in Charge
Apache When You're Not in Charge
 
Modular Open Source in Java for Now and Later
Modular Open Source in Java for Now and LaterModular Open Source in Java for Now and Later
Modular Open Source in Java for Now and Later
 
Microservice Networking in Anger
Microservice Networking in AngerMicroservice Networking in Anger
Microservice Networking in Anger
 
User Groups: The Gateway to Apache
User Groups: The Gateway to ApacheUser Groups: The Gateway to Apache
User Groups: The Gateway to Apache
 
What's My Modularity
What's My ModularityWhat's My Modularity
What's My Modularity
 
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEMDo more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
 
Adding Modularity Afterward with Embedded OSGi
Adding Modularity Afterward with Embedded OSGiAdding Modularity Afterward with Embedded OSGi
Adding Modularity Afterward with Embedded OSGi
 
Continuous delivery with Gradle
Continuous delivery with GradleContinuous delivery with Gradle
Continuous delivery with Gradle
 
Frontend 'vs' Backend Getting the Right Mix
Frontend 'vs' Backend   Getting the Right MixFrontend 'vs' Backend   Getting the Right Mix
Frontend 'vs' Backend Getting the Right Mix
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

Code Quality Practice and Tools

Notes de l'éditeur

  1. So often people look at this as an oxymoron. As long as it works isn't that enough. Well those of us that have been doing this long enough know there's more to delivery than just getting the code to work. We all seemed to know what bad code looks like but what about good code. It's harder to nail down a generic definition that's useful in all cases but we will try anyways.
  2. Long Methods Tight Coupling Concrete Implementation Excessive Code Branching
  3. Short Methods Loose Coupling Abstract Implementation Minimal Code Branching