I've been using code generation daily for about 3 months now and there are serious ups as well as downs.
+ It works great for seniors who can break down the problem and get it to do the work
- Its terrible in the hands of juniors. They'll generate something and not bother to check it in any way, they don't get to think about the problem and as a result don't learn anything. If you have a junior who's one of the types who you give a problem to, then they come back 30 minutes later and shrug while saying they don't know how to do it; well, now they're going to run it through AI thinking that its working, then its going to be your problem to have to check what the AI did, iterate and fix.
+ Its great at self-contained black box code with very few inputs/outputs (ie. 1 input method, perform calculations and then output something)
+ Its excellent at simple code, CRUD, statements, language features, issues etc.
- Its terrible at understanding how humans call into code, as a result if your generated code has many calling points there will be no clear grouping of endpoints etc., as a result of that unless if you're creating your statements very explicitly you're going to end up with terrible code libraries
- Because it can generate so fast you tend to think less in terms of libraries, you're not saving code that you know is working for re-use etc.
+ If it can one-shot something its usually of decent+ quality
- If it can't and you need to make additions then the quality is going to keep on decreasing with every request
- When you're asking it to generate code there's no cleanup of previous methods etc., so if you're going through several versions/variants then you often end up with a lot of dead code. Its fine if the problem space is simple, but if its not and (like a junior) you don't understand it very well then you'll have no clue what's going on
- I tried Copilot for some time along with suggestions. At first it seems great but you quickly realise that its coming up with a ton of garbage as well. Mentally having to read through all of those takes a toll on you and you're better off without it
Probably the biggest con in my opinion:
For any problem area that's not well understood, while coding us humans build up a mental map of the code, let's call it a directed graph of some kind. While coding we're refining this mental map to figure out the problem, then we're applying that to the code.
When you're delegating to the AI you have no map, so when you're trying to work with the code its as if you're working on some foreign codebase you've just picked up, and as a result your efficiency/output keeps dropping instead of increasing.