2daycpptddresources

This is a list of resources for a 2-day C++ class covering a rage of topics including:
 * Test Drive Development
 * Refactoring (Martin - Refactoring)
 * rename method
 * rename class
 * extract method
 * extract class
 * replace switch/conditional logic with polymorphism
 * encapsulate typecode
 * Legacy Refactoring (Feathers - Working Effectively with Legacy Code)
 * characterization tests
 * extract class
 * extract method
 * Design Patterns
 * strategy pattern
 * template method pattern
 * abstract factory pattern

Projects

 * RPN Calculator: Here's some source code for the Rpn Calculator in C++ (RPN --> Reverse Polish Notation --> post-fix, think HP calculators)
 * Refactoring (with tests in place): [[file:CalculateRates_clean_code.zip]]
 * Refactoring (conditional logic to polymorphism): [[file:CalculateRates_conditional_to_polymorphism.zip]]
 * ReplaceSwitchWithPolymorphismDetailedRefactoringInstructions
 * Characterization Tests: [[file:CalculateRates_characterization.zip]]
 * After polymorphism applied: [[file:CalculateRates_polymorphism_applied.zip]]

Working in Visual Studio with this Files

 * 1) Download zip file
 * 2) Download CppUTest
 * 3) Get it built in your version of visual studio
 * 4) Create a new project (win 32 console), e.g. RpnCalculator, CleanCode, ReplaceConditionalWithPolymorphism, Characterization, PolymorphismSolved
 * 5) Select solution and add existing project
 * 6) Find your CppUTest solution folder and add the project file
 * 7) Have your new project (RpnCalculator, CleanCode, etc.) depend on the CppUTest project
 * 8) Update your new project's include directory to include the include directory of CppUTest
 * 9) Find the zip file, open it and extract all of the files into the source directory of your project
 * 10) Select your project and add existing, add all of the header and source files