SlideShare a Scribd company logo
1 of 20
How to grow a sustainable software
development process (for scientific
software)
C. Titus Brown
6/8/15
Questions and suggestions and
skepticism welcome!
The khmer project
• ~13k lines of C++, ~7k lines of Python
• About 8 years old
• ~5 regular developers, ~60 contributors total
• Formal dev/contrib process (khmer.rtfd.org)
• We took a circuitous path… see
“Walking the talk”
http://dx.doi.org/10.6084/m9.figshare.791567
Example
(Creating a new pull request)
A simple three step process.
1. Use version control and create branches for
each feature set.
2. Make up a checklist to fill out at each merge.
3. Adhere to the checklist :)
Version control
With distributed VCS like git or mercurial, there
is no good reason not to use version control
even for small personal projects.
Version control will save your bacon.
A checklist
What goes on the checklist?!
Ideas:
• Two-person merge rule;
• “I ran the tests, and they succeeded”
• “Someone else ran the tests, and they
succeeded”
• “A computer ran the tests automatically, and
they succeeded.”
What goes on the checklist?!
Ideas:
• Code formatting guidelines;
• Code coverage guidelines;
• Spellcheck;
• Changes described in ChangeLog;
• Commit messages make sense;
• Specific feature checks (“command line scripts
should be documented”; “CPython objects should
have XXX”);
Important thing about these rules:
Target things that are causing you pain.
• There are an infinite number of edges to sand
down on any reasonably involved software
project!
• Focus on the painful edges.
(Running the tests.)
(Continuous Integration)
Testing
I don’t personally do Test Driven Development,
although I’m happy to work with people who do.
“Test-Enhanced Development” –
1. Write really simple tests that cover most of the
new code, along with any tricky bits that you
were worried about when writing the code
(~TDD-lite).
2. Then do SDD.
“Stupidity Driven Development”
• Wait until something breaks (user report, bug
found, whatever).
• Write a test that triggers that bug.
• Then, and only then, fix the bug.
That exact bug will never reappear guise in the
codebase :)
Code coverage
Use code coverage as a guide to writing new
tests.
If a line if code isn’t executed by your tests, then
it’s not tested by your tests.
(Just because it’s successfully executed by your
tests doesn’t mean it’s correct!)
Random advice
Automate your tests
• Anything that isn’t automated won’t be run
regularly, if at all.
Keep many tests lightweight
• Only tests that run quickly will be run
regularly.
• E.g. Save obscure cross-platform tests for
releases.
Set up continuous integration, maybe?
• Very useful for cross-platform testing,
integration testing…
• …but people should be running the tests
before they commit, and certainly before
they push.
Have a release process, if you do
releases.
…yet another checklist.
Releases are usually done infrequently, so
remove need for good memory.
Never rewrite both your tests and your
code at the same time.
Otherwise you’ll not only invent exciting new
bugs, but you’ll reimplement boring old ones!

More Related Content

What's hot

What's hot (16)

2016 bergen-sars
2016 bergen-sars2016 bergen-sars
2016 bergen-sars
 
Abcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosasAbcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosas
 
Reproducibility: 10 Simple Rules
Reproducibility: 10 Simple RulesReproducibility: 10 Simple Rules
Reproducibility: 10 Simple Rules
 
Recommendation system for code bugs.
Recommendation system for code bugs.Recommendation system for code bugs.
Recommendation system for code bugs.
 
Containers in Science: neuroimaging use cases
Containers in Science: neuroimaging use casesContainers in Science: neuroimaging use cases
Containers in Science: neuroimaging use cases
 
Reproducibility and replicability: a practical approach
Reproducibility and replicability: a practical approachReproducibility and replicability: a practical approach
Reproducibility and replicability: a practical approach
 
Big data from the LHC commissioning: practical lessons from big science - Sim...
Big data from the LHC commissioning: practical lessons from big science - Sim...Big data from the LHC commissioning: practical lessons from big science - Sim...
Big data from the LHC commissioning: practical lessons from big science - Sim...
 
OpenNeuro: a free online platform for sharing and analysis of neuroimaging data
OpenNeuro: a free online platform for sharing and analysis of neuroimaging dataOpenNeuro: a free online platform for sharing and analysis of neuroimaging data
OpenNeuro: a free online platform for sharing and analysis of neuroimaging data
 
Short story slides
Short story slidesShort story slides
Short story slides
 
Databases, Web Services and Tools For Systems Immunology
Databases, Web Services and Tools For Systems ImmunologyDatabases, Web Services and Tools For Systems Immunology
Databases, Web Services and Tools For Systems Immunology
 
Better science through superior software
Better science through superior softwareBetter science through superior software
Better science through superior software
 
Next-generation sequencing: Data mangement
Next-generation sequencing: Data mangementNext-generation sequencing: Data mangement
Next-generation sequencing: Data mangement
 
2015 aem-grs-keynote
2015 aem-grs-keynote2015 aem-grs-keynote
2015 aem-grs-keynote
 
Virtual Proteomics Analysis Cluster in the Cloud
Virtual Proteomics Analysis Cluster in the CloudVirtual Proteomics Analysis Cluster in the Cloud
Virtual Proteomics Analysis Cluster in the Cloud
 
2016 davis-plantbio
2016 davis-plantbio2016 davis-plantbio
2016 davis-plantbio
 
Real World NLP, ML, and Big Data
Real World NLP, ML, and Big DataReal World NLP, ML, and Big Data
Real World NLP, ML, and Big Data
 

Viewers also liked

Rational App Scan&Policy Tester
Rational App Scan&Policy TesterRational App Scan&Policy Tester
Rational App Scan&Policy Tester
Kristina O'Regan
 
Presentacion Publicidad Digital Automocion Eyeblaster 2010
Presentacion Publicidad Digital Automocion Eyeblaster 2010Presentacion Publicidad Digital Automocion Eyeblaster 2010
Presentacion Publicidad Digital Automocion Eyeblaster 2010
Eyeblaster Spain
 
Kakapo Keynote
Kakapo KeynoteKakapo Keynote
Kakapo Keynote
Takahe One
 
CosmoSales: Integrated Digital Sales Strategy [Global Version]
CosmoSales: Integrated Digital Sales Strategy [Global Version]CosmoSales: Integrated Digital Sales Strategy [Global Version]
CosmoSales: Integrated Digital Sales Strategy [Global Version]
Khomeini Mujahid
 
Osss...!!! Magazine Concept
Osss...!!! Magazine ConceptOsss...!!! Magazine Concept
Osss...!!! Magazine Concept
@rtNya
 

Viewers also liked (20)

Marketing Growth Stack
Marketing Growth StackMarketing Growth Stack
Marketing Growth Stack
 
Inferências - pressuposto e subentendido
Inferências - pressuposto e subentendidoInferências - pressuposto e subentendido
Inferências - pressuposto e subentendido
 
SIMULADO PORTUGUES 8 ANO
SIMULADO PORTUGUES 8 ANO SIMULADO PORTUGUES 8 ANO
SIMULADO PORTUGUES 8 ANO
 
Revisão inicial 8º ano.
Revisão inicial 8º ano.Revisão inicial 8º ano.
Revisão inicial 8º ano.
 
16th Annual Professional Responsibility Seminar
16th Annual Professional Responsibility Seminar16th Annual Professional Responsibility Seminar
16th Annual Professional Responsibility Seminar
 
EO for Bethany
EO for BethanyEO for Bethany
EO for Bethany
 
Allah & Universe
Allah & UniverseAllah & Universe
Allah & Universe
 
Stordfest2010 Festival paper
Stordfest2010 Festival paperStordfest2010 Festival paper
Stordfest2010 Festival paper
 
The beauty-of-mathematics
The beauty-of-mathematicsThe beauty-of-mathematics
The beauty-of-mathematics
 
Exporting to India: Strategies for Success
Exporting to India: Strategies for SuccessExporting to India: Strategies for Success
Exporting to India: Strategies for Success
 
Rational App Scan&Policy Tester
Rational App Scan&Policy TesterRational App Scan&Policy Tester
Rational App Scan&Policy Tester
 
Interactive NETS*S Workshop, ISTE 2011
Interactive NETS*S Workshop, ISTE 2011Interactive NETS*S Workshop, ISTE 2011
Interactive NETS*S Workshop, ISTE 2011
 
2014 davis-talk
2014 davis-talk2014 davis-talk
2014 davis-talk
 
Presentacion Publicidad Digital Automocion Eyeblaster 2010
Presentacion Publicidad Digital Automocion Eyeblaster 2010Presentacion Publicidad Digital Automocion Eyeblaster 2010
Presentacion Publicidad Digital Automocion Eyeblaster 2010
 
Pagerank
PagerankPagerank
Pagerank
 
Kakapo Keynote
Kakapo KeynoteKakapo Keynote
Kakapo Keynote
 
Torture And Beyond
Torture And BeyondTorture And Beyond
Torture And Beyond
 
CosmoSales: Integrated Digital Sales Strategy [Global Version]
CosmoSales: Integrated Digital Sales Strategy [Global Version]CosmoSales: Integrated Digital Sales Strategy [Global Version]
CosmoSales: Integrated Digital Sales Strategy [Global Version]
 
Roman roads
Roman roadsRoman roads
Roman roads
 
Osss...!!! Magazine Concept
Osss...!!! Magazine ConceptOsss...!!! Magazine Concept
Osss...!!! Magazine Concept
 

Similar to 2015 msu-code-review

Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
BestBrains
 
Dev buchan 30 proven tips
Dev buchan 30 proven tipsDev buchan 30 proven tips
Dev buchan 30 proven tips
Bill Buchan
 

Similar to 2015 msu-code-review (20)

Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
 
Bootstrapping Quality
Bootstrapping QualityBootstrapping Quality
Bootstrapping Quality
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)
 
Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
 
Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
Tdd
TddTdd
Tdd
 
Git Makes Me Angry Inside
Git Makes Me Angry InsideGit Makes Me Angry Inside
Git Makes Me Angry Inside
 
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
 
Improving the accuracy and reliability of data analysis code
Improving the accuracy and reliability of data analysis codeImproving the accuracy and reliability of data analysis code
Improving the accuracy and reliability of data analysis code
 
That worked before
That worked beforeThat worked before
That worked before
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
Introduzione allo Unit Testing
Introduzione allo Unit TestingIntroduzione allo Unit Testing
Introduzione allo Unit Testing
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
TDD super mondays-june-2014
TDD super mondays-june-2014TDD super mondays-june-2014
TDD super mondays-june-2014
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
 
Dot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarDot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel Tettelar
 
Topic production code
Topic production codeTopic production code
Topic production code
 
Dev buchan 30 proven tips
Dev buchan 30 proven tipsDev buchan 30 proven tips
Dev buchan 30 proven tips
 
Micro Talk - Test Your S#!? !
Micro Talk - Test Your S#!? !Micro Talk - Test Your S#!? !
Micro Talk - Test Your S#!? !
 

More from c.titus.brown

2014 ismb-extra-slides
2014 ismb-extra-slides2014 ismb-extra-slides
2014 ismb-extra-slides
c.titus.brown
 

More from c.titus.brown (20)

2015 beacon-metagenome-tutorial
2015 beacon-metagenome-tutorial2015 beacon-metagenome-tutorial
2015 beacon-metagenome-tutorial
 
2015 mcgill-talk
2015 mcgill-talk2015 mcgill-talk
2015 mcgill-talk
 
2015 pycon-talk
2015 pycon-talk2015 pycon-talk
2015 pycon-talk
 
2015 opencon-webcast
2015 opencon-webcast2015 opencon-webcast
2015 opencon-webcast
 
2015 vancouver-vanbug
2015 vancouver-vanbug2015 vancouver-vanbug
2015 vancouver-vanbug
 
2015 osu-metagenome
2015 osu-metagenome2015 osu-metagenome
2015 osu-metagenome
 
2015 ohsu-metagenome
2015 ohsu-metagenome2015 ohsu-metagenome
2015 ohsu-metagenome
 
2015 balti-and-bioinformatics
2015 balti-and-bioinformatics2015 balti-and-bioinformatics
2015 balti-and-bioinformatics
 
2015 pag-chicken
2015 pag-chicken2015 pag-chicken
2015 pag-chicken
 
2015 pag-metagenome
2015 pag-metagenome2015 pag-metagenome
2015 pag-metagenome
 
2014 nyu-bio-talk
2014 nyu-bio-talk2014 nyu-bio-talk
2014 nyu-bio-talk
 
2014 bangkok-talk
2014 bangkok-talk2014 bangkok-talk
2014 bangkok-talk
 
2014 anu-canberra-streaming
2014 anu-canberra-streaming2014 anu-canberra-streaming
2014 anu-canberra-streaming
 
2014 aus-agta
2014 aus-agta2014 aus-agta
2014 aus-agta
 
2014 mmg-talk
2014 mmg-talk2014 mmg-talk
2014 mmg-talk
 
2014 nci-edrn
2014 nci-edrn2014 nci-edrn
2014 nci-edrn
 
2014 wcgalp
2014 wcgalp2014 wcgalp
2014 wcgalp
 
2014 moore-ddd
2014 moore-ddd2014 moore-ddd
2014 moore-ddd
 
2014 ismb-extra-slides
2014 ismb-extra-slides2014 ismb-extra-slides
2014 ismb-extra-slides
 
2014 bosc-keynote
2014 bosc-keynote2014 bosc-keynote
2014 bosc-keynote
 

Recently uploaded

Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
MohamedFarag457087
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
NazaninKarimi6
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
PirithiRaju
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
PirithiRaju
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
levieagacer
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
PirithiRaju
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 

Recently uploaded (20)

Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai YoungDubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts ServiceJustdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 

2015 msu-code-review

  • 1. How to grow a sustainable software development process (for scientific software) C. Titus Brown 6/8/15
  • 2. Questions and suggestions and skepticism welcome!
  • 3. The khmer project • ~13k lines of C++, ~7k lines of Python • About 8 years old • ~5 regular developers, ~60 contributors total • Formal dev/contrib process (khmer.rtfd.org) • We took a circuitous path… see “Walking the talk” http://dx.doi.org/10.6084/m9.figshare.791567
  • 4. Example (Creating a new pull request)
  • 5. A simple three step process. 1. Use version control and create branches for each feature set. 2. Make up a checklist to fill out at each merge. 3. Adhere to the checklist :)
  • 6. Version control With distributed VCS like git or mercurial, there is no good reason not to use version control even for small personal projects. Version control will save your bacon.
  • 8. What goes on the checklist?! Ideas: • Two-person merge rule; • “I ran the tests, and they succeeded” • “Someone else ran the tests, and they succeeded” • “A computer ran the tests automatically, and they succeeded.”
  • 9. What goes on the checklist?! Ideas: • Code formatting guidelines; • Code coverage guidelines; • Spellcheck; • Changes described in ChangeLog; • Commit messages make sense; • Specific feature checks (“command line scripts should be documented”; “CPython objects should have XXX”);
  • 10. Important thing about these rules: Target things that are causing you pain. • There are an infinite number of edges to sand down on any reasonably involved software project! • Focus on the painful edges.
  • 12. Testing I don’t personally do Test Driven Development, although I’m happy to work with people who do. “Test-Enhanced Development” – 1. Write really simple tests that cover most of the new code, along with any tricky bits that you were worried about when writing the code (~TDD-lite). 2. Then do SDD.
  • 13. “Stupidity Driven Development” • Wait until something breaks (user report, bug found, whatever). • Write a test that triggers that bug. • Then, and only then, fix the bug. That exact bug will never reappear guise in the codebase :)
  • 14. Code coverage Use code coverage as a guide to writing new tests. If a line if code isn’t executed by your tests, then it’s not tested by your tests. (Just because it’s successfully executed by your tests doesn’t mean it’s correct!)
  • 16. Automate your tests • Anything that isn’t automated won’t be run regularly, if at all.
  • 17. Keep many tests lightweight • Only tests that run quickly will be run regularly. • E.g. Save obscure cross-platform tests for releases.
  • 18. Set up continuous integration, maybe? • Very useful for cross-platform testing, integration testing… • …but people should be running the tests before they commit, and certainly before they push.
  • 19. Have a release process, if you do releases. …yet another checklist. Releases are usually done infrequently, so remove need for good memory.
  • 20. Never rewrite both your tests and your code at the same time. Otherwise you’ll not only invent exciting new bugs, but you’ll reimplement boring old ones!