Live data from Hacker News

Learn SQL Once, Use It for 30 Years

fagnerbrack.com

191–200 of 243 posts

Re: Learn SQL Once, Use It for 30 Years

#191

>The Only Programming Language Built on Mathematics, Not Fashion As a modern array language D4M is the natural successor for SQL [1]. D4M is based on mathematics like SQL, specifically associative array algebra but not relational unlike SQL. It's more generic since can it caters to most modern data abstractions including spreadsheets, database tables, matrices, and graphs [2]. You can achieve 100M database inserts pe…

> >The Only Programming Language Built on Mathematics, Not Fashion

Fortran would like a word. The name literally means "Formula Translation"

Re: Learn SQL Once, Use It for 30 Years

#193
post #155

Earlier quoted context omitted.

> Not a tutorial. Not an ORM. Actual SQL ah, this is an Ai article

Darn. I write exactly like this. You need to consider that people write in different ways, and the LLM is choosing from among the different styles.

There is little chance your writing is as consistently the exact same as the default LLM output, which this definitely is.

Re: Learn SQL Once, Use It for 30 Years

#194

Earlier quoted context omitted.

Eh... yes but, I can write a sql query and come back a year later and understand it at first glance, or maybe if its really complicated a minute or two. Writing a regex involves always looking up the syntax, and being unable to read it an hour later without having to carefully disect it. I say this with 20+ YOE and I think I am better than the average bear with them. That said, knowing what they can do is important a…

> Writing a regex involves always looking up the syntax No. I mean, I believe it does for you. I use it often enough that it's always fresh. On the other hand, I always need to look up the syntax of CREATE TABLE. My experience can be described the same as yours.

I think the main problem with regular expressions is that there are so many dialects that are subtly different. The same sort of goes for SQL, but it's not quite as bad as regular expressions are.

(Other big problem with regexes is that they are strictly slower than handrolling the equivalent string parsing code, and kind of a denial of service hazard to boot).

Re: Learn SQL Once, Use It for 30 Years

#195
post #37
post #30

> If you are a junior developer, “learn SQL properly” is the most valuable 40 hours you can spend. Not a tutorial. Not an ORM. Actual SQL: joins, subqueries, window functions, query plans. That investment pays you back at every job, in every stack, for decades This is the power of low-level reasoning. Today, even for a junior developers, even if they have AI that solves syntax problems, SQL teaches you to reason and…

A couple of sites worth checking out to level up, both by Markus Winand: https://modern-sql.com/ https://use-the-index-luke.com/

I ran across https://use-the-index-luke.com organically while learning SWL recently and I've been really enjoying it.

I can't vouch for it from any perspective except as an SQL neophyte but for me it has been teaching me a lot.

Re: Learn SQL Once, Use It for 30 Years

#196

That's true. SQL knowledge is one of the few skills that didn't age. 1. C language. 2. *nix tools (shell and friends). 3. SQL. 4. Basic IPv4 networking. These things I learned around 20 years ago, they didn't change much and they are useful for me to this day.

Well, IPv4 is obsolete.

I inquired about getting a static IP(s) for a small business, and only v4 is available.... and that was this year!

Re: Learn SQL Once, Use It for 30 Years

#197

Earlier quoted context omitted.

> Writing a regex involves always looking up the syntax No. I mean, I believe it does for you. I use it often enough that it's always fresh. On the other hand, I always need to look up the syntax of CREATE TABLE. My experience can be described the same as yours.

I think the main problem with regular expressions is that there are so many dialects that are subtly different. The same sort of goes for SQL, but it's not quite as bad as regular expressions are. (Other big problem with regexes is that they are strictly slower than handrolling the equivalent string parsing code, and kind of a denial of service hazard to boot).

There's a standard base dialect of regex that works everywhere, just like SQL.

SQL also tends to be slower than hand optimized data structure wrangling.

If you use untrusted regex, you'll be subject to DOS. If you use untrusted SQL, you'll be subject to much worse.

Re: Learn SQL Once, Use It for 30 Years

#198
post #54
post #30

> If you are a junior developer, “learn SQL properly” is the most valuable 40 hours you can spend. Not a tutorial. Not an ORM. Actual SQL: joins, subqueries, window functions, query plans. That investment pays you back at every job, in every stack, for decades This is the power of low-level reasoning. Today, even for a junior developers, even if they have AI that solves syntax problems, SQL teaches you to reason and…

I find SQL a very thick "wrapper masking low-level logic". Think of the query planning, the index-maintaining, the upholding of guarantees, the writing-to-disk and caching that you are all not doing by using a RDBMS! I'd say SQL is a very high level language. "SQL teaches you to reason and approach problems logically" -- I kind of agree here. It teaches relational data mgmt. I think it is better to attack most softwa…

> I'd say SQL is a very high level language.

Yes indeed. When I learned SQL in college, the professor made a HUGE deal about how it was a "4th generation language" so it was so abstract you didn't have to think about how the computer would answer your query.

Even at that time I thought that was massive overstatement of what using SQL was like. It didn't deliver on that promise very well. But it's very funny to see plain SQL now sometimes called "low level"!

Re: Learn SQL Once, Use It for 30 Years

#199

That's true. SQL knowledge is one of the few skills that didn't age. 1. C language. 2. *nix tools (shell and friends). 3. SQL. 4. Basic IPv4 networking. These things I learned around 20 years ago, they didn't change much and they are useful for me to this day.

Well, IPv4 is obsolete.

Obsolete like your old iPhone is obsoleted by this year iPhone.

Doesn't mean it stops working or being useful, and in arguably IPv4 case it is still of far more importance than v6.

Re: Learn SQL Once, Use It for 30 Years

#200
post #30

> If you are a junior developer, “learn SQL properly” is the most valuable 40 hours you can spend. Not a tutorial. Not an ORM. Actual SQL: joins, subqueries, window functions, query plans. That investment pays you back at every job, in every stack, for decades This is the power of low-level reasoning. Today, even for a junior developers, even if they have AI that solves syntax problems, SQL teaches you to reason and…

The breakthrough for me was thinking in terms of sets and not in terms of "how would I do this imperatively." If you see SQL where someone wrote a SELECT and is then using a cursor to loop through those results and do other queries, you've found the person who is still thinking imperatively.

[deleted]
Post reply on HN