3 ms·
This is the sweet spot for coding AI - scaffolding when building out greenfield on well-known existing frameworks, and novice-level API usage and procedures. N
by barrkel 3y ago
This is the sweet spot for coding AI - scaffolding when building out greenfield on well-known existing frameworks, and novice-level API usage and procedures.
Nothing wrong with that, we're all novices when picking up something new. I think there's substantial utility here.
I've found the quality of code is often poor though, lacking in safe input handling and error cases. It's basically like Stack Overflow answer code (typically happy path focused), or GitHub projects where someone has uploaded their equivalent of Hello World in a new framework. You can get into a trap, where you try to adjust prompts for more improvement, which may be less efficient than just hacking the code into shape - but you want to try one more prompt, because you might just hit the jackpot.
Other times, the early exchanges strongly bias the rest of the conversation, so sometimes you need to restart to get onto a different track. Auto-regression and context window starts working against you, and the early exchanges look just like few-shot examples to the LLM.
When you have a concrete issue with e.g. a library, and you're trying to achieve something specific enough not to have an example on the internet, you start seeing either hallucinations - convenient methods being invented - or vague suggestions that X or Y can help solve the problem (LLMs love positive language) but the specifics don't work. You've wandered out of the training data distribution and the AI starts looking really limited.
I still use it for learning, seeding initial code for scripts or boilerplate, etc. but I'm not too bullish on AI being able to substantially help the job of a maintenance programmer, not in its current form and interaction style.
- josephg 3y agoYeah I absolutely agree. I wanted to do something reasonably bespoke using IndexedDb in a web browser a few months ago. The documentation for indexeddb is frankly a confusing mess. ChatGPT helped me get started. I asked it to write the code I wanted, and with a bit of back and forth it produced code that barely worked, was overly verbose and had no unit tests. However, it made great use of the indexeddb API. I used that code as a starting point and ended up with something robust and half as long that works great. ChatGPT has read all the documentation and example code so I don’t have to. But I’m still much better at programming. For problems like this, we make a good team.