SlideShare uma empresa Scribd logo
1 de 10
Code Quality
François Camus
Why?
 Maintenance is what is most expensive in software life
time
 Once in production it is harder to apply fixes
 Need to ensure best code quality as we don't know what
changes will need to be made in the future and who will
be making those changes
 Better to spend a bit more time now to make it readable
and understandable by anyone, than struggle later with
the risk of wasting a lot more time, or even having to re-
write
Clean Code Bible
Some Clean Code Principles
 Boy Scout rule
 "Leave the campground cleaner than you found it."
 DRY: Don't Repeat Yourself
 To avoid code duplication
 Dependency Injection pattern...
 SRP: Single Responsibility Principles
 "Functions should do one thing. They should do it well. They
should do it only." - Robert C. Martin
 Other interesting principles (SOLID...)
 http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
Famous Quotes
 "Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live" - Rick Osborne
 "Any fool can write code that a computer can understand. Good
programmers write code that humans can understand." - Martin Fowler
 "When you feel the need to write a comment, first try to refactor the
code so that any comment becomes superfluous" - Martin Fowler
 Clean Code Quotes by Robert C. Martin
 "Later equals never."
 "The only way to make the deadline -- the only way to go fast -- is to keep the
code as clean as possible at all times."
 "Clean code always looks like it was written by someone who cares."
 Some more: http://alvinalexander.com/programming/clean-code-quotes-robert-
c-martin
Pair Programming
 Two developers on same computer
 Driver: Writes the code
 Navigator: Reviews what’s being typed
 Need to switch roles often
 Can be useful when designing complex part of a system or when fixing bugs
 Advantages
 Better code quality (constant reviewing)
 Less code (constant refactoring)
 Better communication within the team (knowledge transfer)
 Anger Management
 Developers need diplomacy, humility and open-mindness
 Not easy to accept criticism
 Time Management
 Podomoro Technique (switch every 20 minutes with 5 minutes break in between)
 Avoid long sessions as it's quite tiring
 Possible trigger: “Hey mate I need another pair of eyes.”
Code Review
 Better before commit to avoid crappy commits
 Review process
 Demo new functionality
 Show all unit tests pass
 Go through all modified, added, deleted files
 Need small and regular commits to avoid long sessions
 Reviewer should be able to quickly spot complex parts of
the code that needs refactoring to ease future
maintenance
 Can also ask to test in certain conditions
 Reviewer only provides suggestions
Unit Testing/TDD
 To ease software changes and avoid invisible breaking
changes
 Better flexibility, reusability
 Better robustness
 Safety net
 Developers not scared of making changes
 TDD vs Change and Pray Development
 Based on Dependency Injection pattern
Things to improve
 Build server to run unit tests (C# and javascript)
 Better practice of pair programming and code review
 Involve QA team
 Choose coding standard common to all teams
 Microsoft coding standards for C# (online)
 Measuring software quality punctually via build server
 Number of bugs, test coverage, code duplication...
 Do some brown bag sessions
 Concentrating on specific subject to educate developers
 For example, watching Uncle Bob’s videos on clean code
Things to improve
 Build server to run unit tests (C# and javascript)
 Better practice of pair programming and code review
 Involve QA team
 Choose coding standard common to all teams
 Microsoft coding standards for C# (online)
 Measuring software quality punctually via build server
 Number of bugs, test coverage, code duplication...
 Do some brown bag sessions
 Concentrating on specific subject to educate developers
 For example, watching Uncle Bob’s videos on clean code

Mais conteúdo relacionado

Mais procurados

Agile QA presentation
Agile QA presentationAgile QA presentation
Agile QA presentationCarl Bruiners
 
functional testing
functional testing functional testing
functional testing bharathanche
 
SonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualitySonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualityLarry Nung
 
CI/CD Overview
CI/CD OverviewCI/CD Overview
CI/CD OverviewAn Nguyen
 
Managing code quality with SonarQube
Managing code quality with SonarQubeManaging code quality with SonarQube
Managing code quality with SonarQubeRadu Vunvulea
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test AutomationNaveen Kumar Singh
 
Overview of Agile Methodology
Overview of Agile MethodologyOverview of Agile Methodology
Overview of Agile MethodologyHaresh Karkar
 
Sonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisSonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisPrashant Gupta
 
Transforming Organizations with CI/CD
Transforming Organizations with CI/CDTransforming Organizations with CI/CD
Transforming Organizations with CI/CDCprime
 
UNIT TESTING PPT
UNIT TESTING PPTUNIT TESTING PPT
UNIT TESTING PPTsuhasreddy1
 
Chaos engineering & Gameday on AWS
Chaos engineering & Gameday on AWSChaos engineering & Gameday on AWS
Chaos engineering & Gameday on AWSBilal Aybar
 
Code Quality Management Best Practices
Code Quality Management Best Practices Code Quality Management Best Practices
Code Quality Management Best Practices Perforce
 
Agile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterAgile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterDeclan Whelan
 
Code Review Best Practices
Code Review Best PracticesCode Review Best Practices
Code Review Best PracticesTrisha Gee
 

Mais procurados (20)

Sonarqube
SonarqubeSonarqube
Sonarqube
 
Agile QA presentation
Agile QA presentationAgile QA presentation
Agile QA presentation
 
functional testing
functional testing functional testing
functional testing
 
SonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualitySonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code Quality
 
CI/CD Overview
CI/CD OverviewCI/CD Overview
CI/CD Overview
 
Managing code quality with SonarQube
Managing code quality with SonarQubeManaging code quality with SonarQube
Managing code quality with SonarQube
 
SonarQube
SonarQubeSonarQube
SonarQube
 
Code review
Code reviewCode review
Code review
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test Automation
 
Code Review
Code ReviewCode Review
Code Review
 
Overview of Agile Methodology
Overview of Agile MethodologyOverview of Agile Methodology
Overview of Agile Methodology
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Sonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisSonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysis
 
Transforming Organizations with CI/CD
Transforming Organizations with CI/CDTransforming Organizations with CI/CD
Transforming Organizations with CI/CD
 
UNIT TESTING PPT
UNIT TESTING PPTUNIT TESTING PPT
UNIT TESTING PPT
 
Chaos engineering & Gameday on AWS
Chaos engineering & Gameday on AWSChaos engineering & Gameday on AWS
Chaos engineering & Gameday on AWS
 
Code Quality Management Best Practices
Code Quality Management Best Practices Code Quality Management Best Practices
Code Quality Management Best Practices
 
Agile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterAgile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile Tester
 
Code Review Best Practices
Code Review Best PracticesCode Review Best Practices
Code Review Best Practices
 
SonarQube Presentation.pptx
SonarQube Presentation.pptxSonarQube Presentation.pptx
SonarQube Presentation.pptx
 

Semelhante a Code Quality

Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...Agile ME
 
Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016Søren Lund
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovSvetlin Nakov
 
Agile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingAgile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingUtkarsh Khare
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressmtoppa
 
Code Review
Code ReviewCode Review
Code ReviewRavi Raj
 
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...Bosnia Agile
 
Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Søren Lund
 
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkJoseph Yoder
 
Introducing Continuous Integration Using Vsts
Introducing Continuous Integration Using VstsIntroducing Continuous Integration Using Vsts
Introducing Continuous Integration Using VstsMohamed Samy
 
Expert Code Review best practices
Expert Code Review best practicesExpert Code Review best practices
Expert Code Review best practicesjeetendra mandal
 
YAGNI Principle and Clean Code
YAGNI Principle and Clean CodeYAGNI Principle and Clean Code
YAGNI Principle and Clean CodeLuan Reffatti
 
Mob Programming for Continuous Learning
Mob Programming for Continuous LearningMob Programming for Continuous Learning
Mob Programming for Continuous LearningMike Clement
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware ProgrammingPostSharp Technologies
 
Refactoring, 2nd Edition
Refactoring, 2nd EditionRefactoring, 2nd Edition
Refactoring, 2nd Editionjexp
 
Clean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code CampClean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code CampTheo Jungeblut
 
Amanda Cinnamon - Treat Your Code Like the Valuable Software It Is
Amanda Cinnamon - Treat Your Code Like the Valuable Software It IsAmanda Cinnamon - Treat Your Code Like the Valuable Software It Is
Amanda Cinnamon - Treat Your Code Like the Valuable Software It IsRehgan Avon
 
Software quality
Software qualitySoftware quality
Software quality5minpause
 

Semelhante a Code Quality (20)

Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
 
Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
 
Agile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingAgile Methodologies And Extreme Programming
Agile Methodologies And Extreme Programming
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPress
 
Code Review
Code ReviewCode Review
Code Review
 
Refactoring 2 The Max
Refactoring 2 The MaxRefactoring 2 The Max
Refactoring 2 The Max
 
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
 
Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016
 
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
 
Put to the Test
Put to the TestPut to the Test
Put to the Test
 
Introducing Continuous Integration Using Vsts
Introducing Continuous Integration Using VstsIntroducing Continuous Integration Using Vsts
Introducing Continuous Integration Using Vsts
 
Expert Code Review best practices
Expert Code Review best practicesExpert Code Review best practices
Expert Code Review best practices
 
YAGNI Principle and Clean Code
YAGNI Principle and Clean CodeYAGNI Principle and Clean Code
YAGNI Principle and Clean Code
 
Mob Programming for Continuous Learning
Mob Programming for Continuous LearningMob Programming for Continuous Learning
Mob Programming for Continuous Learning
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming
 
Refactoring, 2nd Edition
Refactoring, 2nd EditionRefactoring, 2nd Edition
Refactoring, 2nd Edition
 
Clean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code CampClean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code Camp
 
Amanda Cinnamon - Treat Your Code Like the Valuable Software It Is
Amanda Cinnamon - Treat Your Code Like the Valuable Software It IsAmanda Cinnamon - Treat Your Code Like the Valuable Software It Is
Amanda Cinnamon - Treat Your Code Like the Valuable Software It Is
 
Software quality
Software qualitySoftware quality
Software quality
 

Último

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 

Último (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 

Code Quality

  • 2. Why?  Maintenance is what is most expensive in software life time  Once in production it is harder to apply fixes  Need to ensure best code quality as we don't know what changes will need to be made in the future and who will be making those changes  Better to spend a bit more time now to make it readable and understandable by anyone, than struggle later with the risk of wasting a lot more time, or even having to re- write
  • 4. Some Clean Code Principles  Boy Scout rule  "Leave the campground cleaner than you found it."  DRY: Don't Repeat Yourself  To avoid code duplication  Dependency Injection pattern...  SRP: Single Responsibility Principles  "Functions should do one thing. They should do it well. They should do it only." - Robert C. Martin  Other interesting principles (SOLID...)  http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
  • 5. Famous Quotes  "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" - Rick Osborne  "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler  "When you feel the need to write a comment, first try to refactor the code so that any comment becomes superfluous" - Martin Fowler  Clean Code Quotes by Robert C. Martin  "Later equals never."  "The only way to make the deadline -- the only way to go fast -- is to keep the code as clean as possible at all times."  "Clean code always looks like it was written by someone who cares."  Some more: http://alvinalexander.com/programming/clean-code-quotes-robert- c-martin
  • 6. Pair Programming  Two developers on same computer  Driver: Writes the code  Navigator: Reviews what’s being typed  Need to switch roles often  Can be useful when designing complex part of a system or when fixing bugs  Advantages  Better code quality (constant reviewing)  Less code (constant refactoring)  Better communication within the team (knowledge transfer)  Anger Management  Developers need diplomacy, humility and open-mindness  Not easy to accept criticism  Time Management  Podomoro Technique (switch every 20 minutes with 5 minutes break in between)  Avoid long sessions as it's quite tiring  Possible trigger: “Hey mate I need another pair of eyes.”
  • 7. Code Review  Better before commit to avoid crappy commits  Review process  Demo new functionality  Show all unit tests pass  Go through all modified, added, deleted files  Need small and regular commits to avoid long sessions  Reviewer should be able to quickly spot complex parts of the code that needs refactoring to ease future maintenance  Can also ask to test in certain conditions  Reviewer only provides suggestions
  • 8. Unit Testing/TDD  To ease software changes and avoid invisible breaking changes  Better flexibility, reusability  Better robustness  Safety net  Developers not scared of making changes  TDD vs Change and Pray Development  Based on Dependency Injection pattern
  • 9. Things to improve  Build server to run unit tests (C# and javascript)  Better practice of pair programming and code review  Involve QA team  Choose coding standard common to all teams  Microsoft coding standards for C# (online)  Measuring software quality punctually via build server  Number of bugs, test coverage, code duplication...  Do some brown bag sessions  Concentrating on specific subject to educate developers  For example, watching Uncle Bob’s videos on clean code
  • 10. Things to improve  Build server to run unit tests (C# and javascript)  Better practice of pair programming and code review  Involve QA team  Choose coding standard common to all teams  Microsoft coding standards for C# (online)  Measuring software quality punctually via build server  Number of bugs, test coverage, code duplication...  Do some brown bag sessions  Concentrating on specific subject to educate developers  For example, watching Uncle Bob’s videos on clean code