SlideShare a Scribd company logo
4
Most read
5
Most read
7
Most read
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

More Related Content

PPTX
Code review
PDF
Bad Code Smells
PPTX
Introduction git
PPTX
Introduction to Django Rest Framework
PDF
Adult Matric – Senior Certificate (Amended)
PPTX
Coding standards for java
PPS
Coding Best Practices
PPTX
Overview on Agile, Scrum, Kanban, Extreme programming (XP) and Scaled Agile F...
Code review
Bad Code Smells
Introduction git
Introduction to Django Rest Framework
Adult Matric – Senior Certificate (Amended)
Coding standards for java
Coding Best Practices
Overview on Agile, Scrum, Kanban, Extreme programming (XP) and Scaled Agile F...

What's hot (20)

PPTX
Code quality
PPTX
Managing code quality with SonarQube
PDF
The story of SonarQube told to a DevOps Engineer
PPTX
SonarQube: Continuous Code Inspection
PPTX
Code Review
PDF
Java Source Code Analysis using SonarQube
PPT
Software Quality Management
PPTX
Software quality assurance
PDF
Tracking and improving software quality with SonarQube
PPT
Test plan
PPTX
V model
PPTX
Software Quality Assurance
PDF
Software testing
PDF
Automated vs manual testing
DOCX
Interview questions for manual testing technology.
PPTX
Sonarqube
PDF
What is Sanity Testing? Edureka
PDF
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
PDF
E commerce Testing
Code quality
Managing code quality with SonarQube
The story of SonarQube told to a DevOps Engineer
SonarQube: Continuous Code Inspection
Code Review
Java Source Code Analysis using SonarQube
Software Quality Management
Software quality assurance
Tracking and improving software quality with SonarQube
Test plan
V model
Software Quality Assurance
Software testing
Automated vs manual testing
Interview questions for manual testing technology.
Sonarqube
What is Sanity Testing? Edureka
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
E commerce Testing
Ad

Similar to Code Quality (20)

PDF
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
ODP
Documenting code yapceu2016
PPT
Agile Methodologies And Extreme Programming - Svetlin Nakov
PPT
Agile Methodologies And Extreme Programming
PDF
WordCamp Nashville: Clean Code for WordPress
PPT
Code Review
PDF
Refactoring 2 The Max
PDF
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
ODP
Documenting Code - Patterns and Anti-patterns - NLPW 2016
PDF
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
PDF
Put to the Test
PPTX
Introducing Continuous Integration Using Vsts
PPTX
Expert Code Review best practices
PDF
YAGNI Principle and Clean Code
PDF
Mob Programming for Continuous Learning
PPTX
10 Reasons You MUST Consider Pattern-Aware Programming
PPTX
Refactoring, 2nd Edition
PPTX
Clean Code Part III - Craftsmanship at SoCal Code Camp
PPTX
Test Drive Dirven Driver HAHAahhaha.pptx
PDF
Amanda Cinnamon - Treat Your Code Like the Valuable Software It Is
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Documenting code yapceu2016
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming
WordCamp Nashville: Clean Code for WordPress
Code Review
Refactoring 2 The Max
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Documenting Code - Patterns and Anti-patterns - NLPW 2016
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Put to the Test
Introducing Continuous Integration Using Vsts
Expert Code Review best practices
YAGNI Principle and Clean Code
Mob Programming for Continuous Learning
10 Reasons You MUST Consider Pattern-Aware Programming
Refactoring, 2nd Edition
Clean Code Part III - Craftsmanship at SoCal Code Camp
Test Drive Dirven Driver HAHAahhaha.pptx
Amanda Cinnamon - Treat Your Code Like the Valuable Software It Is
Ad

Recently uploaded (20)

PPTX
TLE Review Electricity (Electricity).pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Approach and Philosophy of On baking technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
1. Introduction to Computer Programming.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Encapsulation theory and applications.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Mushroom cultivation and it's methods.pdf
PPT
Teaching material agriculture food technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Tartificialntelligence_presentation.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
TLE Review Electricity (Electricity).pptx
Network Security Unit 5.pdf for BCA BBA.
Approach and Philosophy of On baking technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Programs and apps: productivity, graphics, security and other tools
1. Introduction to Computer Programming.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A Presentation on Artificial Intelligence
Spectral efficient network and resource selection model in 5G networks
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Encapsulation theory and applications.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Heart disease approach using modified random forest and particle swarm optimi...
Mushroom cultivation and it's methods.pdf
Teaching material agriculture food technology
MIND Revenue Release Quarter 2 2025 Press Release
OMC Textile Division Presentation 2021.pptx
A comparative study of natural language inference in Swahili using monolingua...
Tartificialntelligence_presentation.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf

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