Test Driven Development
In plain terms
Writing the test first, then the code to make it pass.
Going deeper
TDD follows red-green-refactor: write a failing test, write minimal code to pass it, then clean up. It clarifies requirements and builds a safety net as you go.
Under the hood
The red-green-refactor cycle drives design and yields a safety net, but rigid TDD can slow exploratory work; pairs well with clear requirements.
Examples
Writing a failing assertEqual first, then the function; kata exercises; pytest/JUnit cycles.
Think of it like...
Like writing the answer key before the exam, then crafting questions that produce exactly those answers.