TDD in a nutshell
Red-Green-Refactor is the pillar of TDD that wraps it into a short and repeatable cycle. By short, we mean very short. The time dedicated to each phase is often counted in minutes, if not seconds. Write a test, see it fail, write just enough implementation code to make the last test pass, run all tests, and pass into the green phase. Once the minimum code is written so that we have safety in the form of passing tests, it is time to refactor the code until it is as good as we're hoping it to be. While in this phase, tests should always pass. Neither new functionalities nor new tests can be introduced while refactoring is in progress. Doing all this in such a short period of time is often scary, or might sound impossible. We hope that, through the exercises we did together, your skills have improved, as well as your confidence and speed.
While there is the word test in TDD, it is not the main benefit nor objective. TDD is, first and foremost, a concept of a better way to design...