5 ms·
I use LLMs for generating small chunks of code (less than 150 lines) but I am of the opinion that you should always understand what generated cide is doing. I t
by Cyclone_ 2y ago
I use LLMs for generating small chunks of code (less than 150 lines) but I am of the opinion that you should always understand what generated cide is doing. I take time go read through it and make sure it makes sense before I actually run it. I've found that for smaller chunks of code it's usually pretty accurate on the first try. Occasionally it can't figure it out all all, even with trying to massage the prompt to be more descriptive.
- Velorivox 2y agoI use Claude Sonnet to generate large chunks of code, practically as a form of macro expansion. Such as when adapting SQL queries to a new migration, or adding straightforward UI. Even still, it sometimes isn’t great and I would never commit anything without carefully observing what it actually wrote. More importantly, I never ask it to do something I myself don’t know how to do, especially if I suspect a library or best practice exists. In other words, I treat it exactly like stochastic autocomplete. It makes me lazier, I’m sure, but the first part of the article above is a rant against a tautology: any tool worth using ought to be missed by the user if they stopped using it!