SlideShare a Scribd company logo
1 of 32
Download to read offline
“Code, Test, Review, Review, Test, Repeat,
Release” This is how we develop as a Team

"CODE, TEST, REVIEW, REVIEW,
TEST, RELEASE, ... AND REPEAT"
THIS IS HOWDoug Green
WE DEVELOP AS A
@dougjgreen
TEAM
#fldc14 #druplart
What’s up with the title?
●
●
●
●
●
●
●
●

You write Code
You Test your own code
You Review your own code
Someone else Review’s your code
Someone else Test’s your code
… repeat
Somewhere above a bot Test’s the code
And finally someone else Test’s your code
Overview
1.
2.
3.
4.
5.
6.
7.

Teams
Using Git and github
Write good code
Code reviews
An agile process
Automated Testing using Behat
Q&A
1. Teams
● You are already part of the “Drupal” Team
● Use a chat room like IRC even if you work in
the same location
● Have meetings in IRC
● Discuss problems in IRC
● Try to solve things yourself first, but ask for
help if you are stuck
2. Overview of git and github
A. What is git? What is github? Why use them?
B. Create a project repo in github, add Drupal and contrib
modules as they are downloaded from d.o, grant team
members access to the project account
C. Fork the repo to your individual account
D. Create a local repository with remotes; also create
upstream develop branch
E. Do work … Make a pull request
F. More about git: rebase, cherry-pick
https://github.com/douggreenconsulting/fldc14
B
C
R
E
A
T
E
R
E
P
O
C
F
O
R
K
O
R
G
R
E
P
O
D. Setup your local repository
● $ git clone git@github.com:douggreen/fldc14.git
○ This will add the remote “origin”
● $ git remote add upstream git@github.com:
douggreenconsulting/fldc14.git
● $ git checkout -b develop
● $ git push upstream develop
● $ git push origin develop
● $ git checkout -b feature-1234
○ Do work
● $ git checkin -m’Initial commit of fldc14 module’
E
P
U
L
L
R
E
Q
U
E
S
T
3. Write good code
●
●
●
●
●
●

follow coding standards, why ...
use Drupal API’s
refactor to minimize duplicative code
use standard names for things
use tools like coder and php code sniffer
configure your editor to automatically indent and replace
tabs, phpstorm is excellent
More about git
● $ git rebase develop
● $ git cherry-pick 74c0d02
● ~/.gitconfig:
[alias]
ci = commit -a
switch = checkout
praise = blame
Write good code by testing it!
In order of priority, from the very least to the gold standard
1.
2.
3.
4.
5.
6.
7.
8.

locally always use $error_level = 2
○ settings.php or drush sync_enable
check for syntax errors
○ php -l
visit the home page, look for warnings
write test instructions for others, note possible edge cases
follow your own test instructions manually
check watchdog log
○ drush wd-show --tail
write test instructions in Gherkin
run Gherkin tests in Behat
4. Code Reviews
●
●
●
●
●

patterns, standards
check for proper API usage
check for consistent internal function calls
check for standardized naming of things
check for good comments, sentences, and that the
comment make sense. We want maintainable code.
● pull locally if you must, sometimes diffs are hard to read
● can this custom change be a patch, contrib module, did
you include a patch file in the patches/ directory?
You can use git instead of github
$ git remote add doug origin git@github.com:
douggreen/fldc14.git
$ git pull doug ticket-1234
$ git checkout develop
$ git pull doug ticket-1234
● you’ll be asked for a merge comment here
$ git push upstream develop
Coding for dev/qa/prod releases
● Use update handlers, never ask a RM to click on
something, it’s not reproducible: module_enable,
configuration changes, field creation, everything
● local.settings.inc, included from settings.php, symlinked
per environment, include dbsettings.inc from local.
settings.inc
● $conf[‘var’] in settings.php instead of variable_set
● put Drupal and contrib and patches in repository so that
you can deploy everything together, and you can
maintain upgrades knowing the patch’s to re-apply
An agile process
● Somewhat discussed in Drupal Watchdog
“Release Management ‘On The Truck’” http:
//drupalwatchdog.com/1/1/release-management-on-the-truck

●
●
●
●
●

Weekly sprints (5 Business Days)
Day 1: take risk
Day 3-4: solidify release, no regressions
Day 5: release
It takes practice to work on a weekly sprint
Behat Automated Testing
● Takes real commitment from an organization to write
automated tests
● every developer should write tests
● or team of test writers, to do it right, need a team almost
as big as the dev team
● or pair a test writer with a developer on each task
● devs should run tests locally before big PR’s
● best if test results are added to github PR’s
● Use drupalextension, but extend it with your own
context
Q&A

Doug Green
@dougjgreen
#fldc14 #druplart

More Related Content

Viewers also liked

Coaching with the GROW Model
Coaching with the GROW ModelCoaching with the GROW Model
Coaching with the GROW ModelWill Armstrong
 
Attitude ppt(mba hons.)
Attitude ppt(mba hons.)Attitude ppt(mba hons.)
Attitude ppt(mba hons.)Amit Bishnoi
 
Coaching PowerPoint PPT Content Modern Sample
Coaching PowerPoint PPT Content Modern SampleCoaching PowerPoint PPT Content Modern Sample
Coaching PowerPoint PPT Content Modern SampleAndrew Schwartz
 
How To Use The GROW Coaching Model
How To Use The GROW Coaching ModelHow To Use The GROW Coaching Model
How To Use The GROW Coaching ModelSean McPheat
 
COACHING SKILLS POWERPOINT
COACHING SKILLS POWERPOINTCOACHING SKILLS POWERPOINT
COACHING SKILLS POWERPOINTAndrew Schwartz
 
10 Team Motivation Killers and How to Fix Them
10 Team Motivation Killers and How to Fix Them10 Team Motivation Killers and How to Fix Them
10 Team Motivation Killers and How to Fix ThemWeekdone.com
 
Power Of Positive Thinking
Power Of Positive ThinkingPower Of Positive Thinking
Power Of Positive Thinkingbalgates
 
Leader's Guide to Motivate People at Work
Leader's Guide to Motivate People at WorkLeader's Guide to Motivate People at Work
Leader's Guide to Motivate People at WorkWeekdone.com
 

Viewers also liked (10)

Ho – ren – so
Ho – ren – soHo – ren – so
Ho – ren – so
 
Coaching with the GROW Model
Coaching with the GROW ModelCoaching with the GROW Model
Coaching with the GROW Model
 
Attitude ppt(mba hons.)
Attitude ppt(mba hons.)Attitude ppt(mba hons.)
Attitude ppt(mba hons.)
 
Coaching PowerPoint PPT Content Modern Sample
Coaching PowerPoint PPT Content Modern SampleCoaching PowerPoint PPT Content Modern Sample
Coaching PowerPoint PPT Content Modern Sample
 
How To Use The GROW Coaching Model
How To Use The GROW Coaching ModelHow To Use The GROW Coaching Model
How To Use The GROW Coaching Model
 
COACHING SKILLS POWERPOINT
COACHING SKILLS POWERPOINTCOACHING SKILLS POWERPOINT
COACHING SKILLS POWERPOINT
 
10 Team Motivation Killers and How to Fix Them
10 Team Motivation Killers and How to Fix Them10 Team Motivation Killers and How to Fix Them
10 Team Motivation Killers and How to Fix Them
 
Power Of Positive Thinking
Power Of Positive ThinkingPower Of Positive Thinking
Power Of Positive Thinking
 
Positive attitude ppt
Positive attitude pptPositive attitude ppt
Positive attitude ppt
 
Leader's Guide to Motivate People at Work
Leader's Guide to Motivate People at WorkLeader's Guide to Motivate People at Work
Leader's Guide to Motivate People at Work
 

Recently uploaded

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
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
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
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
 
"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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
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
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
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
 
"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...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

“Code, Test, Review, Review, Test, Repeat, Release” This is how we develop as a Team

  • 1. “Code, Test, Review, Review, Test, Repeat, Release” This is how we develop as a Team "CODE, TEST, REVIEW, REVIEW, TEST, RELEASE, ... AND REPEAT" THIS IS HOWDoug Green WE DEVELOP AS A @dougjgreen TEAM #fldc14 #druplart
  • 2. What’s up with the title? ● ● ● ● ● ● ● ● You write Code You Test your own code You Review your own code Someone else Review’s your code Someone else Test’s your code … repeat Somewhere above a bot Test’s the code And finally someone else Test’s your code
  • 3. Overview 1. 2. 3. 4. 5. 6. 7. Teams Using Git and github Write good code Code reviews An agile process Automated Testing using Behat Q&A
  • 4. 1. Teams ● You are already part of the “Drupal” Team ● Use a chat room like IRC even if you work in the same location ● Have meetings in IRC ● Discuss problems in IRC ● Try to solve things yourself first, but ask for help if you are stuck
  • 5. 2. Overview of git and github A. What is git? What is github? Why use them? B. Create a project repo in github, add Drupal and contrib modules as they are downloaded from d.o, grant team members access to the project account C. Fork the repo to your individual account D. Create a local repository with remotes; also create upstream develop branch E. Do work … Make a pull request F. More about git: rebase, cherry-pick https://github.com/douggreenconsulting/fldc14
  • 7.
  • 9. D. Setup your local repository ● $ git clone git@github.com:douggreen/fldc14.git ○ This will add the remote “origin” ● $ git remote add upstream git@github.com: douggreenconsulting/fldc14.git ● $ git checkout -b develop ● $ git push upstream develop ● $ git push origin develop ● $ git checkout -b feature-1234 ○ Do work ● $ git checkin -m’Initial commit of fldc14 module’
  • 11.
  • 12.
  • 13.
  • 14. 3. Write good code ● ● ● ● ● ● follow coding standards, why ... use Drupal API’s refactor to minimize duplicative code use standard names for things use tools like coder and php code sniffer configure your editor to automatically indent and replace tabs, phpstorm is excellent
  • 15. More about git ● $ git rebase develop ● $ git cherry-pick 74c0d02 ● ~/.gitconfig: [alias] ci = commit -a switch = checkout praise = blame
  • 16. Write good code by testing it! In order of priority, from the very least to the gold standard 1. 2. 3. 4. 5. 6. 7. 8. locally always use $error_level = 2 ○ settings.php or drush sync_enable check for syntax errors ○ php -l visit the home page, look for warnings write test instructions for others, note possible edge cases follow your own test instructions manually check watchdog log ○ drush wd-show --tail write test instructions in Gherkin run Gherkin tests in Behat
  • 17. 4. Code Reviews ● ● ● ● ● patterns, standards check for proper API usage check for consistent internal function calls check for standardized naming of things check for good comments, sentences, and that the comment make sense. We want maintainable code. ● pull locally if you must, sometimes diffs are hard to read ● can this custom change be a patch, contrib module, did you include a patch file in the patches/ directory?
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. You can use git instead of github $ git remote add doug origin git@github.com: douggreen/fldc14.git $ git pull doug ticket-1234 $ git checkout develop $ git pull doug ticket-1234 ● you’ll be asked for a merge comment here $ git push upstream develop
  • 27. Coding for dev/qa/prod releases ● Use update handlers, never ask a RM to click on something, it’s not reproducible: module_enable, configuration changes, field creation, everything ● local.settings.inc, included from settings.php, symlinked per environment, include dbsettings.inc from local. settings.inc ● $conf[‘var’] in settings.php instead of variable_set ● put Drupal and contrib and patches in repository so that you can deploy everything together, and you can maintain upgrades knowing the patch’s to re-apply
  • 28. An agile process ● Somewhat discussed in Drupal Watchdog “Release Management ‘On The Truck’” http: //drupalwatchdog.com/1/1/release-management-on-the-truck ● ● ● ● ● Weekly sprints (5 Business Days) Day 1: take risk Day 3-4: solidify release, no regressions Day 5: release It takes practice to work on a weekly sprint
  • 29. Behat Automated Testing ● Takes real commitment from an organization to write automated tests ● every developer should write tests ● or team of test writers, to do it right, need a team almost as big as the dev team ● or pair a test writer with a developer on each task ● devs should run tests locally before big PR’s ● best if test results are added to github PR’s ● Use drupalextension, but extend it with your own context
  • 30.
  • 31.