Live data from Hacker News

Getting AI to write good SQL

cloud.google.com

161–170 of 379 posts

Re: Getting AI to write good SQL

#161
post #110

Every once in a while I've been trying AI, since everyone and their mother told me to, so I comply. My recent endevour was with Gemini 2.5: - Write me a simple todo app on cloudflare with auth0 authentication. - Here's a simple todo on cloudflare. We import the @auth0-cloudflare and... - Does that @auth0-cloudflare exists? - Oh, it doesn't. I can give you a walkthrough on how to set up an account on auth0. Would you…

The worse part is not even being trolled at AI roundabout. The worse part is gaslighting by people who then go on to imply that I'm dumb to not be able to 'guide' the model 'towards the solution', whatever the fuck that means. And this is after telling me that model is so smart to just know what I want. Claude and Gemini are pretty decent at providing a small and tight function definition with well defined parameters…

You're the one doing the gaslighting now. "It doesn't work for me, therefore it can't possibly work for anyone else."

Re: Getting AI to write good SQL

#162

Earlier quoted context omitted.

How do you use it exactly? Does it integrate with any IDEs?

Give Cline + vscode a try. Make sure to implement the "memory bank"...see Cline docs at cline.bot

Roo Code + Roo Commander + Openrouter (connecting Gemini with Vertex AI) + Context7

Re: Getting AI to write good SQL

#163
post #138

Earlier quoted context omitted.

The worse part is not even being trolled at AI roundabout. The worse part is gaslighting by people who then go on to imply that I'm dumb to not be able to 'guide' the model 'towards the solution', whatever the fuck that means. And this is after telling me that model is so smart to just know what I want. Claude and Gemini are pretty decent at providing a small and tight function definition with well defined parameters…

Remember, if AI couldn't solve your problem, you were probably using the wrong model. Did you try with o5-selfsuck-20250523-512B?

Yeah it's my favourite argument. Apparently this magical tool that can replace engineers and can do and write anything needs you to write prompts so detailed that you could have just written the damn code yourself, and probably had an easier time with it to boot.

The whole thing feels like we're in a collective delusion because idiotic managers and C-suites are blindly lapping up the advertising slop coming from the AI companies.

Re: Getting AI to write good SQL

#164
The game changer for me will be when AI stops hallucinating SDK methods. I often find myself asking ”show me how to do advanced concept X in somewhat niche Y sdk”, and while it produces confident answers, 90% of the time it is suggesting SDK methods that do not exist, so a lot of time is wasted just arguing about that

Re: Getting AI to write good SQL

#165
post #148

The article comments "out of the box, LLMs are particularly good at tasks like creative writing" but I think this actually demonstrates the problem with the ai. A writer won't think that they're good at creative writing. In fact, I'm pretty sure they'd think LLM's are terrible at creative writing. In other words, to an expert in their field, they're not that good - at least not yet. But to someone who is not an exper…

Yes, but why is then everyone on HN claiming LLMs can code on expert level?

Re: Getting AI to write good SQL

#167

The game changer for me will be when AI stops hallucinating SDK methods. I often find myself asking ”show me how to do advanced concept X in somewhat niche Y sdk”, and while it produces confident answers, 90% of the time it is suggesting SDK methods that do not exist, so a lot of time is wasted just arguing about that

The current method of solving this is providing the AI with the documentation of the SDKs your code uses. Current LLMs have quite big context windows so you can feed them a lot of documentation. Some tools can even crawl multipage documentation and index them for the use of LLMs.

Re: Getting AI to write good SQL

#168

Earlier quoted context omitted.

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.

You're absolutely right! My mistake. I'll be careful about apologizing too much in the future.

You sound like a Canadian LLM!

Re: Getting AI to write good SQL

#169

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…

How do you use it exactly? Does it integrate with any IDEs?

Just install Cursor, it supports Gemini and many other LLMs right out of the box.

Re: Getting AI to write good SQL

#170

The game changer for me will be when AI stops hallucinating SDK methods. I often find myself asking ”show me how to do advanced concept X in somewhat niche Y sdk”, and while it produces confident answers, 90% of the time it is suggesting SDK methods that do not exist, so a lot of time is wasted just arguing about that

Bring LLMs they always hallucinate an API it would be great to have.

If you had something on the other side to hallucinate the API itself you could have a program that dreams itself into existence as you use it.

Post reply on HN