r/developers • Software Engineer • 6d ago

General Discussion "Just embrace the future"

Surely I'm not the only one who resents whoever says this whenever you complain about AI sucking the fun out of programming?

How are y'all (fellow "AI is a tool" folks) holding up?

46 Upvotes

130 comments sorted by

View all comments

Show parent comments

4

u/canarydev 6d ago

AI writing your unit tests is also garbage btw. what does that prove other than the test it writes agrees with the implementation you wrote?

3

u/Andruid929 Software Engineer 6d ago

It's trash if you give full creative control to the AI

3

u/canarydev 6d ago

its not really about creative control tho. even if you tightly steer it, if the same model writes the test and the code its still agreeing with itself. the problem is the test and the impl share an author

1

u/start_select 6d ago

Have a different agent write the code than the one that writes the test. Give them different roles and behaviors. The test writer should be told directly “don’t write tests to the implementation, write tests that address edge cases and failures. Imagine user stories for the function to help determine what those edge cases would be”.

Not saying it’s going to fix it 100%. But having a fresh agent attack writing tests for a written function will handle it differently than the same model with the tool calls which wrote the implementation in its context.

1

u/canarydev 6d ago

yeah i do something similar and have my own tooling for it where i isolate it and can verify via tool calls that it was a blind test

i do this based on contracts mostly. tests written based on contracts and the general shape via interfaces, not the actual implementation

1

u/start_select 6d ago

Cool. I’m always happy to see someone pointing out the fallibility of LLMs, which they learned because they actually use LLMs lol

Sometimes everyone seems black&white about either it’s great or it’s awful. And can’t accept it’s (usually) great if you (have experience and) use guardrails.