Hacker News new | past | comments | ask | show | jobs | submit login
Don't Start with Unit Tests (mostlypython.substack.com)
3 points by japhyr on Aug 18, 2023 | hide | past | favorite | 1 comment



There is a significant misconception in that post:

"If you change the implementation of your project, some of your unit tests will break, without anything being wrong with your project"

That is a big but common mistake! You don’t change the implementation for intentional behavior change before you change the test.

See, in TDD the tests define the behavior of my units. If I want anything different, I define it within my test first. Red, refactor, Green.

I know, it takes a lot of discipline to do right, but the benefits are immense.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: