Hacker News new | ask | show | jobs
by darkerside 1117 days ago
Depends on the code. If AI can quickly write even mediocre quality automated tests, that's a tremendous speedup, and, if I'm being totally honest, morale boost.
2 comments

If AI can write your tests, you're testing likely implementation details. This has "negative value"!

https://www.youtube.com/watch?v=EZ05e7EMOLM

But an AI can't write higher level tests as it would need to understand large chunks of code (sometimes whole systems), which it can't.

I disagree about negative value. When it's this easy to throw away and rewrite tests, it's helpful to test the implementation details of your code.
Throwing away and rewriting tests is work (== negative value).

Testing implementation details is always contra productive. Have you watched the video? (I'm not recommending videos often, as I think writings have more value per time-unit, but this talk is a kind of classic on that topic.)

Sorry, I can't accept that a one hour video is the cost to participate in this conversation. I don't disagree that there is a cost associated with doing this, but the cost is so much smaller than it used to be that it can be economical now.

Implementation details are in the eye of the beholder IMO. I'm open to reasons why that's not the case here.

It can. I use aider/GPT-4 for this all the time. It’s super valuable and very low effort.