Live Coding - TDD FizzBuzz Part 2

TDD FizzBuzz!
Welcome back!

I'm trying a smaller video window - showing just the code, no IDE. With Live Testing turned on, we can still see the test status.

One of the techniques I use to help myself when copy/pasting tests is to modify the body of the test to what I want before modifying the name.

This video continues to show how we verify our test fails for the correct reason.

Always add new behavior without modifying the existing behavior. This allow us to quickly roll back to a known good state.
My favorite example of how to do this is that we know the input and the expected output... Just check and return!!!
This will start to show patterns, ideally. There are some cases it won't...

(I apologize for my sniffles)

Refactoring by the patterns that show up by doing the simplest thing!
When performing unsafe refactoring, don't change existing code until the new stuff works! When using the tool for safe refactoring - It's ok to operate on existing code.

Refactor slowly. Take small steps. Be safe. Be sure.

Show Comments