SlideShare a Scribd company logo
Best Practices in Software
Development
André Luís Pitombeira
Agenda
● Software Maintenance
● Code Review
● Using Version Control
● Commit Messages
● Pull Requests
Software
Maintenance
Reports suggest that the cost of
maintenance is high. A study on
estimating software maintenance
found that the cost of maintenance is
as high as 67% of the cost of entire
software process cycle.
Code Review
Peer review – an activity in which people other than the author of a software
deliverable examine it for defects and improvement opportunities – is one of
the most powerful software quality tools available.
… software testing alone has limited effectiveness – the average defect
detection rate is only 25 percent for unit testing, 35 percent for function
testing, and 45 percent for integration testing. In contrast, the average
effectiveness of design and code inspections are 55 and 60 percent.
Code Review
● Developers tend to think of productivity in terms of “how fast can I write the code for
this new feature”.
● We also tend to say “I write code” when describing our jobs
● Professional software development is a matter of understanding the code that is
already there: we simply spend much more time reading than writing
● Productivity thus depends more on the overall code’s quality and maintainability,
rather than the skills of individual contributors making changes.
It’s harder to read code than to
write it.
Using Version Control
● What constitutes a particular version of your software?
● What was done when, by whom, and for what reason?
Commit Messages
● Every version control system has the facility to add a description to your
commit
● Many people get into the bad habit of omit the description
● The most important reason to write a descriptive commit message is so
that, when the build breaks, you know who broke the build and why
Commit Messages
1. You find a bug that is down to a rather obscure line of code
2. You use your versions control system to find out who put in that line of
code and when
3. That person is off on holiday or has gone home for the night, and left a
commit message that said “fixed obscure bug”
4. You change the obscure line of code to fix the bug
5. Something else breaks
6. You spend hours trying to get the application working again
Commit Messages
● A commit message explaining what a person was doing when they
commited that change can save you hours of debugging
● There is not prize for shortests commit messages
● A couple of medium-to-long sentences with an overview of what you were
doing will often save you many times the effort later on
Commit Messages
● Write a multiparagraph commit message
● The first paragraph is a summary
○ This is what gets shown on line-per-commit displays
○ This is like a newspaper headline
● The following paragraphs add more details
● Add a link to the identifier in your project management tool for the feature
or bug you are working on
Commit Messages
Bad commit message:
add cli new
fixes
fix code review comments
wip
Commit Messages
Good commit message:
Make Source.indexOf(ByteString) significantly faster
Previously the algorithm that did this was extremely inefficient, and had worst case runtime of O(N * S * S) for N is size of the
bytestring and S is the number of segments.
The new code runs in O(N * S). It accomplishes this by not starting each search at the first segment, which could occur many
times when called by RealBufferedSource.
---
Issue: [#365](https://link/to/issue/365)
Commit Messages
Good commit message:
Add updated credit card icon for sbs reservations
At first we wanted to use the same icon as on the new TM but since in
the list it is a background image, the only way to apply a correct color
to it would be using mask-image css property which is not supported in
IE11. That’s why we duplicated the icons for now until the list will be
moved to Angular and both will be able to make use of the inline SVGs
[BC-3985]
Pull Request
● Reviewing pull request is hard
● Make smaller pull requests
● Write useful descriptions and titles
● Have on-point commit messages
● Add comments on your pull request to help guide the reviewer
● Make it visual
Pull Request
Approach to writing a Pull Request
● Include the purpose
● Consider provide an overview of why the work is taking place
● Be explicit about the feedback you want
● Be explicit about when you want a feedback
● Mention individual you specifically want to involve in the discussion
● Mention teams you want to involve in the discussion
Pull Request
Offering feedback
● Familiarize yourself with the context
● If you disagree strongly, consider giving a few minutes before responding
● Ask, don’t tell (“What do you think about trying?” Instead of “Don’t do!”)
● Explain your reason why the code should be changed
● Offer ways to simplify or improve the code
● Avoid using derogatory terms like “stupid”
● Be humble (“I’m not sure. Let’s try...”)
● Avoid hyperbole (“Never do...”)
● Be aware of negative bias with online communication. Can you use positive language instead of neutral?
● Use emoji to clarify tone
Pull Request
Responding to feedback
● Consider leading with an expression of appreciation, especially when feedback has
been mixed
● Ask for clarification. (“I don’t understand, can you clarify?”)
● Offer clarification, explain the decisions you made to reach a solution in question
● Try to respond to every comment
● Link to any follow up commits or Pull Requests
● If there is growing confusion or debate, ask yourself if the written word is still the
best form of communication
Pull Request
How can we get started?
1. Code reviews guideline
2. A pull request template
3. Useful resources about how to do this well
Questions?
References
● What makes a good commit message
● The (written) unwritten guide to pull requests
● How to write the perfect pull request
● Code Reviews: Just Do It
● Code reviews: getting started
● Continuous Delivery
● Software Maintenance Overview
Thank you

More Related Content

What's hot (17)

PDF
Test Driven Development
Samnang Chhun
 
PDF
Peer Review Guidelines
Ombu Labs, The Lean Software Boutique
 
PDF
Test case for chatbots
Sankar G
 
PPT
Chatbot Testing
VodqaBLR
 
PDF
Prefer Code to Comments
Kevlin Henney
 
PPTX
2018-09 - F# and Fable
Eamonn Boyle
 
PPT
Code Quality
François Camus
 
PDF
Inside Requirements
Kevlin Henney
 
PDF
Sorted
Kevlin Henney
 
PDF
Green Custard Friday Talk 9: Software Religious Arguments
Green Custard
 
PPTX
An Introduction To Software Development - Test Driven Development, Part 1
Blue Elephant Consulting
 
PPTX
An Introduction To Software Development - Implementation
Blue Elephant Consulting
 
PPTX
Better tests automagically (big sky dev con 2015)
roblund
 
PDF
TDD — Are you sure you properly test code?
Dmitriy Nesteryuk
 
PDF
Internal domain-specific languages
Mikhail Barash
 
PDF
Adopting tdd in the workplace
Donny Wals
 
PDF
Solid principles
Kumaresh Chandra Baruri
 
Test Driven Development
Samnang Chhun
 
Test case for chatbots
Sankar G
 
Chatbot Testing
VodqaBLR
 
Prefer Code to Comments
Kevlin Henney
 
2018-09 - F# and Fable
Eamonn Boyle
 
Code Quality
François Camus
 
Inside Requirements
Kevlin Henney
 
Green Custard Friday Talk 9: Software Religious Arguments
Green Custard
 
An Introduction To Software Development - Test Driven Development, Part 1
Blue Elephant Consulting
 
An Introduction To Software Development - Implementation
Blue Elephant Consulting
 
Better tests automagically (big sky dev con 2015)
roblund
 
TDD — Are you sure you properly test code?
Dmitriy Nesteryuk
 
Internal domain-specific languages
Mikhail Barash
 
Adopting tdd in the workplace
Donny Wals
 
Solid principles
Kumaresh Chandra Baruri
 

Similar to Best Practices in Software Development (20)

PDF
Code Reviews @ Quatico
Jan Wloka
 
PPTX
Pull requests do's and don'ts
Arie Bregman
 
PDF
On committing well
James Aylett
 
PDF
Git best practices 2016
Otto Kekäläinen
 
PDF
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010
Atlassian
 
PDF
Code Review Tool Evaluation
Kate Semizhon
 
PDF
Git Basics Workshop Summer of Tech 2010
Y. Thong Kuah
 
PDF
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Institute of Science Tokyo
 
PDF
Run your project like it's an OpenSource project
Ian Bull
 
PDF
Code reviews
Raúl Araya Tauler
 
PDF
How to review a pull request
rouanw
 
PPTX
Crafting Better Git Commits
Brant Burnett
 
PPTX
No Programmer Is an Island
Jimmy Sieben
 
PPTX
Que nos espera a los ALM Dudes para el 2013?
Bruno Capuano
 
PDF
Git_Practices - Guidelines.pdf
harshit259398
 
PDF
How to write good quality code
Hayden Bleasel
 
PDF
Caring about Code Quality
Saltmarch Media
 
PPTX
Integreation
Sean Killeen
 
PPTX
Git branching policy and review comment's prefix
Kumaresh Chandra Baruri
 
PPTX
“One man” development process model
Silicon Straits
 
Code Reviews @ Quatico
Jan Wloka
 
Pull requests do's and don'ts
Arie Bregman
 
On committing well
James Aylett
 
Git best practices 2016
Otto Kekäläinen
 
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010
Atlassian
 
Code Review Tool Evaluation
Kate Semizhon
 
Git Basics Workshop Summer of Tech 2010
Y. Thong Kuah
 
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Institute of Science Tokyo
 
Run your project like it's an OpenSource project
Ian Bull
 
Code reviews
Raúl Araya Tauler
 
How to review a pull request
rouanw
 
Crafting Better Git Commits
Brant Burnett
 
No Programmer Is an Island
Jimmy Sieben
 
Que nos espera a los ALM Dudes para el 2013?
Bruno Capuano
 
Git_Practices - Guidelines.pdf
harshit259398
 
How to write good quality code
Hayden Bleasel
 
Caring about Code Quality
Saltmarch Media
 
Integreation
Sean Killeen
 
Git branching policy and review comment's prefix
Kumaresh Chandra Baruri
 
“One man” development process model
Silicon Straits
 
Ad

More from André Pitombeira (7)

PDF
Introduction to Agile Software Development
André Pitombeira
 
PDF
Increasing productivity with continuous delivery
André Pitombeira
 
PDF
Software estimation techniques
André Pitombeira
 
PDF
Introduction to TypeScript
André Pitombeira
 
PDF
Clustering
André Pitombeira
 
PDF
TDD e Refactoring
André Pitombeira
 
PDF
Computação Ubíqua
André Pitombeira
 
Introduction to Agile Software Development
André Pitombeira
 
Increasing productivity with continuous delivery
André Pitombeira
 
Software estimation techniques
André Pitombeira
 
Introduction to TypeScript
André Pitombeira
 
Clustering
André Pitombeira
 
TDD e Refactoring
André Pitombeira
 
Computação Ubíqua
André Pitombeira
 
Ad

Recently uploaded (20)

PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 

Best Practices in Software Development

  • 1. Best Practices in Software Development André Luís Pitombeira
  • 2. Agenda ● Software Maintenance ● Code Review ● Using Version Control ● Commit Messages ● Pull Requests
  • 3. Software Maintenance Reports suggest that the cost of maintenance is high. A study on estimating software maintenance found that the cost of maintenance is as high as 67% of the cost of entire software process cycle.
  • 4. Code Review Peer review – an activity in which people other than the author of a software deliverable examine it for defects and improvement opportunities – is one of the most powerful software quality tools available. … software testing alone has limited effectiveness – the average defect detection rate is only 25 percent for unit testing, 35 percent for function testing, and 45 percent for integration testing. In contrast, the average effectiveness of design and code inspections are 55 and 60 percent.
  • 5. Code Review ● Developers tend to think of productivity in terms of “how fast can I write the code for this new feature”. ● We also tend to say “I write code” when describing our jobs ● Professional software development is a matter of understanding the code that is already there: we simply spend much more time reading than writing ● Productivity thus depends more on the overall code’s quality and maintainability, rather than the skills of individual contributors making changes.
  • 6. It’s harder to read code than to write it.
  • 7. Using Version Control ● What constitutes a particular version of your software? ● What was done when, by whom, and for what reason?
  • 8. Commit Messages ● Every version control system has the facility to add a description to your commit ● Many people get into the bad habit of omit the description ● The most important reason to write a descriptive commit message is so that, when the build breaks, you know who broke the build and why
  • 9. Commit Messages 1. You find a bug that is down to a rather obscure line of code 2. You use your versions control system to find out who put in that line of code and when 3. That person is off on holiday or has gone home for the night, and left a commit message that said “fixed obscure bug” 4. You change the obscure line of code to fix the bug 5. Something else breaks 6. You spend hours trying to get the application working again
  • 10. Commit Messages ● A commit message explaining what a person was doing when they commited that change can save you hours of debugging ● There is not prize for shortests commit messages ● A couple of medium-to-long sentences with an overview of what you were doing will often save you many times the effort later on
  • 11. Commit Messages ● Write a multiparagraph commit message ● The first paragraph is a summary ○ This is what gets shown on line-per-commit displays ○ This is like a newspaper headline ● The following paragraphs add more details ● Add a link to the identifier in your project management tool for the feature or bug you are working on
  • 12. Commit Messages Bad commit message: add cli new fixes fix code review comments wip
  • 13. Commit Messages Good commit message: Make Source.indexOf(ByteString) significantly faster Previously the algorithm that did this was extremely inefficient, and had worst case runtime of O(N * S * S) for N is size of the bytestring and S is the number of segments. The new code runs in O(N * S). It accomplishes this by not starting each search at the first segment, which could occur many times when called by RealBufferedSource. --- Issue: [#365](https://link/to/issue/365)
  • 14. Commit Messages Good commit message: Add updated credit card icon for sbs reservations At first we wanted to use the same icon as on the new TM but since in the list it is a background image, the only way to apply a correct color to it would be using mask-image css property which is not supported in IE11. That’s why we duplicated the icons for now until the list will be moved to Angular and both will be able to make use of the inline SVGs [BC-3985]
  • 15. Pull Request ● Reviewing pull request is hard ● Make smaller pull requests ● Write useful descriptions and titles ● Have on-point commit messages ● Add comments on your pull request to help guide the reviewer ● Make it visual
  • 16. Pull Request Approach to writing a Pull Request ● Include the purpose ● Consider provide an overview of why the work is taking place ● Be explicit about the feedback you want ● Be explicit about when you want a feedback ● Mention individual you specifically want to involve in the discussion ● Mention teams you want to involve in the discussion
  • 17. Pull Request Offering feedback ● Familiarize yourself with the context ● If you disagree strongly, consider giving a few minutes before responding ● Ask, don’t tell (“What do you think about trying?” Instead of “Don’t do!”) ● Explain your reason why the code should be changed ● Offer ways to simplify or improve the code ● Avoid using derogatory terms like “stupid” ● Be humble (“I’m not sure. Let’s try...”) ● Avoid hyperbole (“Never do...”) ● Be aware of negative bias with online communication. Can you use positive language instead of neutral? ● Use emoji to clarify tone
  • 18. Pull Request Responding to feedback ● Consider leading with an expression of appreciation, especially when feedback has been mixed ● Ask for clarification. (“I don’t understand, can you clarify?”) ● Offer clarification, explain the decisions you made to reach a solution in question ● Try to respond to every comment ● Link to any follow up commits or Pull Requests ● If there is growing confusion or debate, ask yourself if the written word is still the best form of communication
  • 19. Pull Request How can we get started? 1. Code reviews guideline 2. A pull request template 3. Useful resources about how to do this well
  • 21. References ● What makes a good commit message ● The (written) unwritten guide to pull requests ● How to write the perfect pull request ● Code Reviews: Just Do It ● Code reviews: getting started ● Continuous Delivery ● Software Maintenance Overview