Summary: Test-driven development (TDD) keeps you focused, encourages critical thinking, and improves code confidence. Here are some basic principles that have helped me write effective tests and which have proven useful when introducing other developers to the practice.