3 ms·
Bad code is only really bad if it needs to be maintained. If your AI reliably generates working code from a detailed prompt, the prompt is now the source that
by BurningFrog 11mo ago
Bad code is only really bad if it needs to be maintained.
If your AI reliably generates working code from a detailed prompt, the prompt is now the source that needs to be maintained. There is no important reason to even look at the generated code
- AlexandrB 11mo agoI think this might be plausible in the future, but it needs a lot more tooling. For starters you need to be able to run the prompt through the exact same model so you can reproduce a "build".
- josephg 11mo agoEven the exact same model isn't enough. There are several sources of nondeterminism in LLMs. These would all need to be squashed or seeded - which as far as I know isn't a feature that openai / anthropic / etc provide.
- BurningFrog 11mo agoOK, then the current models aren't as good as I thought/hoped. I guess one thing it means is that we still need extensive test suites. I suppose an LLM can write those too.
- josephg 11mo agoWell.. except the AI models are nondeterministic. If you ask an AI the same prompt 20 times, you'll get 20 different answers. Some of them might work, some probably won't. It usually takes a human to tell which are which and fix problems & refactor. If you keep the prompt, you can't manually modify the generated code afterwards (since it'll be regenerated). Even if you get the AI to write all the code correctly, there's no guarantee it'll do the same thing next time.
- anon7725 11mo ago> the prompt is now the source that needs to be maintained The inference response to the prompt is not deterministic. In fact, it’s probably chaotic since small changes to the prompt can produce large changes to the inference.
- CamperBob2 11mo agoThe inference response to the prompt is not deterministic. So? Nobody cares. Is the output of your C compiler the same every time you run it? How about your FPGA synthesis tool? Is that deterministic? Are you sure? What difference does it make, as long as the code works?
- josephg 11mo agoThe C compiler will still make working programs every time, so long as your code isn’t broken. But sometimes the code chatgpt produces won’t work. Or it'll kinda work but you’ll get weird, different bugs each time you generate it. No thanks.
- CamperBob2 11mo agoNothing matters but d/dt. It's so much better than it was a year ago, it's not even funny. How weird would it be if something like this worked perfectly out of the box, with no need for further improvement and refinement?
- antiloper 11mo ago> Is the output of your C compiler the same every time you run it? Yes? Because of actual engineering mind you and not rolling the dice until the lucky number comes up. https://reproducibility.nixos.social/evaluations/2/2d293cbfa5a7 https://reproducibility.nixos.social/evaluations/2/2d293cbfa...
- CamperBob2 11mo agoIt's not true for a place-and-route engine, so why does it have to be true for a C compiler? Nobody else cares. If you do, that's great, I guess... but you'll be outcompeted by people who don't.
- antiloper 11mo agoI'm glad you asked! https://reproducible-builds.org/ https://reproducible-builds.org/