Most active commenters
  • CuriouslyC(3)

←back to thread

Getting AI to write good SQL

(cloud.google.com)
477 points richards | 36 comments | | HN request time: 1.031s | source | bottom
Show context
wewewedxfgdf ◴[] No.44010757[source]
Can I just say that Google AI Studio with latest Gemini is stunningly, amazingly, game changingly impressive.

It leaves Claude and ChatGPT's coding looking like they are from a different century. It's hard to believe these changes are coming in factors of weeks and months. Last month i could not believe how good Claude is. Today I'm not sure how I could continue programming without Google Gemini in my toolkit.

Gemini AI Studio is such a giant leap ahead in programming I have to pinch myself when I'm using it.

replies(26): >>44010808 #>>44010923 #>>44011434 #>>44011854 #>>44011858 #>>44011954 #>>44012172 #>>44012250 #>>44012251 #>>44012503 #>>44012606 #>>44012629 #>>44013306 #>>44013367 #>>44013381 #>>44013473 #>>44013576 #>>44013719 #>>44013871 #>>44013899 #>>44014263 #>>44014585 #>>44014770 #>>44014917 #>>44014928 #>>44018375 #
1. CuriouslyC ◴[] No.44010923[source]
I'm really surprised more people haven't caught on. Claude can one shot small stuff of similar complexity, but as soon as you start to really push the model into longer, more involved use cases Gemini pulls way ahead. The context handling is so impressive, in addition to using it for coding agents, I use Gemini as a beta reader for a fairly long manuscript (~85k words) and it absolutely nails it, providing a high level report that's comparable to what a solid human beta reader would provide in seconds.
replies(3): >>44010944 #>>44011563 #>>44013373 #
2. wewewedxfgdf ◴[] No.44010944[source]
It is absolutely the greatest golden age in programming ever - all these infinitely wealthy companies spending bajillions competing on who can make the best programming companion.

Apart from the apologising. It's silly when the AI apologises with ever more sincere apologies. There should be no apologies from AIs.

replies(5): >>44011045 #>>44011815 #>>44013284 #>>44013588 #>>44013881 #
3. thingsilearned ◴[] No.44011045[source]
companion or replacement?
replies(3): >>44011187 #>>44012053 #>>44012242 #
4. Terr_ ◴[] No.44011187{3}[source]
... Or saboteur. :p
5. koakuma-chan ◴[] No.44011563[source]
And Gemini is free.
replies(3): >>44011998 #>>44012498 #>>44012727 #
6. yujzgzc ◴[] No.44011815[source]
You're absolutely right! My mistake. I'll be careful about apologizing too much in the future.
replies(1): >>44012834 #
7. scuol ◴[] No.44011998[source]
Well, as with many of Google's services, you pay with your data.

Pay-as-you-go with Gemini does not snort your data for their own purposes (allegedly...).

replies(2): >>44012270 #>>44014975 #
8. tonyhart7 ◴[] No.44012053{3}[source]
they would replace entire software department until AI make bug because endless changes into your javascript framework then they would hire human again to make fix

we literally creating solution for our own problem

replies(1): >>44015575 #
9. surgical_fire ◴[] No.44012242{3}[source]
They are a replacement if your job is only to write code.

Especially if your code contains a few bugs, misconceptions, and is sometimes completely unable to fix mistakes, going back and forth into the same wrong solutions.

This is not to say that AI assistants are useless. They are a good productivity tool, and I can output code much faster, especially for domains I am very familiar with.

That said, these starry-eyed AI circlejerk threads are incredibly cringe.

10. maksimur ◴[] No.44012270{3}[source]
Undoubtedly, but a significant positive aspect is the democratization of this technology that enables access for people who could not afford it, not productively, that is.
11. harvey9 ◴[] No.44012498[source]
The first hit is always free
replies(2): >>44013270 #>>44013594 #
12. nativeit ◴[] No.44012727[source]
We’re all paying for this. In this case, the costs are only abstract, rather than the competing subscription options that are indeed quite tangible _and_ abstract.
13. DonHopkins ◴[] No.44012834{3}[source]
You sound like a Canadian LLM!
replies(1): >>44015299 #
14. hfgjbcgjbvg ◴[] No.44013270{3}[source]
Real.
15. paganel ◴[] No.44013284[source]
> It is absolutely the greatest golden age in programming ever

It depends, because you now have to pay in order to be able to compete against other programmers who're also using AI tools, it wasn't like that in what I'd call the true "golden age", basically the '90s - early part of the 2000s, when the internet was already a thing and one could put together something very cool with just a "basic" text editor.

replies(1): >>44016089 #
16. snthpy ◴[] No.44013373[source]
I also used it to "vibe write" a short story. I use it similarly to vibe coding, I give the theme and structure of the story along with the major sections and tensions and conflicts I want to express and then it filled in the words in my chosen style. I also created an editor persona and then we went back and forth between the editor and writer personas to refine the story.

The Omega Directive: https://snth.prose.sh/the_omega_directive

replies(1): >>44013489 #
17. CuriouslyC ◴[] No.44013489[source]
My writing process is a bit different from my coding process with AI, it's more of an iterative refinement process.

I tend to form the story arc in my head, and outline the major events in a timeline, and create very short summaries of important scenes, then use AI to turn those summaries into rough narrative outlines by asking me questions and then using my answers to fill in the details.

Next I'll feed that abbreviated manuscript into AI and brainstorm as to what's missing/where the flow could use improvement/etc with no consideration for prose quality, and start filling in gaps with new scenes until I feel like I have a compelling rough outline.

Then I just plow from beginning to end rewriting each chapter, first with AI to do a "beta" draft, then I rewrite significant chunks by hand to make things really sharp.

After this is done I'll feed the manuscript back into AI and get it to beta read given my target audience profile and ambitions for the book, and ask it to provide me feedback on how I can improve the book. Then I start editing based on this, occasionally adding/deleting scenes or overhauling ones that don't quite work based on a combination of my and AI's estimation. When Gemini starts telling me it can't think of much to improve the manuscript that's when it's time for human beta readers.

replies(2): >>44013585 #>>44013865 #
18. snthpy ◴[] No.44013585{3}[source]
Thank you for sharing that. I'm going to try that up to "then I rewrite significant chunks by hand to make things really sharp". I'm not a writer a would have never dreamed of writing anything until I gave this a try. I've often had ideas for stories though and using Gemini to bring these to "paper" has felt like a superpower similar how it must feel for people who can't code but now can able to create apps thanks to AI. I think it's a really exciting time!

I've been wondering about what the legalities of the generated content are though since we know that a lot of the artistic source content was used without consent?C an I put the stories on my blog? Or, not that I wanted to, publish them? I guess people use AI generated code everywhere so I guess for practical purposes the cat is out the bag and won't be put back in again.

replies(1): >>44013648 #
19. conartist6 ◴[] No.44013588[source]
Wow yeah I'm old enough to remember when the focus wasn't on the programmers, but on the people the programs were written for.

We used to serve others, but now people are so excited about serving themselves first that there's almost no talk of service to others at all anymore

20. conartist6 ◴[] No.44013594{3}[source]
The investors know it. They're not competing to own this shit like it's gonna stay free.
21. CuriouslyC ◴[] No.44013648{4}[source]
If you've put manual work into curating and assembling AI output, you have copyright. It's only not copyrightable if you had the AI one shot something.
22. priceofmemory ◴[] No.44013865{3}[source]
That sounds very similar to my AI vibe writing process. Start with chapter outlines, then ask AI to fill in the details for each scene. Then ask AI to point out any plot holes or areas for improvement in the chapter (with relation to other chapters). Then go through chapter by chapter for a second rewrite doing the same thing. At ~100k words for a fan-fiction novel but expect to be at about 120k words after this latest rewrite.

https://frypatch.github.io/The-Price-of-Remembering/

23. theropost ◴[] No.44013881[source]
I wish my AI would tell me when I'm going in the wrong direction, instead of just placating my stupid request over and over until I realize.. even though it probably could have suggested a smarter direction, but instead just told me "Great idea! "
replies(4): >>44014908 #>>44014910 #>>44016378 #>>44018328 #
24. Workaccount2 ◴[] No.44014908{3}[source]
I don't know if you have used 2.5, but it is the first model to disagree with directions I have provided...

"..the user suggests using XYZ to move forward, but that would be rather inefficient, perhaps the user is not totally aware of the characteristics of XYZ. We should suggest moving forward with ABC and explain why it is the better choice..."

replies(1): >>44015360 #
25. ◴[] No.44014910{3}[source]
26. Workaccount2 ◴[] No.44014975{3}[source]
The cost to google lying about data privacy far exceeds the profit gained from using it. Alienate your most valuable customers (enterprise) so you can get 10% more training data? And almost certainly end up in a sea of lawsuits from them?

Not happening. Investors would riot.

replies(1): >>44015451 #
27. smoyer ◴[] No.44015299{4}[source]
Eh?
28. redog ◴[] No.44015360{4}[source]
It really gave me a lot of push back once when I wanted to use a js library over a python one for a particular project. Like I gave it my demo code in js and it basically said, "meh, cute but use this python one because ...reasons..."
replies(1): >>44016396 #
29. ayrtondesozzla ◴[] No.44015451{4}[source]
Indeed, the first stage of the enshittification process requires mollycoddling the customer in a convincing manner.

Looking forward to stage 2 - start serving the advertisers while placating the users, and finally stage 3 - offering it all up to the investors while playing the advertisers off each other and continuing to placate the users.

30. roflyear ◴[] No.44015575{4}[source]
Or, just let their users deal with the bugs b/c churn will be less than the cost of developers.
replies(1): >>44018617 #
31. danieldk ◴[] No.44016089{3}[source]
One could put something cool together without internet using Delphi. The Borland IDEs were ahead of their time - built-in debugger, profiler, and pretty good documentation. My 'internet' was the SWAG Pascal snippet collection (which could be used fully offline). Someone converted it to HTML:

http://www.retroarchive.org/swag/index.html

32. rad_gruchalski ◴[] No.44016378{3}[source]
You must be confusing „intelligence” with „statistically most probable next word”.
33. rad_gruchalski ◴[] No.44016396{5}[source]
Wow, you can now pay to have „engineers” being overruled by artificial „intelligence”? People who have no idea are now going to be corrected by an LLM which has no idea by design. Look, even if it gets a lot of things right it’s still trickery.

I get popcorn and wait for more work coming my way 5 years down the road. Someone will have tidy this mess up and gen-covid will have lost all ability to think on their own by then.

34. stirfish ◴[] No.44018328{3}[source]
One trick I found is to tell the llm that an llm wrote the code, whether it did or not. The machine doesn't want to hurt your feelings, but loves to tear apart code it thinks it might've wrote.
replies(1): >>44018387 #
35. jghn ◴[] No.44018387{4}[source]
I like just responding with "are you sure?" continuously. at some point you'll find it gets stuck in a local minima/maxima, and start oscillating. Then I backtrack and look at where it wound up before that. Then I take that solution and go to a fresh session.
36. scottmf ◴[] No.44018617{5}[source]
Right. Look at Electron apps. They're ubiquitous despite the poorer performance and user experience because the benefits outweigh the negatives.

Maintaining a codebase isn't going to be a thing in the future, at least not in the traditional/current sense.