Hacker News new | ask | show | jobs
by lolinder 1266 days ago
> For example, I'm not sure if there's much value in learning things like basic SQL queries anymore which was something I had to learn when studying computer science. ChatGPT is great at writing SQL queries if you're able to tell it exactly what you need.

Using ChatGPT to generate something that you can't independently verify is a terrible idea. Most of the time it'll be fine, but when it's not you need to be able to recognize the flaws. Hopefully you at least test it before pushing, but if you don't know how to write the query you also don't know its failure modes, so your tests will likely miss important edge cases.

AI tools are great for speeding up processes you can do by hand, but because they're all statistics you can't count on them to do it alone: some percentage of the time they will inevitably be wrong.

EDIT: Note that this stands in contrast to a wholly deterministic tool like a calculator, which in most circumstances doesn't need to be second guessed.

1 comments

> Using ChatGPT to generate something that you can't independently verify is a terrible idea

It depends. A calculator can calculate things I'd struggle to independently verify with a pen and paper.

I think I wasn't clear enough and you might be taking what I said to it's extreme. I'm not suggesting there is zero value in knowing SQL, I'm saying the value of learning it is now much lower than when I learnt it. While it might be helpful to have a good understanding of SQL to verify a query yourself (especially where performance is a concern), in most cases this likely isn't necessary. For your average select query with a couple of joins and a where clause ChatGPT can generate that and you can verify it at least works by running it.

But maybe SQL isn't the best example. It just came to my mind because I was writing a spatial query for MariaDb recently and I couldn't get the results I wanted after a few Google searches, but ChatGPT got it right first time. It seems to me that query languages have a lot of properties which make ChatGPT very good at writing them, but there are probably other skills which ChatGPT more clearly erodes the value of.