logoalt Hacker News

teerayyesterday at 3:40 PM2 repliesview on HN

That’s why I laugh when people are like “oh, AI writes all the tests, it’s so much easier.” If your code is hard to test, you need to change the abstraction or the interface. Tests are the first reuse of your code, so if it’s a pain to use in tests, it’s going to be terrible to use in general.


Replies

__mharrison__yesterday at 5:31 PM

This is why I teach TDD when I'm teaching agent use to my clients.

layer8yesterday at 4:14 PM

Not to mention that tests are at least as critical to get right as the code that is being tested.

show 1 reply