SlideShare a Scribd company logo
WRITING QUALITY CODE,AS ATEAM
DrupalCamp Spain 2014
WHAT I DO
• Drupal developer at Lullabot.	

• Drupal contributor.	

• Contrib maintainer.	

• Web enthusiast.	

• Occasional IRC trolling.
THIS IS NOT ABOUT
• Improving your code skills.	

• Cookbook on drupalisms.	

• How to make Drupal good at what it’s bad.
DISAPPOINTED?
There is a talk about responsive theming
right next door!
PROJECTS I AM IN
• Typically BIG sites.	

• Media related.	

• Limited user interaction with Drupal.	

• Advertisements (random).
TEAMS I AM IN
• Usually the client has their own tech team.	

• Drop-in (remote). Drupal expert.	

• There are other consultants.	

• Every team has its own culture.
THETEAM IS WHAT MATTERS
– Jim McCarthy
“You can’t have great software without a great team, and most software
teams behave like dysfunctional families.”
HOWTO KICK ASS INTHETEAM
• Know where your strength is.	

• Make yourself available.	

• Learn from other people’s code.
WASN’TTHIS ABOUT CODE?!
Enough of the self help talk!
SUGGESTIONS FOR WRITING QUALITY
CODE
• Track your tasks in a centralized and dedicated tool (PM).	

• Follow git-flow (make it flexible).	

• Test the code.	

• Deploy often.
W
USEFULTOOLS
• drush: sql-sync, sql-drop, rsync, devify, …	

• You will need to import databases from a system of record: mysqldumpp.sh, mysqlrestorep.sh,
mysqltransform.py.	

• HUB	

• Meme GIFs	

• Google Hangouts.
• Pull request builder!
PULL REQUEST BUILDER
1. Someone sends a PR	

2. Access check to create a dedicated environment: http://
qa32889.project.com	

3. Tear down the environment.	

4. Go count money!
Deployment with
only those
changes.
TESTINGYOUR CODE
• When you write the code and submit the PR.	

• When another dev reviews your code and tests it in their local
environment.*	

• When QA tests the user story.	

• When QA does a regression/smoke test.
Ideally your code will be tested 4 times.
IT’S CHEAPER DOING IT!
By now you probably know that there is no such thing as «Quick
and dirty», there’s only «Dirty, and many times».
– Brian W. Kernighan
“Debugging is twice as hard as writing the code in the
first place.Therefore, if you write the code as cleverly as
possible, you are, by definition, not smart enough to
debug it.”
– ChristopherThompson
“Sometimes it pays to stay in bed on Monday, rather than spending the rest
of the week debugging Monday's code.”
XDEBUG
AVOID ENDLESS FEEDBACK
• Ask for your reviewer to be nit picky.	

• Write lots of meaningful comments.	

• Use long variables with meaningful names.	

• Update the code explanations when making changes.
– Martin Golding
“Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live.”
SUGGESTIONS FOR WRITING QUALITY
CODE
• Track your tasks in a centralized and dedicated tool (PM).	

• Follow git-flow (make it flexible).	

• Test the code.	

• Deploy often.
AUTOMATEDTESTING
• «Unit» test the key parts of your code.	

• Use Simpletest for important features.	

• Automate feature testing.
THE JOURNEY OFYOUR CODE
• It is born in your local environment.	

• It’s sent to GitHub as a PR so others
can comment on it. 	

• It’s merged in the development
environment.	

• From the development to
acceptance to stage.
• Deployed to PROD!
If you are being agile then you should do
this every sprint.

More Related Content

Viewers also liked

Notarphpj 120828194837-phpapp02
Notarphpj 120828194837-phpapp02Notarphpj 120828194837-phpapp02
Notarphpj 120828194837-phpapp02
dan1172
 
المحسوبية في الإدارة التونسية بقلم عزالدين مبارك
المحسوبية في الإدارة التونسية  بقلم  عزالدين مباركالمحسوبية في الإدارة التونسية  بقلم  عزالدين مبارك
المحسوبية في الإدارة التونسية بقلم عزالدين مبارك
ezzeddine
 
ثورة تلد أخرى بقلم عزالدين مبارك
ثورة تلد أخرى  بقلم عزالدين مباركثورة تلد أخرى  بقلم عزالدين مبارك
ثورة تلد أخرى بقلم عزالدين مبارك
ezzeddine
 

Viewers also liked (20)

Notarphpj 120828194837-phpapp02
Notarphpj 120828194837-phpapp02Notarphpj 120828194837-phpapp02
Notarphpj 120828194837-phpapp02
 
Full report
Full reportFull report
Full report
 
El papel del vídeo en la Web 2.0
El papel del vídeo en la Web 2.0El papel del vídeo en la Web 2.0
El papel del vídeo en la Web 2.0
 
المحسوبية في الإدارة التونسية بقلم عزالدين مبارك
المحسوبية في الإدارة التونسية  بقلم  عزالدين مباركالمحسوبية في الإدارة التونسية  بقلم  عزالدين مبارك
المحسوبية في الإدارة التونسية بقلم عزالدين مبارك
 
Social Tools: Social search, verification, crowdsourcing and curation
Social Tools: Social search, verification, crowdsourcing and curationSocial Tools: Social search, verification, crowdsourcing and curation
Social Tools: Social search, verification, crowdsourcing and curation
 
Inkilap Tarihi 1
Inkilap Tarihi 1Inkilap Tarihi 1
Inkilap Tarihi 1
 
Anna C Bd 2010
Anna C Bd 2010 Anna C Bd 2010
Anna C Bd 2010
 
Raising godly children 19 jun 15
Raising godly children 19 jun 15Raising godly children 19 jun 15
Raising godly children 19 jun 15
 
ثورة تلد أخرى بقلم عزالدين مبارك
ثورة تلد أخرى  بقلم عزالدين مباركثورة تلد أخرى  بقلم عزالدين مبارك
ثورة تلد أخرى بقلم عزالدين مبارك
 
Easter 2010
Easter 2010Easter 2010
Easter 2010
 
The students
The studentsThe students
The students
 
Rddfs instant insight
Rddfs instant insightRddfs instant insight
Rddfs instant insight
 
Gatos 4
Gatos 4Gatos 4
Gatos 4
 
Jehovah tsikenu 8 apr12
Jehovah tsikenu  8 apr12Jehovah tsikenu  8 apr12
Jehovah tsikenu 8 apr12
 
Getting Started with LinkedIn 0714
Getting Started with LinkedIn 0714Getting Started with LinkedIn 0714
Getting Started with LinkedIn 0714
 
Annual 2
Annual 2Annual 2
Annual 2
 
X:\Work\English\Martin Luther King, Jr
X:\Work\English\Martin Luther King, JrX:\Work\English\Martin Luther King, Jr
X:\Work\English\Martin Luther King, Jr
 
C:\Fakepath\Web2 O
C:\Fakepath\Web2 OC:\Fakepath\Web2 O
C:\Fakepath\Web2 O
 
Pinterest for News
Pinterest for NewsPinterest for News
Pinterest for News
 
World Usability Day 2014 - Keene State College - Usable Documentation - Kevin...
World Usability Day 2014 - Keene State College - Usable Documentation - Kevin...World Usability Day 2014 - Keene State College - Usable Documentation - Kevin...
World Usability Day 2014 - Keene State College - Usable Documentation - Kevin...
 

Similar to Writing quality code, as a team.

Scottish Ruby Conference 2014
Scottish Ruby Conference  2014Scottish Ruby Conference  2014
Scottish Ruby Conference 2014
michaelag1971
 
Turning Passion Into Words
Turning Passion Into WordsTurning Passion Into Words
Turning Passion Into Words
Brian Hogan
 
Effective entrepreneurship for developers
Effective entrepreneurship for developersEffective entrepreneurship for developers
Effective entrepreneurship for developers
Carlos Ble
 
Write A Better FM - Ohio Linux 2011
Write A Better FM - Ohio Linux 2011Write A Better FM - Ohio Linux 2011
Write A Better FM - Ohio Linux 2011
Rich Bowen
 
Master Technical Recruiting Workshop: How to Recruit Top Tech Talent
Master Technical Recruiting Workshop:  How to Recruit Top Tech TalentMaster Technical Recruiting Workshop:  How to Recruit Top Tech Talent
Master Technical Recruiting Workshop: How to Recruit Top Tech Talent
RecruitingDaily.com LLC
 

Similar to Writing quality code, as a team. (20)

Software Craftsmanship and Agile Code Games
Software Craftsmanship and Agile Code GamesSoftware Craftsmanship and Agile Code Games
Software Craftsmanship and Agile Code Games
 
12 Things Every Programmer Should Know
12 Things Every Programmer Should Know12 Things Every Programmer Should Know
12 Things Every Programmer Should Know
 
11 rules for programmer should live by
11 rules for programmer should live by11 rules for programmer should live by
11 rules for programmer should live by
 
What I have learned by dealing with a dungeon master
What I have learned by dealing with a dungeon masterWhat I have learned by dealing with a dungeon master
What I have learned by dealing with a dungeon master
 
Scottish Ruby Conference 2014
Scottish Ruby Conference  2014Scottish Ruby Conference  2014
Scottish Ruby Conference 2014
 
How to get the most out of code reviews
How to get the most out of code reviewsHow to get the most out of code reviews
How to get the most out of code reviews
 
Networking Campaign Workshop
Networking Campaign WorkshopNetworking Campaign Workshop
Networking Campaign Workshop
 
Mob Programming for Continuous Learning
Mob Programming for Continuous LearningMob Programming for Continuous Learning
Mob Programming for Continuous Learning
 
Quality rails coding
Quality rails codingQuality rails coding
Quality rails coding
 
Introducing Pair Programming
Introducing Pair ProgrammingIntroducing Pair Programming
Introducing Pair Programming
 
Turning Passion Into Words
Turning Passion Into WordsTurning Passion Into Words
Turning Passion Into Words
 
Developers Best Practices
Developers Best PracticesDevelopers Best Practices
Developers Best Practices
 
Writing Workshop 2
Writing Workshop 2Writing Workshop 2
Writing Workshop 2
 
Secrets of Scrum
Secrets of ScrumSecrets of Scrum
Secrets of Scrum
 
Code smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsCode smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software Odors
 
Effective entrepreneurship for developers
Effective entrepreneurship for developersEffective entrepreneurship for developers
Effective entrepreneurship for developers
 
Write A Better FM - Ohio Linux 2011
Write A Better FM - Ohio Linux 2011Write A Better FM - Ohio Linux 2011
Write A Better FM - Ohio Linux 2011
 
How to improve your skills and how to apply for a job
How to improve your skills and how to apply for a jobHow to improve your skills and how to apply for a job
How to improve your skills and how to apply for a job
 
Master Technical Recruiting Workshop: How to Recruit Top Tech Talent
Master Technical Recruiting Workshop:  How to Recruit Top Tech TalentMaster Technical Recruiting Workshop:  How to Recruit Top Tech Talent
Master Technical Recruiting Workshop: How to Recruit Top Tech Talent
 
Write a better FM
Write a better FMWrite a better FM
Write a better FM
 

Recently uploaded

AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
mbmh111980
 

Recently uploaded (20)

OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 

Writing quality code, as a team.

  • 1. WRITING QUALITY CODE,AS ATEAM DrupalCamp Spain 2014
  • 2. WHAT I DO • Drupal developer at Lullabot. • Drupal contributor. • Contrib maintainer. • Web enthusiast. • Occasional IRC trolling.
  • 3. THIS IS NOT ABOUT • Improving your code skills. • Cookbook on drupalisms. • How to make Drupal good at what it’s bad.
  • 4. DISAPPOINTED? There is a talk about responsive theming right next door!
  • 5. PROJECTS I AM IN • Typically BIG sites. • Media related. • Limited user interaction with Drupal. • Advertisements (random).
  • 6. TEAMS I AM IN • Usually the client has their own tech team. • Drop-in (remote). Drupal expert. • There are other consultants. • Every team has its own culture.
  • 7. THETEAM IS WHAT MATTERS
  • 8. – Jim McCarthy “You can’t have great software without a great team, and most software teams behave like dysfunctional families.”
  • 9. HOWTO KICK ASS INTHETEAM • Know where your strength is. • Make yourself available. • Learn from other people’s code.
  • 10. WASN’TTHIS ABOUT CODE?! Enough of the self help talk!
  • 11. SUGGESTIONS FOR WRITING QUALITY CODE • Track your tasks in a centralized and dedicated tool (PM). • Follow git-flow (make it flexible). • Test the code. • Deploy often.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. W
  • 20. USEFULTOOLS • drush: sql-sync, sql-drop, rsync, devify, … • You will need to import databases from a system of record: mysqldumpp.sh, mysqlrestorep.sh, mysqltransform.py. • HUB • Meme GIFs • Google Hangouts. • Pull request builder!
  • 21. PULL REQUEST BUILDER 1. Someone sends a PR 2. Access check to create a dedicated environment: http:// qa32889.project.com 3. Tear down the environment. 4. Go count money! Deployment with only those changes.
  • 22. TESTINGYOUR CODE • When you write the code and submit the PR. • When another dev reviews your code and tests it in their local environment.* • When QA tests the user story. • When QA does a regression/smoke test. Ideally your code will be tested 4 times.
  • 23. IT’S CHEAPER DOING IT! By now you probably know that there is no such thing as «Quick and dirty», there’s only «Dirty, and many times».
  • 24. – Brian W. Kernighan “Debugging is twice as hard as writing the code in the first place.Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” – ChristopherThompson “Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debugging Monday's code.”
  • 26. AVOID ENDLESS FEEDBACK • Ask for your reviewer to be nit picky. • Write lots of meaningful comments. • Use long variables with meaningful names. • Update the code explanations when making changes.
  • 27.
  • 28. – Martin Golding “Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.”
  • 29.
  • 30. SUGGESTIONS FOR WRITING QUALITY CODE • Track your tasks in a centralized and dedicated tool (PM). • Follow git-flow (make it flexible). • Test the code. • Deploy often.
  • 31. AUTOMATEDTESTING • «Unit» test the key parts of your code. • Use Simpletest for important features. • Automate feature testing.
  • 32. THE JOURNEY OFYOUR CODE • It is born in your local environment. • It’s sent to GitHub as a PR so others can comment on it. • It’s merged in the development environment. • From the development to acceptance to stage. • Deployed to PROD! If you are being agile then you should do this every sprint.