Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In my experience, LLMs are strongest when paired with an automated BS filter such as unit tests or linters. I use Cline and after every generation it reads VS Code's warnings & fixes them.

> If an LLM code generator is used, is it better to use it for generating production code and writing tests to verify or write production code and use LLM generated code to produce tests to verify?

I do both.

1. Vibe code the initial design with input on the API/architecture.

2. Use the AI to write tests.

3. Carefully scrutinize the test cases, which are much easier to review than the code.

4. Save both.

5. Go do something else and let the AI modify the code until the tests/linting/etc passes.

6. Review the final product, make edits, and create the PR.

The output of step 1 is guaranteed to be terrible/buggy and difficult to review for correctness, which is why I review the test cases instead because they provide concrete examples.

Step 5 eliminates most of the problems and frees me to review important stuff.

The whole reason I wrote the check is because AI keeps using `int` and I don't want it to.



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

Search: