Live data from Hacker News

Learn SQL, dammit

gun.io

111–118 of 118 posts

Re: Learn SQL, dammit

#111

Earlier quoted context omitted.

> I have a PhD in computing (of some sort, I forget) and I know about 3 SQL commands. I've been developing for decades, and I never need to interact with databases. If you were a developer that did interact with databases (but not a DBA or specifically a "database developer"), you could probably get by with the four that correspond to CRUD operations directly (SELECT, INSERT, UPDATE, DELETE), so knowing "about 3" isn…

Technically, an UPDATE is a DELETE and INSERT. so if you only knew SELECT, DELETE, and INSERT, you could do crud.

I was referring to what you could practically survive with as an application developer who didn't control the databases involved; for the reasons prodigal_erik states in their reply, DELETE + INSERT, while you can do equivalent transformations to UPDATE with them, aren't going to be a general-purpose replacement for developers of real-world applications against real-world databases that they do not control.

Re: Learn SQL, dammit

#112
post #57

Earlier quoted context omitted.

Is C training wheels on assembly?

No. But an ORM is training wheels on SQL.

Right, and (most) C compilers let you fall back on assembly if you absolutely must. So my point still holds, even if you do something silly like employ hyperbole on it.

Re: Learn SQL, dammit

#113

I see no reason why one programmer can't learn just about everything related to their application. I expect the programmers who work for me to be experts in SQL, CSS, and everything in between.

Everything? https://plus.google.com/112218872649456413744/posts/dfydM2Cn...

nobody likes a pedant.

Re: Learn SQL, dammit

#114
post #3

I once interviewed a guy with a Masters in computing (of some sort, I forget) who didn't know SQL. He'd been developing for years, but lived entirely in .NET land and just used ORMs. Absolutely crazy.

I feel like the academic qualifications (Bachelors, Masters, PhD, etc) and programming shippable applications are two separate hierarchies.

So I'm surprised he didn't know SQL after developing .NET for years, but not that surprised he had a Masters but didn't know SQL.

Re: Learn SQL, dammit

#115

Earlier quoted context omitted.

Technically, an UPDATE is a DELETE and INSERT. so if you only knew SELECT, DELETE, and INSERT, you could do crud.

I was referring to what you could practically survive with as an application developer who didn't control the databases involved; for the reasons prodigal_erik states in their reply, DELETE + INSERT, while you can do equivalent transformations to UPDATE with them, aren't going to be a general-purpose replacement for developers of real-world applications against real-world databases that they do not control.

I agree with you. I was just saying that it is possible to do crud with just three sql commands. Not friendly, I agree, but possible.

Re: Learn SQL, dammit

#116

The article has the good premise, of course you should learn SQL, but it goes over the top and makes some false presumptions for the sake of the argument: 'Think about it, though: it’s absurd that you would even need to learn any SQL at all! The very nature of an ORM is to bypass SQL.' I think the nature of ORM is to map object oriented code to relation data. So not to bypass, but to pass between the two conveniently…

> Also, there is the wrong use of 'begs the question' in the same paragraph :)

That was a bad translation from day one, and people are now using the phrase in a way that makes more sense.

Re: Learn SQL, dammit

#117
post #100

Earlier quoted context omitted.

Fair enough. Replace "wrong" with "generally considered a suboptimal idea".

Still, 'it depends'. Yeah, there are all sorts of reasons, depending on context (and plenty of people to argue all those reasons). Personally, I agree with OP that nobody should ever use an ORM as an excuse to not know SQL. You need to know SQL anyway. So, once we agree on that, your question "Is there any reason to use an ORM if I know SQL" (that's basically what you mean when you phrase it in the inverse "Is there…

Thank you. I believe my question has been answered, even if I failed at expressing it the way I intended.

Re: Learn SQL, dammit

#118

Earlier quoted context omitted.

Everything? https://plus.google.com/112218872649456413744/posts/dfydM2Cn...

nobody likes a pedant.

I truly wasn't being pedantic. Pretty much every project I've worked on has required me to learn some new layer of technology that I never even knew existed. Sometimes it's just too much for one person and you have to rely on the strengths your team as a whole. The idea that a single developer can rapidly learn all of the layers/technologies affecting his/her project is a fallacy at best.

[Edit: However, in the spirit of the OP it's perfectly reasonable to expect your devs to know or be able to learn SQL.]

Post reply on HN