Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ttfkam
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
48 ms
·
631.
▲
by
ttfkam
3y ago
And of course Oracle famously forbids publishing benchmarks on their databases, so independent verification is indeed impossible.
632.
▲
by
ttfkam
3y ago
So… taking one of the best aspects of Svelte and combining with one of the worst aspects of React? What could go wrong?
633.
▲
by
ttfkam
3y ago
Two join clauses in a statement is not trivial? We apparently have different definitions for "trivial". But if you want hierarchy (in Postgres), to_jsonb(…) is your friend.
634.
▲
by
ttfkam
3y ago
ChatGPT can write SQL too.
635.
▲
by
ttfkam
3y ago
And if that's the biggest perceived problem with SQL, then SQL isn't going anywhere. It can't just be a little better than SQL, especially in terms of syntactic aesthetics; it has to be substantially and provably better than
636.
▲
by
ttfkam
3y ago
Like Rust's Sqlx? https://github.com/launchbadge/sqlx
637.
▲
by
ttfkam
3y ago
Not sure "standard" and "MySQL" belong in the same sentence. ;-)
638.
▲
by
ttfkam
3y ago
Agreed! First time I used the postgres Node library [0], I was sold! [0] https://github.com/porsager/postgres
639.
▲
by
ttfkam
3y ago
> Simply because I consider "code" to be the part of the world I have any control over and "database" to be the dangerous and out-of-reach part where errors show up later Sounds more like a personal phobia than a subs
640.
▲
by
ttfkam
3y ago
So… use one of the engines with better support for materialized views? This sentiment is like saying, "Java doesn't support traits, so I hate all programming languages." If an engine doesn't support a feature you need, u
641.
▲
by
ttfkam
3y ago
DDL is like code. DML is not. Tools like Sqitch are quite adept at testing DDL. DML is declarative. Like HTML. SQL is a DSL for set theory. Do you test your HTML like the rest of your code too? But to be clear, Sqitch and pg_tap (off the to
642.
▲
by
ttfkam
3y ago
> And for that, you need to know SQL and not just some half-baked SQL punch through the ORM deigns to afford to you. That and read replicas. Relying on the ORM will not save you, but knowledge of SQL (specifically materialized views) wil
643.
▲
by
ttfkam
3y ago
If you have fewer than ten thousand simultaneous users, this is not you. After ten million, you're not using an ORM in front of a bare relational database either. Scale at high numbers adheres to no rules or off-the-shelf tools.
644.
▲
by
ttfkam
3y ago
map/filter/reduce? Give you the contents of your table, so you can process it in the app tier with map/filter/reduce?! Ah, the hubris of devs who honestly believe they can whip out a solution in a day that beats a dedica
645.
▲
by
ttfkam
3y ago
Open Props does it better. Styling is kept in CSS, but you still get reusable patterns and naming.
646.
▲
by
ttfkam
3y ago
Not only does each ORM have a different API and access pattern to do this, once you hit this point, you're managing the object model ALONG WITH custom SQL for migrations. There is also non-trivial danger in letting your ORM decide what
647.
▲
by
ttfkam
3y ago
Parameterized queries are a thing in every popular driver in every popular language (except Lua). It's been quite a while since I saw a tutorial using string concatenation. Thank heaven those dark days of horrible PHP/MySQL SQL in
648.
▲
by
ttfkam
3y ago
Yep, and each has their own bespoke and often inconsistent API. All to eventually emit plain ole BEGIN/COMMIT/ROLLBACK. JPA is at least a spec rather than just yet another single isolated implementation. Unfortunately it's no
649.
▲
by
ttfkam
3y ago
As opposed to the dizzying array of ORMs that all have multiple caveats you need to know and utterly incompatible in fundamental ways between each other? Folks go on about how they're "stuck" with a single dialect of SQL but
650.
▲
by
ttfkam
3y ago
If only this were true. ORMs have come up with some very subtle foot guns over the years.
651.
▲
by
ttfkam
3y ago
Unless you're on Java. Just need three columns out of twenty? That's too bad. The JPA spec mandates you pull all the columns in that table. But fundamentally on any programming language, all popular ORMs treat the database like it
652.
▲
by
ttfkam
3y ago
If you're using JS or Python, the SQL call just returns an array of objects/records. No muss. No fuss. If you're using something like Sqlx in Rust, the SQL is not just checked for validity, it seamlessly assigns the result se
653.
▲
by
ttfkam
3y ago
My dislike of ORMs mainly stems from the tendency to treat modern SQL engines as glorified dumb bit buckets. Where a CTE or LATERAL join or RETURNING clause would simplify processing immensely or (better yet) remove the possibility of incon
654.
▲
by
ttfkam
3y ago
For all the hate it gets, it's astounding what you can accomplish by charging for your product. It's why OrbStack will also start charging once the open beta period is over.
655.
▲
by
ttfkam
3y ago
I use the CLI as well, but on MacOS, you need more plumbing like a Linux VM. OrbStack (and Docker Desktop) provide this plumbing in a single app package, so the CLI can actually work, whether you prefer a GUI or a CLI. (Or docker-compose, a
656.
▲
by
ttfkam
3y ago
A shame there's no mention of LATERAL. I use it all the time. https://vladmihalcea.com/sql-lateral-join/
657.
▲
by
ttfkam
3y ago
If you're running macOS earlier than macOS 11.4, then it's time for an update.
658.
▲
by
ttfkam
3y ago
Because React makes you add a bunch of boilerplate and extra steps in code for performance like useMemo(...) that simply aren't needed in Svelte.
659.
▲
by
ttfkam
3y ago
This video would seem to contradict that sentiment. https://youtu.be/dB_YjuAMH3o?t=103
660.
▲
by
ttfkam
3y ago
Using Svelte and D3 together for data visualization leads to more declarative code and componentized code that developers have become accustomed to but without sacrificing performance. https://blog.logrocket.com/data-visuali
More ›