Best practices
Coding best practices are a set of informal rules that the software development community has developed over time, which can help to improve the quality of software. While each application needs a level of creativity and originality (after all, we're trying to build something new or better), coding practices help us avoid some of the problems others faced before us. If you're just starting with TDD, it is a good idea to apply some (if not all) of the best practices generated by others.
For easier classification of TDD best practices, we divided them into four categories:
- Naming conventions
- Processes
- Development practices
- Tools
As you'll see, not all of them are exclusive to TDD. Since a big part of TDD consists of writing tests, many of the best practices presented in the following sections apply to testing in general, while others are related to general coding best practices. No matter the origin, all of them are useful when practicing TDD.
Take the advice with a certain dose of...