Test Driven Development (TDD) was originally "rediscovered" by Kent Beck in the late 1990s. It is a technique that guides software development through the Red-Green-Refactor cycle: First, write a new test for a specific functionality or feature that will fail initially (Red). Then, write the minimal code needed to make this test and all previous tests pass (Green). Finally, refactor both the functional code and tests to improve code quality while keeping all tests green (Refactor). This cycle repeats for each new piece of functionality.
As with all techniques, TDD takes practice to become comfortable with, but we are convinced that it is worth the investment and improves our software design. The benefits become apparent when comparing TDD to the industry practice of writing tests after implementation. We find post-implementation tests harder to write and they do not provide the same level of confidence when they pass. Additionally, TDD can accelerate development by providing faster feedback during implementation and enabling feature-wise development that benefits from cognitive ease when writing both test and production code. Pro hint: Consider ending your workday with a new red test - it serves as the perfect reminder of where to continue your work the next day, helping you get back into the flow quickly without keeping mental overhead after calling it a day!