Texas Sharpshooters and Test-Driven Development The Texas Sharpshooter fallacy describes a bias where patterns are forced to fit preconceived beliefs. TDD increases the likelihood that tests reflect intended behavior rather than confirming flawed code, thus avoiding the “sharpshooting” of writing tests to suit existing, potentially faulty implementations.
Avoid Fakers in Unit Tests Unless you are fuzz testing or your goal is to create property-based tests, test data generators (a.k.a. fakers) are likely to do more harm than good in the long run.
What is a Unit Test? There is a lot of confusion about what unit tests are and how they differ from integration tests. This post provides one viewpoint on what unit tests are.
What Does Bad Code Look Like? What does bad code look like? It may be more interesting to think about bad code in terms of what it feels like.