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

SQLAlchemy is the library that convinced me, 8 or 9 years ago, to avoid using Python altogether.* Cold turkey, hard stop. Thank you for the motivation.

Not sure how they took something relatively straightforward - running database queries - and turned into such a convoluted mess.

*Python is still pretty good for data analysis, plotting, and scripting. But not for building actual applications.


They all say that until your business logic is so convoluted that maintaining several dozen SQL queries begets more work than sensible so you end up inventing your own query builder which is fine until you realize you really need business objects so you make up your own ORM and then you realize you needed SQLA or some similar piece of tech all along.

Tale as old as time.


I agree and I've seen a similar argument a few times before. All of those times had the same ending.

SQLAlchemy is a beast for sure. But the complexity is not for fun. It gives you a lot in return. If your needs are simple, it's probably overkill. And this library is not for running queries, it's an ORM. Which has a component that will eventually need to send the queries to the database but it's a lot more than that.


You're not entirely wrong. But SQLAlchemy's approach and design are still awful and confusing. There are much, much better tools/libraries out there.

I don't disagree that it's tremendously overpowered. You can use SQLModel with FastAPI if you want a more minimal API surface that uses SQLA under the hood. As a user I just don't have to deal with most of its complexity on a day to day basis so it doesn't bother me and I don't think it's a bad end state for a swiss-army knife of a query library.

Well, neither SQLModel nor FastAPI existed at the time. So those weren't really options. And SQLAlchemy was still many years away from v2. So whatever it has done in the meantime to improve (I honestly have no idea) was not part of the library at the time.

Having used it in a code-base that had a lot of business logic and objects, I don't mind it at all. It's a transpiler is all. Plus at no point were we married to it, you could generate your query any which way you please, or even hand-craft them if it was getting in your way or your mood shifted.

Did someone force you to use SQLAlchemy? I mean you can write DB queries with and ORM. There are also other ORMs for python.

Yea, I used the psycho-pg (yes I know thats not the right spelling) often. But that is postgres-specific. Tried other alternatives too. I'm sure it is better now, but those 2 were the dominant approaches back then. Obviously I had other issues with the Python language and ecosystem, but of all the pain points, SQLAlchemy was the worst of them.

Agreed, writing db queries in Python is just plain pain compared to C# + EF. Loved how I have to handle runtime type errors for SQLAlchemy queries in a dynamically typed language.

Other aspects of it are fine, but this exact part strongly feels doing something un-python in python for me.


im usually thrilled when people look at SQLAlchemy and run screaming...because if these people stick around and are my actual users (which does happen, since folks are at work sometimes), they are of course miserable and typically insufferable.

but making a decision about Python overall based on SQLAlchemy, wow I should be flattered that someone would think SQLAlchemy's has captured "Pythonic" so perfectly that we're the canonical example of it. But no, in Python, SQLAlchemy is definitely its own thing. You'd want to look at Django for pretty much the opposite take on everything (again, super awesome. people like django! great! you don't want to be my user, that's for sure!), all while staying well within Python's pretty amazing ecosystem and community.


Kotlin has filter and filterNot (it also has separate "reduce" and "fold" functions, dependingon whether you want to specify an initial accumulator value or not)


Kotlin compiles to the same JVM bytecode that Java itself does. There is no performance hit. And from a developer's perspective, no it is not a "complication", Kotlin is a much more pleasant and efficient language to program in than Java (in my opinion, and that of many others).


How is it a kickback to invite someone to play golf? A kickback would be if he handed him a big check in the locker room.

Take it easy dude, it's business, kickback or not certainly isn't "evil".


How is paying for someone to have fun with the intention that they will then do business with you not a kickback? Just because you're not getting cash doesn't mean it's not a bribe.


It's a meeting, a sales pitch, that takes place on a golf course. No different than over a meal, or at a sporting event. A kickback, by definition, only happens after the deal is closed, the recipient of the funds "kicks back" some of the revenue (or his commission) to the decision maker. If hasn't progressed beyond "the intention that they will do business with you" then it can't be a kickback.


What happens here is that the buyer "kicks back" a fat contract to their sales buddy who took them to that great golf resort. Or, if the terminology is wrong, you can just say that the sales agent bribed the buyer with a golf trip in order to get the contract on better terms, to the detriment of they buyer's company. Either way, golf games paid for by people trying to sell something are obviously morally and ethically wrong, and would be extremely illegal if they happened with a government employee.


What happens when two salesmen both take the guy out for golf? Someone's getting stiffed, right?

And it happens with government employees all the time, just a bit differently. The lobbyist is a member at Shinnecock Hills or some other private, prestigious golf course that costs $100,000+ to join. Then he invites the senator out, the "guest fee" is a nominal amount like $120, which he happily pays to play a round on a US Open quality course. Of course the senator charges his transportation and hotel to his office, paid out of campaign funds or something. Shit like this happens every single day, stop pretending to be so shocked or morally righteous.


Yes, corruption happens every day. So do rape and murder and theft, and so many other problems. Why should I be so accepting of any of them?


Because a huge billion dollar company's selection of ERP software isn't ruining someone's life, like a rape, murder or theft.


You’re right. Billion dollar companies doubtless ruin many more lives, but systemically rather than directly.


Is this how you operate? You just make nonsensical blanket statements to latch on to some anti-capitalist cred? Please tell me how Burlington Coat Factory, or J.B. Hunt, or Ulta Beauty are ruining lives. And these are not billion-dollar companies, but 10+ billion. And then, please - with a straight face - explain how their choice of Oracle ERP vs SAP vs Workday vs ServiceNow "ruins" someone's life comparable to being raped or murdered.


I love low-hanging fruit in the morning.

You managed to pick three companies with documented histories involving violations or enforcement actions concerning workers’ schedules and safety, religious & racial discrimination, hazardous waste, and multimillion-dollar wage disputes. Burlington is particularly funny as an example because the government was literally ordering it to return more than $1.3 million to workers just last year.


So fundamentally, your argument is that employing people ruins their lives. $1.3 million across how many hundreds or thousands of employees is not all that much each. Yes - they have every right to justice and to pursue what they were owed. And the company should be penalized. But still, they collected what, 97 or 98% of their rightful wage? And contributions to Social Security, and most likely some healthcare benefits. Would they have better off not being employed at all? Or work somewhere else for less money?


How on earth did you get there? My argument is that corporations should operate in the framework of the law (though evidently that is pretty fungible in the US). Are you saying you’re OK with your employer cropping 2-3% of your paycheck? The Social Security and healthcare point is even more bizarre. You make it sound like a charitable donation. That the victims of wage theft had to put up an exorbitant legal battle to collect…well, most of of what they were owed could probably be called “life-changing” for some of the victims.

You’re partially right though, a couple mil here and there is a drop in the bucket against most corporate earnings. Sort of makes you wonder if the system is operating like that purposefully, as in, a systemic attribute.

You didn’t even attempt to touch Ulta’s toxic waste problem lol


Keep telling yourself that.


Someone got a lot of those kickbacks…


> How is it a kickback to invite someone to play golf?

If you don't like golf, it probably isn't. But if you do, then it should be pretty easy to see. :)


How much wealth? Not really that much if you move to the middle of the country. You're thinking of San Francisco (well, Daly City) of the 2020's, which San Francisco absolutely was not in 1963. Nice place, sure, but still heavily working class, blue-collar and union. You could have 5 kids and a few apartments on a reliable, but not spectacular, income today in many cities (and suburbs of such) in the US.


That doesn't really pass the smell test for me.

How do you get this "reliable, but not spectacular" income in one of these places? What are these places?


Go become a plumber or union carpenter in Lansing, Michigan or Birmingham, Alabama or Utica, NY. Median home prices well below $300,000. You must be supremely arrogant to not know cities like these and jobs like these exist.


You can buy a 5 bed 4 bath house in Tulsa, OK for under $400K


OP mentioned 5 properties and 5 children. Taking your suggested budget as reference today we’re talking close to $1.5-2m just in properties alone. That’s 10-20 times the median wealth per adult in the US while supporting a very large family by today’s standards.


I know many software engineers with similar assets, most done have 5 children but they don’t want them either.


Software engineers now are paid much better than printers were then


Your point about affording the lifestyle isnt entirely incorrect, but it is skewed by what you choose to include vs ignore. Owning a house? Indeed, grandfather probably had it easier. More space per person in the primary residence? Grandson wins, most likely. Restaurant meals vs home cooked, international travel, ubiquitous air conditioning, threat of being drafted into the military (and actually being deployed!), expected lifespan, dental visit experience, number of sexual partners... I'd bet most grandsons have all of those significantly better than their gainfully-employed grandfathers.


The fact that you listed "restaurant meals" and "number of sexual partners" as a plus tells me everything I need to know here.

Yes, the people who like living in the Pleasuredome of cheap and fast thrills have it better these days. The rare few who want a stable, thoughtful life with a lifelong partner far away from the racket? Well...


Options are generally a good thing, even if you dont explore them all. Much respect if you found one person and its just the two of you to the grave. But, you cant ignore the fact that women fought for years for sexual freedom, and that most people of both sexes prefer to be able to date and search for a long-term partner rather than be arranged, or to be pressured by parents, church or community to marry the first person they had sex with.

Secondly, you can't invalidate a list of net positives like longer life expectancy by objecting to one of the things on that list.


Disregard the grandfather for a moment.

How is today better than the situation 20 years ago?


Most of those measures, just less significantly compared to the grandfather.


In other words: everything to do with economics is worse and everything to do with the inexorable march of progress is better. Yeah sorry but no shit. Technology has progressed since grandpa's day.

"TVs are better and cheaper" is not a useful counterpoint when discussing the economy of the 2020s.


You’re being myopic. Yes, TVs being better and cheaper isn’t that useful. But ACs, dishwashers, washing machines, beds, cars… etc. are all useful counterpoints when discussing the economy and these are impactful. And beyond the normal big ticket items, smaller items (thank China and Walmart) are cheaper. And that adds up. Lamps being cheaper doesn’t seem like much but add that across all the furniture in the house.


"it's okay to be homeless because at least we have dishwashers and cheap lamps" is a new one to me. Usually people pick a more important excuse.


You sure can buy severely enshittified versions of all those products designed with a very limited lifespan for cheap.


Stuff was total shit back in the day, lol. Even in the 1990s cars regularly rusted out. Today you can drive a cheap Kia for decades.


The 90s was decades ago. I don't see many 2010 kia on the road.

You can't know the quality of new kia "for decades".

I still see 90s and earlier cars on the road all the time (nearly daily). I owned one until 2020, when someone totalled it while parked for me.


1990s cars aren't any more prone to rust than cars now, the rust is just hidden under the plastic panel. That plastic panel isn't doing any of the work of the frame though. Shit and gilded shit are both piles of crap even if one looks better at first glance. Especially when you consider how much thinner modern car frames are which means there is less to lose before failure, assuming the electronics even last that long.


Spoken like someone who has never spent time around old cars. The 90s cars were already enshittified


The luxury market has been commoditised.

No matter how many billions you have in the bank, you cant get a better netflix subscription, TV, or iPhone than the normal person. This is the 'march of progress' you speak of. The things people wanted and coveted most have been squashed to a market value most people can just afford, and then subsidised with credit plans to make them affordable by all.

This is the basics of modern economies. It is not separate to technology progressing. The technology progressing has become the foundation of all modern economies.


In what sense are movies a "luxury market" and in what sense have they not been "commoditised" (as per your definition) for 100 years...? Seriously, your answer to a conversation about an economy that squeezes the middle-class and serves more and more the ultra-wealthy is "but netflix"? Uninteresting conversation.


Do they sell tvs like this at Walmart?

https://www.cseed.com/en/indoor-tv/unfolding-tv.html

Netflix is a terrible example, it’s cheap entertainment for the masses. Why would a billionaire watch Netflix when they could get front row and/or box seats to any sporting event or concert in the world and fly there via private jet.


Who cares? It's probably not better than a TV anyone else can afford and why would a billionaire need a folding tv in one of their 24 room homes?

The fact that you can buy a 72" tv for less than $1k now is nuts, and I assume there is no secret HBO with higher quality content only for billionaires, they still have to watch the same shit as us, and there is some good stuff out there, even on Netflix (maybe not a lot, not anymore). Even rich people sometimes want to sit at home and just watch TV, it takes a lot of energy to go out to something every night, even if you can. I used to go to concerts every week, sometimes several, now it's far less as I get older and it becomes more draining. Box seats are not very good seats and if you get good seats you are still surrounded by other people that will ruin your time.

I'm not rich, but there isn't much that I covet from rich people, because they really don't get that much better shit than we do anymore, they get more "luxury" and convenience and opportunity, but they still have the same technology as us, and it still sucks. 20 years ago, they had things we would want and could never afford, now the gap has shrunk considerably. They can pay 100-1000x for 1-5% quality gain on what a regular consumer can buy.


> 20 years ago, they had things we would want and could never afford

Like what?


It's 2026, so 20 years ago was 2006, and the biggest one that comes to mind is smartphones. The iPhone wouldn't launch until 2007, but the Blackberry existed, but was just very expensive. Of course it didn't have the same apps as we have today, but that was definitely something for rich people that we now take for granted. GPS navigation was also very different 20 years ago. The rich had $500 Tomtom computers for directions while everyone else was still printing paper maps. Photography was still a high end thing. An iPhone shoots better photos more easily than something from 20 years ago. A giant flat screen TV in 2006 was very much a rich person thing. Now that's like $400 at Costco. Video calling wasn't a thing in 2006 for a variety of reasons, but the equipment being expensive is the main one. These days there's a half dozen apps I can use to talk to someone on the other side of the planet. On yeah, in 2006, calling long distance was still kind of a thing. Translation is another one, Google translate came out in 2006, so just right at the cut off. Before that, a foreign language was just that, foreign. Today, I can whip out my phone and it will overlay my language in my camera view instead of hiring a person. Recording studios took a hit. A million dollar recording studio in 2006 is now a MacBook, some software, and some gear. Making music used to be expensive! Smarthome shit was stupidly expensive in 2006. I think most people still don't have that stuff, but it's much more accessible today vs 20 years ago to be able to tell Siri/Alexa/Google to turn off the lights.

Oh yeah, having a driver was very much a rich person thing in 2006. Now that's just called having an Uber account and it's nothing special. (Although if you have Zoox or Tesla Robotaxi access it still is.)

The access to information out there is stunning. The visuals for the Straight of Hormuz in 2006 would have been far more limited to rich people who actually needed that information. Today there's a dozen vibecoded play-by-play visualizations of the entire conflict.


Plenty of people could afford blackberries in 2006. Having uber is nothing like having a driver. A MacBook replaces about $50k out of a million dollar recording studio. The rest if it still costs pretty much a million dollars.

I’m not even sure what my point is.

Being a billionaire was never really about having stuff. It was and is about having power.


Plenty of rich people, that is. Having Uber is at least something like having a driver. I'm not rich enough to have a driver though so you'll have to tell me how that's not actually like having a driver. As far as a million dollar recording studio goes, the studio itself, the rent on the building, the sound isolation, sure, that's still expensive, but you can send a picture to ChatGPT and as it where to place the microphones where previously that would thake you knowing a sound engineer or $300/hr to be able to ask them how to mic something.

Point is, information wants to be free, and that sounds stupid because the world's changed since, but, like it or not, ChatGPT (et al) is, and has already changed the world. There's no putting that genie back in the bottle, all we can do is adapt.


You're dense. Likelihood of military service - way down. Widespread diseases like measles, tuberculosis and polio - gone. Number of people lifted out of poverty is in the billions since 1960s (economics). Access to credit - massively up (economics). Commercial air travel affordable to virtually anyone (economics). Abundant, clean, healthy food available to almost the entire world (economics). Government-insured bank accounts (economics). Tax-advantaged retirement investment opportunities (economics). You can also look at civil rights, access to justice (small claims court didnt exist in many places when this dude's grandpa was young), college participation...


> Widespread diseases like measles, [...] - gone

Funny you mention that, we're bringing measles back. Check out the graphs on https://www.cdc.gov/measles/data-research/index.html . Seems it started Jan 2025.


2500 cases? Call me when it reaches hundreds of thousands of cases, like it was every year up until the 1960s.


"When you have 15 people, and the 15 within a couple of days is going to be down to close to zero, that’s a pretty good job we’re doing."

Anyway good luck


This. Who cares about TV?


I love how countries calculate inflation now:

- Basic utilities, food, heating, energy, gas.. 50-100% increase in cost

- piano, railway carrage, something nobody uses - 0.34% increase

Thus inflation is only 5% - capiche?


It's been more than 100% btw


It feels like 200% is approaching, from an arbitrary start point of 2013.


Test attempt to remove comment


(voiceover) technology is part of economics.


What if having a residence at all is more important than having a large residence?


And yet, with all the promise of vibecoding and AI, nobody has created a clone that undercuts it in price.


I dont think "society" has failed because older people get lonely. And I also dont think you can truly judge someone's desire for companionship, or even love, until you're in your 60s or 70s and the quantity and quality of social interactions have rapidly diminished.


"differential" should be "deferential"


Took me a few reads, too.


Most people do all their Windows activity from one single specific location. It's Android and iOS that know you just drove down and made a stop at your city's most popular drug marketplace, or that you and your secretary were in the same hotel at 7pm yesterday.


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: