Hacker News new | past | comments | ask | show | jobs | submit login
TDD Outcomes (tidyfirst.substack.com)
1 point by mpweiher on Nov 26, 2023 | hide | past | favorite | 1 comment



The negative outcome with structure-coupled tests is because people don't understand how to write good tests. If the code is already in place some programmers reach in and inspects the existing implementation details as a test. Often in ways that fail to catch edge cases.

Writing good tests alone is like the majority of the benefit of TDD. If people don't have the implementation to couple their tests to, they're forced into a thought process that discourages brittle tests specific to an implementation. Then that forces a kindof sensible API instead of an ad-hoc code snowball.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: