Readit News logoReadit News
jelder commented on SQLite JSON at full index speed using generated columns   dbpro.app/blog/sqlite-jso... · Posted by u/upmostly
ramon156 · 2 days ago
It works until you realize some of these usages would've been better as individual key/value rows.

For example, if you want to store settings as JSON, you first have to parse it through e.g. Zod, hope that it isn't failing due to schema changes (or write migrations and hope that succeeds).

When a simple key/value row just works fine, and you can even do partial fetches / updates

jelder · 2 days ago
The necessity of using a JSON column was outside of my control, but Zod etc. are absolutely required, I think, in most projects. I wrote more about that here: https://www.jacobelder.com/2025/01/31/where-shift-left-fails...
jelder commented on SQLite JSON at full index speed using generated columns   dbpro.app/blog/sqlite-jso... · Posted by u/upmostly
craftkiller · 2 days ago
If you're using postgres, couldn't you just create an index on the field inside the JSONB column directly? What advantage are you getting from extracting it to a separate column?

  CREATE INDEX idx_status_gin
  ON my_table
  USING gin ((data->'status'));
ref: https://www.crunchydata.com/blog/indexing-jsonb-in-postgres

jelder · 2 days ago
That works for lookups but not for foreign key constraints.
jelder commented on SQLite JSON at full index speed using generated columns   dbpro.app/blog/sqlite-jso... · Posted by u/upmostly
jelder · 2 days ago
I thought this was common practice, generated columns for JSON performance. I've even used this (although it was in Postgres) to maintain foreign key constraints where the key is buried in a JSON column. What we were doing was slightly cursed but it worked perfectly.
jelder commented on The Nerd Reich – Silicon Valley Fascism and the War on Democracy   simonandschuster.com/book... · Posted by u/brunohaid
konart · 17 days ago
>democracy is being dismantled not by coups or tanks, but by code, capital, and the illusion of innovation

Not sure "code" belongs here. Even less sure about "illusion".

Take those away and what is left is "dismantled... by capital". Nothing new, really.

jelder · 17 days ago
The purpose of software is to reduce the cost of change.

Of course “code” belongs here.

jelder commented on RegreSQL: Regression Testing for PostgreSQL Queries   boringsql.com/posts/regre... · Posted by u/radimm
h1fra · a month ago
Interesting. Perf regression can happen locally but they mostly happen in prod when data change in volume or in shape, can this run safely on a prod db?
jelder · a month ago
Underrated point.

Looking for performance issues on a machine with different baseline IO and CPU load, buffer state, query plans, cardinality, etc. is just theater and will lead to a false sense of security. RegreSQL is approaching a stateful problem as if it were stateless and deterministic. A linter like https://squawkhq.com is a good partial solution but only addresses DDL problems.

RegreSQL would be better served by focusing only on the aspects of correctness that tools like SQLx and sqlc fundamentally cannot address. This is a real need that too few tools try to address.

jelder commented on .NET 10   devblogs.microsoft.com/do... · Posted by u/runesoerensen
sfn42 · a month ago
> they can onboard people who know anything-not-C# and benefit from the .Net library

I don't get this mindset. I'd much rather have the new guy spend a few months getting used to a new language, than have an organization where everyone uses different languages. It's a nightmare a few years down the road when you have 20 different projects in 15 different languages and the people who built them are mostly gone.

People are way too lenient with this stuff IMO. The goal of an organization should be to have one solution to each problem. For example we use .NET for backend and React for frontend. You don't need anything else. People love to talk about the right tool for the job, it's all BS. You can make pretty much any kind of website using react and pretty much any kind of backend using C#. The only reason to choose anything else is preference.

And sure maybe you have some data science people who need python, thats fine. Just don't have one guy using Py, another using R and yet others using Matlab. That's just asking for trouble. Pick one, stick to it. If you're going to make a change then migrate everything. If it's not worth that then the new tool probably isn't such a big deal after all.

jelder · a month ago
Using the right language for the problem domain is a good thing, but what I can't stand is when people self-identify as the one language they are proficient in. Like, "I'm Staff JavaScript developer" no buddy, you aren't "Staff" anything if you only know one language.
jelder commented on Tell HN: X is opening any tweet link in a webview whether you press it or not    · Posted by u/stillatit
Zolomon · a month ago
This is not true, this change is a recent phenomenon, I believe it came into effect sometime around 2021-2023 (maybe earlier even). I believe it changed when OpenAI showed the value of data.

Before, there was no problem using Instagram or Twitter while not logged in. Now there is a dark pattern that forces you to create an account, or log in.

jelder · a month ago
My recollection is that this happened pretty much immediately after Twitter became X.
jelder commented on Tell HN: X is opening any tweet link in a webview whether you press it or not    · Posted by u/stillatit
PyWoody · a month ago
Serious question: Why doesn't Google de-rank content that requires a login? I remember they used to claim they did but they clearly do not anymore.
jelder · a month ago
That would be equivalent to demonetizing the entire web. Free content would win out over paid content regardless of quality. As the old adage goes, "when you're getting something for free, you're the product being sold." Only sites making money by, shall we say, "indirect" means would be able to survive. A search engine which prioritizes free content over paid would become nothing but a propaganda engine.
jelder commented on Uv is the best thing to happen to the Python ecosystem in a decade   emily.space/posts/251023-... · Posted by u/todsacerdoti
bunderbunder · a month ago
My team just did this.

It wasn't anything like the radical change to how CI works that you seem to be envisioning. It was just deleting a lot of Python environment setup and management code that has a history of being obnoxious to maintain, and replacing it with a one-liner that, at least thus far, has given us zero fuss.

jelder · a month ago
You updated _production_ before _testing_? Sorry but that just sounds like asking for a disaster.
jelder commented on Uv is the best thing to happen to the Python ecosystem in a decade   emily.space/posts/251023-... · Posted by u/todsacerdoti
jelder · a month ago
> On GitHub Actions, we’re planning to use uv to quickly build a Python environment and run our unit tests. In production, uv already manages Python for all of our servers.

Does that mean they aren't running unit tests _at all_ in CI yet, or they just use a totally different, newer system in production than they do for CI? Either way, brave of them to admit that in public.

u/jelder

KarmaCake day1140May 9, 2012View Original