Re: useless for almost everything code wise
This has been 100% of my experience with the thing.
Since we got a subscription at work to Google's AI service - that's supposedly optimised for coding - I thought I'd give it a go and get it to write a simple little browser game for me, just to see how it did. Now, I've not been a web developer in about a decade, but I have just about enough javascript to be able to do what I wanted myself, but I'd expect it to take me a couple of weeks to knock most of the bugs out and re-learn all the various useful libraries that have massively changed since I used them last. How did Gemini do?
Well, it started out really rather well. It created a nicely rendered globe for me to use as the play area, seemed to understand the concept of iterative geodesic partitioning to provide a mostly hexagonal grid to place the pieces on, knocked out a UI that let me select things and pan and rotate the camera. After about an hour of it I was very impressed.
Then the wheels came off. Completely.
Next step was to partition our sphere into a number of cells each of which would function as a territory to be captured in the game. By creating these cells out of collections of the derived hexagons plus the original pentagons that made up the seed polyhedron we can hide the fact that those pentagons are in there from a visual perspective and make the "grid" appear regular.
As soon as it was asked to do this, the clicky UI stopped working. It'd partitioned up the world nicely, but now I couldn't select anything. "Go back and do that again and put the controls back in." I asked it.
At which point it reduced every territory on the sphere to precisely two cells. "No, that's wrong. Put the territory generation code back the way it was, and then revert the UI code" and of course it profusely apologises, admits it's mistake, and... breaks the Z-index rendering so all the game pieces appear behind the terrain.
I ask it if it remembers the conversation we've already had - which it assures me that it does and that it's capable of keeping track of prompt chains thousands of entries long and we'd only been going for a hundred or so. (I hadn't, this was at best about the 50th instruction) So I asked it if it remembered what I told it three prompts ago, which it assured me it did. I asked it if it remembered the state of the code as it was at that point - again it assured me that it did indeed. So, please, discard all changes since that point and put the code back the way it was.
Did it? Of course not, it fixed the Z index bug, but now created a new UI bug and the territory grouping was still broken.
At this point I thought it'd be best if I took a look at the code for myself and... wow. I mean, I've written some garbage in my life, but wow. It was utterly incomprehensible. It was extremely heavily commented, but the comments didn't really explain anything or in some cases even appear to relate to the code they were placed next to. It had created a bunch of objects that had no instances, and attempts to instance objects that didn't exist - which would have been more of a problem if they hadn't been stuck inside functions that were never called.
About 50% of the code in there was dead-ends that appeared to have been included because they existed in whatever training material it had nicked the code that was called from in some form or other, so in they went...
...and that's the kicker. It doesn't understand why that's bad. It doesn't have any clue how the code works. It's just copy-pasting from examples it's found in the training data and iterating until it gets something that runs - which to be fair is pretty much what I do - but the difference is that I know that functions work better when called, and won't attempt to instance objects I didn't define.
Y'know, because I know at least in theory how to write code. It doesn't. And never will.