Hacker Newsnew | past | comments | ask | show | jobs | submit | more grim_io's commentslogin

Any kind of comparison of popular frameworks activates all the dev nourons in my monkey brain.


It looks really well done.

I'll definitely keep an eye on it until it hopefully matures.


He, who does not produce slop in the first iteration, cast the first stone.


How? Stored procedures?

I find that to be insane.

How do you version that code, and how do you reason with the business logic split all over the DB and code?


> How? Stored procedures?

Not neccesarily. jOOQ[1] and sqlc[2] are great options if you don't like stored procedures, but for a small app or a prototype, just having plain SQL strings in your app is fine.

My point isn't that the code has to be stored in the database, but rather that the processing happens in one place where your data is stored and your middle tier just gets the results. Pure, stateless data. This means you don't have to synchronise shared mutable state between your app and your DB server, cutting out all the headaches of ORMs, such as having to specify your data model in two separate places, n+1 queries, locking, lifecycle management, dirty tracking, eager loading, caching, and optimistic concurrency control. All of this adds to complexity and congnitive load.

SQL also provides a declarative approach to defining your business logic. You define the what, not the how. In addition to greater productivity, the programming model is much simpler because you aren't complecting control flow with data flow. With JSON support in Postgres, your query results don't have to be flat tables either. You can get your data in the exact shape you need.

> How do you version that code

You put it into your VCS. SQL is part of your code base, you can and should version control it just like any Python, Ruby or Java code. When using stored procedures, I recommend putting them in a separate schema, so that the schema can be dropped and recreated in a single transaction during deployment. See [3] for an example of stored procedures under version control.

> how do you reason with the business logic split all over the DB and code

You separate your concerns instead of mixing them. The core business logic is in SQL, with your middle tier doing the plumbing, orchestration of external services and presentation.

[1] https://www.jooq.org/

[2] https://sqlc.dev/

[3] https://github.com/sivers/store


I don’t get this at all, and I tried to understand it.

I'm good at SQL. When necessary (maybe once a year), I can drop into pure SQL instead of Django ORM like it's nothing.

The thing is, I can't imagine why I would ever want to.

All these anti ORM comments read like they want to be as close to the DB as possible.

This is not what I want. I don't care about guaranteeing the most efficient query, because it is never the bottleneck, not even close.

I want to be as expressive as I can be in the business logic, and I don't feel like I am using pure SQL.


Again, performance is not my point. If you want maximum performance, use a low-level key-value store, hence my VSAM analogy. On the contrary, for me it is about simplicity.

SQL is the most high level language in common use. It abstracts away everything: Storage, memory, concurrency, and, most importantly, control flow. Complexity comes from complecting things, simplicity comes from decomplecting [1] things. SQL decomplects the what (data flow) from the how (control flow) which means less cognitive load, higher developer productivity and better maintainability.

In my experience, writing business logic in SQL results in fewer bugs and less code. I have replaced 50-line Java methods with 15-line SQL projections multiple times. With Python, the ratio is closer to 2:1, but it's still impressive.

And all of this without having to consider type impedance, eager versus lazy loading, result set mappings, second-level caching, dirty tracking, lifecycle management, OCC, or obscure savepoint bugs. Performance is just a nice, but welcome side effect.

[1] https://www.youtube.com/watch?v=SxdOUGdseq4


The results would be opposite for me.

I need dynamic query building in most places.

Doing those inline in SQL would result in a mess of unmaintainable manual string concatenation and parameter interpolation.

A code uglier does not exist.


jOOQ is also a great option if you do like stored procedures


There is more to it than just a dollar cost per product.

Outsourcing is attractive, because then you don't need to care about all the environment protection violations and any other exploitations.

Your local customers don't begin to resent you for poisoning their water.


I find it much more interesting to read from people who do programming as a hobby.

They focus on the practical solutions much more than on the typical bikeshedding.


"Bikeshedding" means debating over aspects that don't matter (much; i.e, color of the bike shed), the linked blog post isn't about asthetic changes.


Nor was my intent to label any of the linked blogs as such.

My intent was to say that hobbyists have a different, refreshing approach to programming and it's technologies that I appreciate.


woah, got any references to back this up?

I've seen a lot of DHH content, and I'd never describe it as radical right wing.



As time goes on this opinion is getting very popular in many parts of Europe. It's probably the majority view on the continent.


"Right wing" is not defined by popularity but by the nature of the arguments being put forth. A central argument in the piece is that London was better in the past. The suggestion that things were better in the past, and we should return to that time, is core to a certain kind of conservative thought. Conservative, by definition, means opposing change. Therefore this is a right-wing argument, whether it is popular or not.


The comment you originally replied to said it's not a radical right wing opinion. So my comment is reiterating that; it's not radical. Being slightly right of centre in the sense of wanting to preserve your culture is a mainstream opinion.

Radical can be defined as a sharp departure from the status quo (DHH is merely suggesting a turn back to the status quo of immigration policy from maybe a couple decades ago) or as something more extreme than the mainstream view. If something is so popular it's the majority opinion, it's not radical by most definitions.


He actually pretty explicitly pines for the condition of the past, where London was full of "native Brits," and makes no mention of immigration policy. Then he links to statistics showing that 60% of Londoners are native born British citizens.

So in his mind, you can be a British citizen born in Britain but not a "native Brit." I don't see how one can reach this conclusion unless you believe non-white people to be incapable of being "native Brits" despite being born and raised in Britain.

Again, would love to see where he advocates for any particular immigration policy. The post pretty explicitly admits to just preferring when London was more white (as evidenced by linking to stats showing London is not less British, simply less white)


I get it. But this just shows again clearly why people like Trump have any chance at all.

I don't share many of his opinions, but nothing in there screams extremist right, sexist or xenophobic.


Everyone's entitled to their own opinion, but that bit about "native Brits" and then linking to how London has fewer white people than ever before doesn't get your senses tingling? Saying Tommy Robinson's just some jolly ole bloke gone for a walk doesn't give you a whiff of something being off?

Everyone is invited to click on the link upthread and form their own opinion!


It's quite fash.


The entire post is an anti-immigration screed. How is it not xenophobic?

It's also littered with references to other far-right positions, like defending someone who was tweeting out incitements to violence against trans people - "If a trans-woman is in a female-only space, punch them in the balls"


I agree that his position is right wing, but is it far right? Most nations explicitly exist for the people native to the place. Very few nations allow foreign immigration on the scale that the US, UK, Canada, do. And European countries make it pretty difficult to migrate normally- unless you’re a Muslim “refugee”. Being anti-immigrant is a default position in the world.

I think the average person on the left likes to believe they have the position that “all immigration is good”. In reality, they mean all migration by nonwhite people is good (see how they talk about white or near-white people in the US, Canada, Israel). It’s this hypocrisy and obviously racist stance that bugs me.

What makes Muslim migration to Europe “good” but Jewish migration to the stateless land of Israel from 1890-1948 bad? What makes Muslims moving to the US “good” but makes all white people in the US colonizers? Either everybody gets the colonizer notation (foolish imo) or migration is a human right (like it was for the million years before the modern nation-state) and everybody needs to fucking deal with it, stop killing each other and stop condemning people for moving or for the past crimes of people who may be barely related. And if you’re going to migrate: don’t be an asshole to the people there first.


> I've seen a lot of DHH content, and I'd never describe it as radical right wing.

How about xenophobic and sexist?


This feels like a scaffold for a badly defined, missing product.

Google does it again...


The people in power are convinced that there is nothing the president can't do.


They appear to be correct. Stephen Miller, Trump's deputy chief of staff, said on CNN that the President has plenary authority, effectively limitless power. This is to some as yet unknown degree policy agreed upon within the Republican Party, which controls all branches of government. And companies appear quite willing to acquiesce to the new normal.


The name for said policy is fascism. Lets not mince words.


True.

But this is Hacker News, and the more concrete and direct such discussions become, the more quickly they get shut down.


I'm not convinced there is any hope for a productive, long-term, burnout-free parallel agent workflow.

Not while they need even the slightest amount of supervision/review.


The thing that's working really well for me is parallel research tasks.

I can pay full attention to the change I'm making right now, while having a couple of coding agents churning in the background answering questions like:

"How can I resolve all of the warnings in this test run?"

Or

"Which files do I need to change when working on issue #325?"

I also really like the "Send out a scout" pattern described in https://sketch.dev/blog/seven-prompting-habits - send an agent to implement a complex feature with no intention of actually using their code - but instead aiming to learn from which files and tests they updated, since that forms a useful early map for the actual work.


Yea, i find success in LLMs overall but the quality of the work is proportional to how much oversight there is.


My suspicion is that it's because the feedback loop is so fast. Imagine if you were tasked with supervising 2 co-workers who gave you 50-100 line diffs to review every minute. The uncanny valley is that the code is rarely good enough to accept blindly, but the response is quick enough that it feels like progress. And perhaps an human impulse to respond to the agent? And a 10-person team? In reality those 10 people would review each other's PRs and in a good organisation you trust each other to gatekeep what gets checked in. The answer sounds like managing-agents, but none of the models are good enough to reliably say what's slop and what's not.


I don't like to compare LLM's to people.

There is a real return of investment in co-workers over time, as they get better (most of the time).

Now, I don't mind engaging in a bit of Sisyphean endeavor using an LLM, but remember that the gods were kind enough to give him just one boulder, not 10 juggling balls.


It's less about a direct comparison to people and more what a similar scenario would be in a normal development team (and why we don't put one person solely in charge of review).

This is an advantage of async systems like Jules/Copilot, where you can send off a request and get on with something else. I also wonder if the response from CLI agents is also short enough that you can waste time staring at the loading bar, because context switching between replies is even more expensive.


Yes. The first time I heard/read someone describe this idea of managing parallel agents, my very first thought was that this is only even a thing because the LLM coding tools are still slow enough that you can't really achieve a good flow state with the current state of the art. On the flip side of that, this kind of workflow is only sustainable if the agents stay somewhat slow. Otherwise, if the agents are blocking on your attention, it seems like it would feel very hectic and I could see myself getting burned out pretty quickly from having to spend my whole work time doing a round-robin on iterating each agent forward.

I say that having not tried this work flow at all, so what do I know? I mostly only use Claude Code to bounce questions off of and ask it to do reviews of my work, because I still haven't had that much luck getting it to actually write code that is complete and how I like.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: