I've been slowly transitioning from using an ORM to just plain SQL. It's so much simpler. Less magic, more explicitness, and more control. Also, much better performance. I think the thing is to construct your model around the different queries you need to perform. In many cases, especially a CRUD-type situation, you'll end up with 10-20 different SQL queries, and that's it.
>The Only Programming Language Built on Mathematics, Not Fashion<p>As a modern array language D4M is the natural successor for SQL [1].<p>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].<p>You can achieve 100M database inserts per second with D4M and Accumulo more than a decade ago back in 2014 [3].<p>[1] D4M: Dynamic Distributed Dimensional Data Model:<p><a href="https://d4m.mit.edu/" rel="nofollow">https://d4m.mit.edu/</a><p>[2] Mathematics of Big Data: Spreadsheets, Databases, Matrices, and Graphs:<p><a href="https://direct.mit.edu/books/monograph/5691/Mathematics-of-Big-DataSpreadsheets-Databases" rel="nofollow">https://direct.mit.edu/books/monograph/5691/Mathematics-of-B...</a><p>[3] Achieving 100M database inserts per second using Apache Accumulo and D4M (2017 - 46 comments):<p><a href="https://news.ycombinator.com/item?id=13465141">https://news.ycombinator.com/item?id=13465141</a>
- I recently read that most programmers SQL knowledge is outdated by 20 years and it’s true for me. There are quite a lot of features in most DBs that feel very "new" to me.<p>- Comparing SQL to React weakens the argument. SQL is the language, React is a piece of software. You certainly can run 30 year old JS today in modern browsers.
Same can be said for learning an OO programming language or a procedural programming language. I learned C++ at school and started using Java on my first job. I forgot how to work correctly with pointers but I have tried multiple languages (using the same paradigms) and managed to build working software
I’ve been using Postgres for over 6 years (since I started), and I honestly think it’s one of the best investments you can make as a developer
> Edgar Codd formalised relational algebra in 1970. SQL sits on top of it as a declarative interface. You describe what you want. The database engine decides how to get it. The engine improves every year. Your query stays the same.<p>Although SQL is of course not relational Algebra (and others like Datalog and D4M are better), it's still cool. It inspired kSQL like Lil uses <a href="https://beyondloom.com/decker/lil.html#lilthequerylanguage" rel="nofollow">https://beyondloom.com/decker/lil.html#lilthequerylanguage</a> , which inspired the code I'm most proud of: <a href="https://codeberg.org/veqq/declarative-dsls" rel="nofollow">https://codeberg.org/veqq/declarative-dsls</a> A common query language, a common idiom, for many data structures (arrays, hashmaps, datafremas) is liberating, permitting you to e.g. solve sudoku, make mandelbrot sets or calculate primes directly:<p><pre><code> (def n 40) # to reach primes up to, left is sqr of n, right n/2, then multiply them for rows
(def composites
(df/select :from (range 2 (+ 1 (math/floor (math/sqrt n))))
:cross (range 2 (+ 1 (/ n 2)))
:where |(<= (* ($ :value_left) ($ :value_right)) n)
[[:value_left :value_right] :value
|(* ($ :value_left) ($ :value_right))]))
(df/select :from (range 2 (+ 1 n)) :exclude composites)
</code></pre>
Or e.g.<p><pre><code> (import declarative-dsls/dataframes :as df)
(def people (df/dataframe :name :age :job))
(df/dataframe? people)
(df/insert! {:name "Bob" :age 30 :job "Developer"} :into people)
(df/insert! {:name "Alice" :age 27 :job "Sales"} :into people)
(df/update! :set {:job "Engineer"}
:where |(= ($ :job) "Developer")
:from people)
(df/save-csv people "people.csv" :sep "\\t")
(def people2 (df/load-csv "people.csv" :sep "\\t"))
(-> people2
df/dataframe->rows
df/rows->dataframe
df/print-as-table)
</code></pre>
The tests file has many such things (like the sudoku solver) and even datalog and minikanren implemented on top of this!
Everyone knows SQL already. The harder parts that pay off are schema design, knowing how to interact with your DB in code, and knowing all the ins and outs of whatever DBMS you're using.
Just, for god's sake, move SELECT after GROUP BY, I beg you.
I've played once with codesignal to pass SQL chapters and it really helped to advance querying skills.
I refuse to learn SQL. I'm not a computer, I'll let them deal with that.
> JavaScript is an imperative language that browser wars, framework trends, and open-source maintainer preferences reshaped every few years. It rewards you for keeping up.
> Take a React component from 2015<p>Javascript is actually fully backwards-compatible, to not break the Web. Any javascript from 10 years ago works in the browser. This is good but also a bit of a burden, since the language can only expand but not shrink.
React is a library, and like all libraries it has breaking versions.
Not understanding the basic difference between the two kinda undermines the credibility of the article.<p>Also, in a similar way, core, ANSI SQL is largely backwards compatible, but all the SQL dialects linked to various DBMS implementation are generally incompatible. Obviously that's not mentioned in the article.<p>> Not a tutorial. Not an ORM. Actual SQL: joins, subqueries, window functions, query plans.<p>Not text written by a human. Not a style that an real writer would ever use. Actual AI slop: Short sentences. Incorrect facts. Not X, Y.
> Not a tutorial. Not an ORM. Actual SQL: joins, subqueries, window functions, query plans.<p>My brain absolutely checks out when I read this stuff now.<p>Not to mention that query plans are absolutely not "actual SQL".
An article laser-targeted at HN's front page, making tantalizingly negative and easily disprovable claims about Javascript? Perish the thought.