5 ms·
> I find it interesting that generally the first instinct seems to be to use LLMs for writing test code rather than the implementation. Maybe I've done too much
by xboxnolifes 3y ago
> I find it interesting that generally the first instinct seems to be to use LLMs for writing test code rather than the implementation. Maybe I've done too much TDD, but to me the tests describe how the system is supposed to behave. This is very much what I want the human to define and the code should fit within the guardrails set by the tests.
I feel the same way about how test code is viewed even outside of AI. A lot of the time the test code is treated as a lower priority code given to more junior engineers, which seems like the opposite of what you would want.
- zeroonetwothree 3y agoWhen I do code review I always review the tests first. If they look through and reasonable then I can be a lot less careful reviewing the rest.
- postalrat 3y agoTests never cover everything so exactly what are you looking for?
- Muromec 3y agoFor example, just check the list of units, see that there is one for a happy flow, but none for error flow. Check that a number of tests correlates well with apparent cyclomatic complexity of the code. Check that tests are actually defining and testing relevant behavior and not just "I called method A, dus the method B was called".
- pydry 3y agoThis is how I feel too. For me, tests usually end up being a concrete specification which I can execute. Getting LLMs to write tests is like getting LLMs to write my spec.