4 ms·
I find it effective to treat it like a junior, and provide detailed and specific tasks. Ie usual LLM usage. A recent e.g. "Use the Javascript module pattern to
by rukuu001 2y ago
I find it effective to treat it like a junior, and provide detailed and specific tasks. Ie usual LLM usage.
A recent e.g. "Use the Javascript module pattern to create a module that stores audio chunks, recording state, and exposes functions to start and stop recording, and to store audio data"
It's a really simple task, but that prompt saved me 20 minutes of typing and futzing about. It also named the module sensibly, based on context from the rest of the code I guess. Then it prompted me on what to change in the calling code to use the new module (this wasn't 100% right, but still saved me a couple rounds of running the code and fixing problems).
It's taken me a while to change my habit of working out how to do what I want to do and then editing code, to rather just saying what I want to do, and being specific about it.
- dartos 2y agoEven in cases like that, I find that it’s often wrong about whatever package I’m using, unless that package has had a stable long lived api. I can maybe pull snippets out of AI generated code, but more often than not I just ask it for quick examples. Like I would do for stack overflow.