SlideShare uma empresa Scribd logo
1 de 33
Bootstrapping Quality
Michael Roufa | Roufa Enterprises, Inc | 10/18/2013
mike@roufa.com | @roufamatic
About ME! MEE! MEEEEEEE
• Independent Contractor
• Primarily work with NYC Digital Media Agencies
• Programming for 15 years! OMG IM OLD
• Built some really cool stuff guys seriously
MSE
2010

WOO
Capstone Project
REI Boomerang:

A web application to
automate REI’s rental
business
Built with Java/Spring
Released to
all stores
nationwide
in 2012!
Why did we succeed?
• We took the project seriously.
• We had an awesome sponsor.
• We stuck to Scrum and continually refined our process
• We used industry-standard techniques to maintain a
high level of build quality
• We bribed Jeff early and often
The Rules for Maintaining Build Quality
• There must be an authoritative copy of the source
code that is accessible by the whole team at any time.
• There must be unit tests covering as much of the code
as possible within the authoritative copy.
• The authoritative copy must compile, build, and
execute all tests without errors for the duration of the
project.
Enforcing the Rules

Authoritative Copy 
Centralized Version Control System
Unit tests 
Test-Driven Development
Building without errors 
Continuous Integration
The Authoritative Copy
The Authoritative Copy:
Version Control Systems (VCS)
Subversion: One Centralized Repository
Client

Client

Client

Server

Client

Client
Git/Mercurial: Decentralized, Peer-toPeer
Git/Mercurial: Artificial Centralization
(This is what GitHub does)

Server
General Thoughts on VCS’s
• Thanks to GitHub, Mercurial is not as popular as git.
• Subversion is much simpler than git and is very widely used.
• It is not as good at merging as git
• The centralized model can be a bit slow
• It has a very mature and stable GUI for Windows: TortoiseSVN

• Git is the new hotness.
•
•
•
•

Personal branches are awesome!
It is much more difficult to understand conceptually
So many commands that GUI’s can’t do it justice – use the command line
If you do something wrong, get ready to spend a lot of time on StackOverflow

• If somebody ever says the words “CVS” or “Visual Source Safe”: RUN.
Make sure you check in the right files!
• INCLUDE: all code and tests that you write.
• EXCLUDE: anything that is generated when you compile or build
• EXCLUDE: any third party binaries that are managed by a dependency
tracker (e.g. Maven, NuGet)
• INCLUDE: any third party binaries that are NOT managed by the above
• INCLUDE: Configuration files for servers UNLESS the client specifically
forbids it (e.g. database passwords)
• Google search: “.gitignore c#” or “.gitignore java”
Test-Driven Development
What are Unit Tests?
• Code that tests a component of your system in isolation
• Dependencies on other components are mocked
• Typically written with the help of a Unit Testing Framework
•
•
•
•

JUnit – Java
NUnit – .NET
Jasmine – JavaScript
RSpec – Ruby

• Tests are run using a Test Runner (usually comes with the Framework)
Why bother? I’ll just run the program and
test it that way!
• This kind of testing (“end-user testing”) is important but insufficient.
• Bigger programs can take a long time to compile, build, execute.
• Setting things up just right for a good test can be difficult using a UI
Okay, fine. I’ll do it when I’m done with
the rest of the project.
Bad idea!!!
• The code you’ve already written may be resistant to automated tests.
• If you wait till the end, there will be no time left.
So when do I write tests?

Write them before
you write your code!
The TDD Method
1.
2.
3.
4.
5.
6.
7.
8.

Pick a single requirement to implement.
Write a test that shows you’ve implemented it.
Add the minimum code so the project compiles.
Verify that the test fails.
Implement the requirement.
Verify that the test passes.
Refactor, ensuring all tests still pass.
Go to step 1.
My new client: FizzBuzz Inc.
“We need a specialized console application that can print the numbers
from 1-100. Every time it prints a number divisible by 3, it should write
the word fizz next to the number. Every time it prints a number
divisible by 5, it should write the word buzz next to the number. Oh,
and if it’s divisible by 15, make sure it prints fizzbuzz. Thanks!
Some Cool Things that Just Happened
• Executed the application only at the very end.
• We ended up with a reusable service module!
• The UI piece became very dumb.
New Requirement (time permitting)
For the number 98, print the text from the latest @roufamatic tweet.
Dependency Injection
• Create SERVICES that do interesting things
• Give those services an INTERFACE
• Pass that INTERFACE into classes that depend on the service
• Wire up the SERVICE on application startup
• Recommend: an Inversion of Control Container can handle the wiring
for you
• Java: Spring
• .NET: StructureMap, Castle Windsor, Ninject, Unity
• JavaScript: AngularJS  wicked awesome JS framework!
TDD – Tips to keep yourself sane
• Testability is more important than 100% test coverage.*
• “Testability correlates with maintainability” (Wiechers, Software Requirements) – it’s
easier to add features to testable code.
• When testable code breaks in the field, it’s easy to debug: just write a test!

• Use TDD to establish your architecture, then use as needed to feel
confident. (i.e. Cover the Scary Bits)
• Beware “Copy Pasta” in tests – D.R.Y. it up
• UI’s are resistant to testing. Make them as dumb as possible so they don’t
need it.
• Use in-memory databases (e.g. H2) for testing database access code
• Try a continuous test runner! MightyMoose (.NET), Infinitest (Eclipse),
Karma (Jasmine/JavaScript)
* - except in life-threatening situations!
Continuous Integration
Continuous Integration in a nutshell
• Set up a server that watches VCS for changes
• When any changes occur, the server:
• Builds the solution
• Runs all unit tests
• Places the built files somewhere accessible (e.g. a shared development
website)

• If there are any errors in any of the above, the server alerts everybody
on the team.
Continuous Integration Servers
Great Java/Maven integration
Huge plugin library for everything else

Great .NET integration (or so I’m told)

One of the first, but I don’t hear
about it as often
Quick tour of Jenkins (Is there really any
time left?)
• http://roufasutalk.cloudapp.net:8080
• This actually took me long enough to set up that I’m wondering if it’s
time I checked out TeamCity… Other JetBrains products are stellar…
Hmm…..
In Conclusion
• Take steps now to improve your final product later!
• There is some initial pain to get set up and to work within the
system…
• Once you are used to it, your confidence in making changes will
increase while your bugs decrease.
Bootstrapping Quality

Mais conteúdo relacionado

Mais procurados

AgileLINC Continous Slides by Daniel Harp
AgileLINC Continous Slides by Daniel HarpAgileLINC Continous Slides by Daniel Harp
AgileLINC Continous Slides by Daniel Harp
Barry Gavril
 
Unit testing
Unit testingUnit testing
Unit testing
Brian Hu
 
Cf objective2014 testing-testingeverywhere
Cf objective2014   testing-testingeverywhereCf objective2014   testing-testingeverywhere
Cf objective2014 testing-testingeverywhere
ColdFusionConference
 
The Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentThe Hard Problems of Continuous Deployment
The Hard Problems of Continuous Deployment
Timothy Fitz
 

Mais procurados (20)

Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
 
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
Keeping Your CI/CD Pipeline as Fast as It Needs to BeKeeping Your CI/CD Pipeline as Fast as It Needs to Be
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
 
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeployContinuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeploy
 
Continuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentContinuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous Deployment
 
Fast end-to-end-tests
Fast end-to-end-testsFast end-to-end-tests
Fast end-to-end-tests
 
Continuous Integration: How I stopped guessing if that merge was bad
Continuous Integration: How I stopped guessing if that merge was badContinuous Integration: How I stopped guessing if that merge was bad
Continuous Integration: How I stopped guessing if that merge was bad
 
Putting the pro in programmer
Putting the pro in programmerPutting the pro in programmer
Putting the pro in programmer
 
AgileLINC Continous Slides by Daniel Harp
AgileLINC Continous Slides by Daniel HarpAgileLINC Continous Slides by Daniel Harp
AgileLINC Continous Slides by Daniel Harp
 
Unit testing
Unit testingUnit testing
Unit testing
 
Cf objective2014 testing-testingeverywhere
Cf objective2014   testing-testingeverywhereCf objective2014   testing-testingeverywhere
Cf objective2014 testing-testingeverywhere
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
Continuous Deployment of Rails Applications
Continuous Deployment of Rails ApplicationsContinuous Deployment of Rails Applications
Continuous Deployment of Rails Applications
 
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
 
Continuous Integration for Beginners
Continuous Integration for BeginnersContinuous Integration for Beginners
Continuous Integration for Beginners
 
Lets talk about CI CD Pipeline in Agile
Lets talk about CI CD Pipeline in Agile Lets talk about CI CD Pipeline in Agile
Lets talk about CI CD Pipeline in Agile
 
The Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentThe Hard Problems of Continuous Deployment
The Hard Problems of Continuous Deployment
 
Automated Performance Testing
Automated Performance TestingAutomated Performance Testing
Automated Performance Testing
 
Step away from that knife!
Step away from that knife!Step away from that knife!
Step away from that knife!
 
Cd syd
Cd sydCd syd
Cd syd
 
QA Automation testing online training
QA Automation testing online trainingQA Automation testing online training
QA Automation testing online training
 

Destaque (12)

Hauptfeld Doppel
Hauptfeld DoppelHauptfeld Doppel
Hauptfeld Doppel
 
Leccion 3. desarrollo de habilidades
Leccion 3. desarrollo de habilidadesLeccion 3. desarrollo de habilidades
Leccion 3. desarrollo de habilidades
 
2014 OCB Pine Tree State Event Poster Top
2014 OCB Pine Tree State Event Poster Top2014 OCB Pine Tree State Event Poster Top
2014 OCB Pine Tree State Event Poster Top
 
Leccion 6. desarrollo de habilidades del pensamiento
Leccion 6. desarrollo de habilidades del pensamientoLeccion 6. desarrollo de habilidades del pensamiento
Leccion 6. desarrollo de habilidades del pensamiento
 
Leccion 5. desarrollo de las habilidades del pensamiento
Leccion 5. desarrollo de las habilidades del pensamientoLeccion 5. desarrollo de las habilidades del pensamiento
Leccion 5. desarrollo de las habilidades del pensamiento
 
Leasing
LeasingLeasing
Leasing
 
Underwriting
UnderwritingUnderwriting
Underwriting
 
Joint venture
Joint ventureJoint venture
Joint venture
 
Know how
Know howKnow how
Know how
 
Management
ManagementManagement
Management
 
Outsorcing
OutsorcingOutsorcing
Outsorcing
 
El campo t
El campo tEl campo t
El campo t
 

Semelhante a Bootstrapping Quality

Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
BestBrains
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
Einar Ingebrigtsen
 

Semelhante a Bootstrapping Quality (20)

Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
 
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
 
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
 
Enterprise PHP
Enterprise PHPEnterprise PHP
Enterprise PHP
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
Topic production code
Topic production codeTopic production code
Topic production code
 
High Performance Software Engineering Teams
High Performance Software Engineering TeamsHigh Performance Software Engineering Teams
High Performance Software Engineering Teams
 
Continuous integration, delivery & deployment
Continuous integration,  delivery & deploymentContinuous integration,  delivery & deployment
Continuous integration, delivery & deployment
 
Continuous delivery in practice (public)
Continuous delivery in practice (public)Continuous delivery in practice (public)
Continuous delivery in practice (public)
 
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austinDev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Continuous Integration - What even is it?
Continuous Integration - What even is it?Continuous Integration - What even is it?
Continuous Integration - What even is it?
 
Building High Quality Android Applications
Building High Quality Android ApplicationsBuilding High Quality Android Applications
Building High Quality Android Applications
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
 
Continuous Testing With Terraform
Continuous Testing With TerraformContinuous Testing With Terraform
Continuous Testing With Terraform
 
Preparing for DevOps
Preparing for DevOpsPreparing for DevOps
Preparing for DevOps
 
Introduction to jenkins for the net developer
Introduction to jenkins for the net developerIntroduction to jenkins for the net developer
Introduction to jenkins for the net developer
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Bootstrapping Quality

  • 1. Bootstrapping Quality Michael Roufa | Roufa Enterprises, Inc | 10/18/2013 mike@roufa.com | @roufamatic
  • 2. About ME! MEE! MEEEEEEE • Independent Contractor • Primarily work with NYC Digital Media Agencies • Programming for 15 years! OMG IM OLD • Built some really cool stuff guys seriously
  • 3.
  • 5. Capstone Project REI Boomerang: A web application to automate REI’s rental business Built with Java/Spring
  • 7. Why did we succeed? • We took the project seriously. • We had an awesome sponsor. • We stuck to Scrum and continually refined our process • We used industry-standard techniques to maintain a high level of build quality • We bribed Jeff early and often
  • 8. The Rules for Maintaining Build Quality • There must be an authoritative copy of the source code that is accessible by the whole team at any time. • There must be unit tests covering as much of the code as possible within the authoritative copy. • The authoritative copy must compile, build, and execute all tests without errors for the duration of the project.
  • 9. Enforcing the Rules Authoritative Copy  Centralized Version Control System Unit tests  Test-Driven Development Building without errors  Continuous Integration
  • 11. The Authoritative Copy: Version Control Systems (VCS)
  • 12. Subversion: One Centralized Repository Client Client Client Server Client Client
  • 14. Git/Mercurial: Artificial Centralization (This is what GitHub does) Server
  • 15. General Thoughts on VCS’s • Thanks to GitHub, Mercurial is not as popular as git. • Subversion is much simpler than git and is very widely used. • It is not as good at merging as git • The centralized model can be a bit slow • It has a very mature and stable GUI for Windows: TortoiseSVN • Git is the new hotness. • • • • Personal branches are awesome! It is much more difficult to understand conceptually So many commands that GUI’s can’t do it justice – use the command line If you do something wrong, get ready to spend a lot of time on StackOverflow • If somebody ever says the words “CVS” or “Visual Source Safe”: RUN.
  • 16. Make sure you check in the right files! • INCLUDE: all code and tests that you write. • EXCLUDE: anything that is generated when you compile or build • EXCLUDE: any third party binaries that are managed by a dependency tracker (e.g. Maven, NuGet) • INCLUDE: any third party binaries that are NOT managed by the above • INCLUDE: Configuration files for servers UNLESS the client specifically forbids it (e.g. database passwords) • Google search: “.gitignore c#” or “.gitignore java”
  • 18. What are Unit Tests? • Code that tests a component of your system in isolation • Dependencies on other components are mocked • Typically written with the help of a Unit Testing Framework • • • • JUnit – Java NUnit – .NET Jasmine – JavaScript RSpec – Ruby • Tests are run using a Test Runner (usually comes with the Framework)
  • 19. Why bother? I’ll just run the program and test it that way! • This kind of testing (“end-user testing”) is important but insufficient. • Bigger programs can take a long time to compile, build, execute. • Setting things up just right for a good test can be difficult using a UI
  • 20. Okay, fine. I’ll do it when I’m done with the rest of the project. Bad idea!!! • The code you’ve already written may be resistant to automated tests. • If you wait till the end, there will be no time left.
  • 21. So when do I write tests? Write them before you write your code!
  • 22. The TDD Method 1. 2. 3. 4. 5. 6. 7. 8. Pick a single requirement to implement. Write a test that shows you’ve implemented it. Add the minimum code so the project compiles. Verify that the test fails. Implement the requirement. Verify that the test passes. Refactor, ensuring all tests still pass. Go to step 1.
  • 23. My new client: FizzBuzz Inc. “We need a specialized console application that can print the numbers from 1-100. Every time it prints a number divisible by 3, it should write the word fizz next to the number. Every time it prints a number divisible by 5, it should write the word buzz next to the number. Oh, and if it’s divisible by 15, make sure it prints fizzbuzz. Thanks!
  • 24. Some Cool Things that Just Happened • Executed the application only at the very end. • We ended up with a reusable service module! • The UI piece became very dumb.
  • 25. New Requirement (time permitting) For the number 98, print the text from the latest @roufamatic tweet.
  • 26. Dependency Injection • Create SERVICES that do interesting things • Give those services an INTERFACE • Pass that INTERFACE into classes that depend on the service • Wire up the SERVICE on application startup • Recommend: an Inversion of Control Container can handle the wiring for you • Java: Spring • .NET: StructureMap, Castle Windsor, Ninject, Unity • JavaScript: AngularJS  wicked awesome JS framework!
  • 27. TDD – Tips to keep yourself sane • Testability is more important than 100% test coverage.* • “Testability correlates with maintainability” (Wiechers, Software Requirements) – it’s easier to add features to testable code. • When testable code breaks in the field, it’s easy to debug: just write a test! • Use TDD to establish your architecture, then use as needed to feel confident. (i.e. Cover the Scary Bits) • Beware “Copy Pasta” in tests – D.R.Y. it up • UI’s are resistant to testing. Make them as dumb as possible so they don’t need it. • Use in-memory databases (e.g. H2) for testing database access code • Try a continuous test runner! MightyMoose (.NET), Infinitest (Eclipse), Karma (Jasmine/JavaScript) * - except in life-threatening situations!
  • 29. Continuous Integration in a nutshell • Set up a server that watches VCS for changes • When any changes occur, the server: • Builds the solution • Runs all unit tests • Places the built files somewhere accessible (e.g. a shared development website) • If there are any errors in any of the above, the server alerts everybody on the team.
  • 30. Continuous Integration Servers Great Java/Maven integration Huge plugin library for everything else Great .NET integration (or so I’m told) One of the first, but I don’t hear about it as often
  • 31. Quick tour of Jenkins (Is there really any time left?) • http://roufasutalk.cloudapp.net:8080 • This actually took me long enough to set up that I’m wondering if it’s time I checked out TeamCity… Other JetBrains products are stellar… Hmm…..
  • 32. In Conclusion • Take steps now to improve your final product later! • There is some initial pain to get set up and to work within the system… • Once you are used to it, your confidence in making changes will increase while your bugs decrease.