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

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

What's hot (19)

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Peer Review Guidelines
Peer Review GuidelinesPeer Review Guidelines
Peer Review Guidelines
 
Test case for chatbots
Test case for chatbotsTest case for chatbots
Test case for chatbots
 
Chatbot Testing
Chatbot TestingChatbot Testing
Chatbot Testing
 
Prefer Code to Comments
Prefer Code to CommentsPrefer Code to Comments
Prefer Code to Comments
 
2018-09 - F# and Fable
2018-09 - F# and Fable2018-09 - F# and Fable
2018-09 - F# and Fable
 
Code Quality
Code QualityCode Quality
Code Quality
 
Inside Requirements
Inside RequirementsInside Requirements
Inside Requirements
 
Sorted
SortedSorted
Sorted
 
Green Custard Friday Talk 9: Software Religious Arguments
Green Custard Friday Talk 9: Software Religious ArgumentsGreen Custard Friday Talk 9: Software Religious Arguments
Green Custard Friday Talk 9: Software Religious Arguments
 
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1
 
Lecture 25
Lecture 25Lecture 25
Lecture 25
 
An Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationAn Introduction To Software Development - Implementation
An Introduction To Software Development - Implementation
 
Better tests automagically (big sky dev con 2015)
Better tests automagically (big sky dev con 2015)Better tests automagically (big sky dev con 2015)
Better tests automagically (big sky dev con 2015)
 
TDD — Are you sure you properly test code?
TDD — Are you sure you properly test code?TDD — Are you sure you properly test code?
TDD — Are you sure you properly test code?
 
Internal domain-specific languages
Internal domain-specific languagesInternal domain-specific languages
Internal domain-specific languages
 
Adopting tdd in the workplace
Adopting tdd in the workplaceAdopting tdd in the workplace
Adopting tdd in the workplace
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Lecture 23 p1
Lecture 23 p1Lecture 23 p1
Lecture 23 p1
 

Similar to Best Practices in Software Development

Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
ikram_ahamed
 
Usable Software Design
Usable Software DesignUsable Software Design
Usable Software Design
Alexandru Bolboaca
 
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 Programming
Utkarsh Khare
 
An Introduction To Software Development - Final Review
An Introduction To Software Development - Final ReviewAn Introduction To Software Development - Final Review
An Introduction To Software Development - Final Review
Blue Elephant Consulting
 
Code review best practice
Code review best practiceCode review best practice
Code review best practice
Oren Digmi
 
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
AgileNetwork
 
Paul Ellarby - Why do scrum?
Paul Ellarby - Why do scrum?Paul Ellarby - Why do scrum?
Paul Ellarby - Why do scrum?
Paul Ellarby
 
CPP03 - Repetition
CPP03 - RepetitionCPP03 - Repetition
CPP03 - Repetition
Michael Heron
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
Ahmet Bulut
 
Software testing
Software testingSoftware testing
Software testing
Nico Heidtke
 
What is xp
What is xpWhat is xp
What is xp
Simone Federici
 
Topic production code
Topic production codeTopic production code
Topic production code
Kavi Kumar
 
WordCamp US: Clean Code
WordCamp US: Clean CodeWordCamp US: Clean Code
WordCamp US: Clean Code
mtoppa
 
From hello world to goodbye code
From hello world to goodbye codeFrom hello world to goodbye code
From hello world to goodbye code
Kim Moir
 
CSCI 180 Project Grading  Your project is graded based .docx
CSCI 180 Project Grading   Your project is graded based .docxCSCI 180 Project Grading   Your project is graded based .docx
CSCI 180 Project Grading  Your project is graded based .docx
faithxdunce63732
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven Development
Shawn Jones
 
Twelve practices of XP_Se lect5 btech
Twelve practices of XP_Se lect5 btechTwelve practices of XP_Se lect5 btech
Twelve practices of XP_Se lect5 btechIIITA
 
Put to the Test
Put to the TestPut to the Test
Put to the Test
Kevlin Henney
 

Similar to Best Practices in Software Development (20)

Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
 
Usable Software Design
Usable Software DesignUsable Software Design
Usable Software Design
 
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
 
An Introduction To Software Development - Final Review
An Introduction To Software Development - Final ReviewAn Introduction To Software Development - Final Review
An Introduction To Software Development - Final Review
 
Code review best practice
Code review best practiceCode review best practice
Code review best practice
 
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
 
Paul Ellarby - Why do scrum?
Paul Ellarby - Why do scrum?Paul Ellarby - Why do scrum?
Paul Ellarby - Why do scrum?
 
CPP03 - Repetition
CPP03 - RepetitionCPP03 - Repetition
CPP03 - Repetition
 
Code quality
Code quality Code quality
Code quality
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
 
Software testing
Software testingSoftware testing
Software testing
 
What is xp
What is xpWhat is xp
What is xp
 
Topic production code
Topic production codeTopic production code
Topic production code
 
WordCamp US: Clean Code
WordCamp US: Clean CodeWordCamp US: Clean Code
WordCamp US: Clean Code
 
From hello world to goodbye code
From hello world to goodbye codeFrom hello world to goodbye code
From hello world to goodbye code
 
CSCI 180 Project Grading  Your project is graded based .docx
CSCI 180 Project Grading   Your project is graded based .docxCSCI 180 Project Grading   Your project is graded based .docx
CSCI 180 Project Grading  Your project is graded based .docx
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven Development
 
Twelve practices of XP_Se lect5 btech
Twelve practices of XP_Se lect5 btechTwelve practices of XP_Se lect5 btech
Twelve practices of XP_Se lect5 btech
 
Put to the Test
Put to the TestPut to the Test
Put to the Test
 

More from André Pitombeira

Increasing productivity with continuous delivery
Increasing productivity with continuous deliveryIncreasing productivity with continuous delivery
Increasing productivity with continuous delivery
André Pitombeira
 
Software estimation techniques
Software estimation techniquesSoftware estimation techniques
Software estimation techniques
André Pitombeira
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
André Pitombeira
 

More from André Pitombeira (6)

Increasing productivity with continuous delivery
Increasing productivity with continuous deliveryIncreasing productivity with continuous delivery
Increasing productivity with continuous delivery
 
Software estimation techniques
Software estimation techniquesSoftware estimation techniques
Software estimation techniques
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Clustering
ClusteringClustering
Clustering
 
TDD e Refactoring
TDD e RefactoringTDD e Refactoring
TDD e Refactoring
 
Computação Ubíqua
Computação UbíquaComputação Ubíqua
Computação Ubíqua
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 

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