skysight-inc/HackerNews huggingface dataset:
ORMs lure you in with a false sense of neat abstraction. They have nice intuitive examples on their home pages. But then you use them in the real world, doing gnarly queries, and you realize that doing anything powerful and fast in the ORM requires its own completely separate abstractions, which are often difficult for the uninitiated to follow. It's also often a big pain to debug the raw SQL that gets compiled after the ORM does its magic.

The argument I've made before when going down the path of ORMs has been: do we forsee needing to use this model code on a different database engine? Outside of simple toy applications, or needing to support different engines with the same code, I agree that ORMs are more trouble than they're worth.
How Orson Welles Stole ”The Third Man”
Right.

I wholly agree with all of those. In fact I'm doing all of the ones that are practical for me.

The main purpose of my post is - I believe that my talents in software development allow me to use that for good.

Essentially, that by me voluntarily reducing my consumption and redirecting it towards climate efforts, I can do more and faster.

I think this is genuinely more efficient than quitting my job and going all-in on protest or working directly for a charity.

Whether it's more efficient than starting one - time will tell.
For anything complex, definitely. For anything simple, eh.

It also feels to me like he's talking about a specific ORM - I know ActiveRecord has it's fair share of issues, but from what I know of AR usage and implementation, it either doesn't do what he's (legitimately!) complaining about or does do it in the way he's suggesting.
The idea of eliminating negativity is problematic because, sometimes, relationships that are the most challenging are also ones that end providing fulfillment and personal growth.

Outcomes are often impossible to predict in advance because you just can't know which relationships will end up challenging you in ways that help you grow. Also, you and your circumstances will change and those changes will affect the nature and affect of your relationships.

I'm not saying one should cannot or should not make decisions about who to keep close in one's personal life. I am saying, however, that predictions about the future value of any personal relationship is as likely to be mistaken as correct.

I don't think relationships should be about maximizing one's potential, whatever "maximizing" may mean. Relationships are important and so is happiness, but I don't think relationships should be cultivated and curated in the service of maximum happiness.
An ethos that can be used to justify anything, given sufficiently crafted and amplified rhetoric.
For the consumer market, this small advantages are not worth considering, imho. Amd processors do more and cost less, and power consumption is being optimised at each iteration.

For server/pro market they might be worth considering but again, the huge BOM cut that you get by choosing AMD processor might be worth the performance penalty.
We used a third party tool for mailers and it was having severe performance problems after moving the server to a cloud based solution.

We confirmed what the DBAs said, the latency was only 34 seconds round trip and the database was pretty fast. I installed wireshark to see what was going on. It was querying a table with 80,000 entries, and then for each entry it would do another, "select ... limit 1" query to get the meta data on each record. This loop was abstracted away in an ORM and the third party had very few clients with tables of our size for that particular table.

When it was run on prem it wouldn't take too long, but when it was on cloud it would take 45 minutes. Insignificant amounts of time being spent thousands of times ends up being significant time spent, and this can creep up on you as more things move to be serverless / API driven. A bunch of money and time was spent on figuring out the source of the issue.
Greenland Unicorns and the Magical Alicorn
And SQL has been relevant for about half a century, odds are good you'll continue to find use for that knowledge for the remainder of your career.. Well worth the time investment.
Yes, children are not responsible for their actions until they turn 18, at which point they are magically instilled with wisdom and accountability regardless of upbringing.

Credulity is not "elective".

There's no way for the average person to distinguish between homeopathy and pharmaceuticals without running an experiment on themselves. It's a matter of what biases they were taught growing up.
Referential Accessibility is Critical for Experience of Books
As a suggestion for following articles on the subject, you could explore why there is no remedy for this apparent loss of privacy.

I personally think that the Bill of Rights should have been amended once tabulating machines were used for the 1890 census, without which, it would have taken the whole decade to count.
We're getting pretty far off-track which is what I was trying to avoid but ok, I'll try to bring it back around.

I believe a human being has a fundamental right to their own labor, and even if this isn't the case I think we do best acting as if it is. Socialists of all stripes disagree with me; if the state is to claim control of everybody's labor of course you can't hold this right as sacrosanct.

I agree that a market system requires laws and regulations to function. That doesn't mean we should be blindly regulating in the name of consumer rights without thought for the consequences and whether or not it even works. This is why we have the field of economics.

In this case the intended goal of helping the consumer by increasing their "freedom" probably won't be met. Either because 1. game developers can't get funding to develop future games without a stable revenue model so they stop making games, or 2. they realize they can get funding so long as they never actually give the consumer the full game. This leads to the server model where some core functionality of the game only runs on the server and you buy a subscription. Either way, you start with the intention of giving consumers more ownership of games and they end up with less ownership than they started with.

We could spend the next few days waxing intellectual about what freedom really means and all that or we can realize that the plan just doesn't work in meeting its own goals.
They used to though.

Years ago in communist Poland my father accidentally wound up in some kind of Chinese event where the organizers would give away Mao's Red Book.

At the exit there were two local secret service agents who in turn would politely, but firmly ask for the booklet to be surrendered to them, since this was a flavour of communism not enjoyed by the Big Brother, so illegal.
Sure, kind of. Gate, for instance[0], an anime about the JSDF encountering a portal that opens to a medieval fantasy world, contains a lot of nationalistic and pro-military themes. Kantai Collection, an anime based on a game, features IJN ships as heros, and some historical revisionism[1]. I can't think of more off the top of my head. It doesn't seem to be a common theme but it's entirely possible I as a typical Western weeb just don't see it. A lot of anime set in the future portray Western powers in a negative light - the American Empire in Ghost in the Shell Stand Alone Complex is clearly villainous - but I don't know if that's "right wing" or just reasonable extrapolation.

It seems to be more common to discover the creators of an anime or manga holding right-wing or extreme beliefs, though, than for those to explicitly find their way into anime. The director of Recovery of an MMO Junkie, for instance[2] with his anti-semitic tweets.

[0]https://tvtropes.org/pmwiki/pmwiki.php/Literature/Gate

[1]https://anitay.kinja.com/thoughts-from-outside-historical-re...

[2]https://kotaku.com/anime-director-causes-controversy-with-an...
A French court has ruled that Valve should allow people to re-sell their games
Not true. It just depends on the ethos of the company. I wouldn’t call Amazon support “amazing” but it’s clear they have properly scaled their human staff to reasonably accommodate the number of customers they have.

Have you ever tried doing the same for a Google product? Guarantee their optimizing for operational efficiency and not customer happiness. At all.
These things don't have to be mutually exclusive. Know your tools and when to use them.
Levelling the playing field
Bots Help Moderate Stack Overflow
Where in Maryland is this? Close to Ft. Meade?
You're adding a lot of bias, unconscious or otherwise.

"have to" and "need" are strong words that I don't think you're in a position to use here.

Maybe didn't "have to" and they were just panicking. Maybe this post didn't "need" to be made.
Precisely why you go for the largest polluters, like agriculture and ground transport. Air travel is the opposite of low hanging fruit because it's difficult to make jets more fuel efficient—the air travel industry is already incentivized to do this to cut costs, so most of the low hanging fruit has been picked. You end up striving for incremental improvement on 2.5% of the problem.
As far as refunds go is there anything stopping you from giving out cash? Not to be snarky or anything but the lesson I've taken from these sort of posts is to always have multiple payment systems set up, like Wikileaks: https://shop.wikileaks.org/donate.

Stripe is really trendy but this site isn't so fond of them: https://www.cardpaymentoptions.com/credit-card-processors/st.... There are hundreds of other providers to choose from. I'm not sure I'd trust the site's recommendations directly, always do your own research too, but it's a useful starting point.
I'm not surprised. There are a lot of techies who took Ayn Rand a little too seriously and think that profits are themselves a moral value, and that investors are somehow beyond reproach by virtue of their wealth.

I might paraphrase Rand to suit my purpose as the Devil quotes Scripture, but I have to say that for such an ardent atheist, Ayn Rand's worship of wealth and those who possess sounds a lot like prosperity gospel.

Then again, if you're trying to get a startup off the ground or hope to work for a rising startup, it probably isn't smart to bite the hand that might feed you.
Wait a minute. That article says "outdoor cats killed somewhere in the ballpark of 2.4 billion birds in the U.S. per year". The NY Times article linked here says that the bird population decreased by "nearly 3 billion birds" over 50 years. So in 50 years about 120 billion birds were killed by cats, and only 117 billion replacement birds were born? Seems like if we killed the cats, we'd be overrun by birds!
That's pretty good. Seems like a good reason to add an -f alternative to -q to provide an sql file.

In fact, now that I remember, it has happened that I'll be provided a CSV, so I write this big query. Then, from analyzing the results, they'll tell me they made a mistake with the CSV they gave me and provide me with a corrected one. They'll use a different name to avoid confusion in not knowing which is the bad one and which is the corrected one, and I just change the file in the assignment and rerun the same SQL.
Support programs/laws that make birth control (including abortion) available, especially to young/poor women, especially if you are in a developed country.
current rails dev here, i've found ripping out the custom SQL and replacing it with ORM equivalents offers the best performance and readability short of custom Postgres functions. The state of ORM in rails of 2014 vs 2019 is a big leap.
> An area of research that I don't hear much about is creating hydrocarbon fuels for applications that really need them, like airplanes. Essentially, using hydrocarbons as a chemical battery instead of an out-of-the-ground energy source.

Oh yes, I was going to comment on exactly that point.

> The chemistry is complicated

That depends on which type of fuel you are talking about. If you can use Methane (AKA Natural Gas), then you could use the Sabatier reaction (https://en.wikipedia.org/wiki/Sabatier_reaction). You need CO2 (which is what we want to remove) and Hydrogen (which is the energy consuming part). Then you have to compress it (more energy).

The advantage of adding CO2 to the mix(instead of just burning hydrogen) is that it becomes much easier to store and you have decent energy density.

Of course, that's not Jet-A. If you really need that (turbines don't care too much, but logistics and storage will care), then you need to use something else. Eg.
https://en.wikipedia.org/wiki/Fischer%E2%80%93Tropsch_proces...

As I understand it, that's what the Navy was struggling against.

But forget about the energy costs, think about human labor costs. Because if you can reduce labor to zero and have these things be self-sufficient, then we really don't care about energy costs. Stick a bunch of these fuel facilities wherever they will fit, power them with whatever renewables are available, wait a bit, then come back to collect.

I think the first large scale application will actually come from SpaceX. They need to figure out fuel manufacturing for a Mars return trip.
Which ORMs do you work with?

Whenever I get to the point where I'd do something gnarly with a query, I just fall back to SQL statements with results that the ORM can parse; or just dump directly into data structures and go from there, even if the originating tables still have ORMs.

If your framework/library/language doesn't let you skip the ORM - or populate the object with the results of a custom query - well, I'd say that's a failing of that ORM, not of ORMs in general.
So enforce human reviews for any update to extension with "read all requests" permission and over X users.
Fair enough, but unless are organized, we often feel like individuals with little power.
Books Won't Die
Removing the Profit from Our Pills: The Case for a Public Pharma System
Directly next to Ft Meade
My personal gripe about ORMs is that they have two main usage patterns, and each of them has major drawbacks.

The first pattern, common in frameworks like Django, is to cram the business logic into the ORM instance objects. This creates a tight coupling between the two separate concerns (business logic and data persistence), and will cause problems as soon as the two structures deviate from each other.

The second pattern is to keep the ORM as a purely data storage layer, which is much more flexible but commonly causes duplication of nearly identical structures in separate layers.
> In these cases, I’ve elected to write queries using a templating system and describe the tables using the ORM. I get the convenience of an application level description of the table with direct use of SQL. It’s a lot less trouble than anything else I’ve used so far.

This feels like good balance. I want to express my database schema via OO classes. It eases db migrations as the application grows if you use tools like Alembic (same developers as SQLAlchemy).

But use care to avoid SQL injection risk with template queries. SQLAlchemy makes this easy using .bindparams, as does .NET via SqlCommand.
Elsewhere in thread:

https://news.ycombinator.com/item?id=21029344
My biggest hope is that you will be able to get 256 or 512GB of RAM with those. The biggest limitation for the previous one for me in comparison to Xeons was that you could only got 128GB of RAM.
What ORMs have taught me:

Use an appropriate combination of ORMs and raw SQL.
When Words Fail: Where our minds go when words let us down
(The person you're replying to+ who submitted this article _is_ the person they laid off)
People (including me) worry all the time about things that are actually a very small issue compared to all the really huge issues they're ignoring. We have finite attention and resources, so getting caught up on the unimportant details like this is a form of bike-shedding and a personal pet-peeve of mine. It doesn't just waste time, but detracts from the more important concerns. And it trips me up personally all the time.
CDK experience has been mixed. Prior to GA it was all over the place, but it's gotten more stable now.

A lot of cloudformation quirks leak directly into CDK. And I've learned to be patient (e.g. one change at a time, roll though all environments, do adds and deletes separately...).

Right now using it is 50/50 for me. I'm assuming as more construct libraries become commonplace that will help the most (up until recently this was hamstrung by the amount of breaking changes)
> The US almond industry earns $12 billion per year.

How much of that is actually from sales in the US vs. exports? In 2018, California produced 80% of the worldwide almond crop and exported 70% of it. Americans aren't quite as hungry for almonds as the author assumes.

Ref: http://www.capradio.org/articles/2018/07/09/record-crop-for-...
Part of the problem is that activeTab makes a ton of the things extensions usually do impossible, so lots of extensions will keep requesting full permissions. I'm not really sure how you fix it. Scoping to a list of domains could potentially work, but adding new domains shuts off your extension so it seems unlikely that anyone could do it when they could request wildcard permissions at install instead.

In practice users want extensions to do stuff that implicitly violates security boundaries, so I think making that stuff secure would basically require Google to build it in. Like for example, 1password naturally needs both a way to intercept entry of new passwords (to offer saving) and a way to detect password fields and type into them. Detecting a password field means you need to be able to scan the DOM and detect when the user is interacting with the field. At the point where you can do that, you can snoop on the user on an important page, activeTab or no.

If the Chrome Web Store offered straightforward ways to sell paid extensions at least then there'd be less reason to embed malware in your extension instead...

My extension (now removed due to legal threats and DMCA abuse) was originally scoped to an application's domain, and then the developer added a new domain so I had to update my extension manifest to add that domain. Doing so shut it off for every user and I had to explain how to turn it back on. Given that experience I should have just put a wildcard in the permissions instead, but I underestimated how bad Chrome's extension infrastructure would be.
The specific mechanism is quite limited in scope, but others aren't. Offering contracts, loans, or investment to companies owned by politicians allows the transfer of considerably more money, for example.

I'm not staking a claim as to how much this happens or what mechanisms are used, merely pointing out that it isn't clear that the public figure is accurate.
A feature of Netbeans I always liked was the ability to create a Hibernate Java Object directly from a database table. It does make sense to me to start at the DB first because the application is just a broker between the front end and the DB so it's more flexible to make the adaptations there.
Yep, also current rails dev here and this is also what I do :)

Learning SQL with an ORM does remind me a bit of learning memory management with a garbage collector: helps you make better choices as to how you put things together, even if you never directly use the know-how.
Easier to change yourself than change someone else!
This topic pops up frequently here on HN and every time I’m shocked at how many people have issues with ORMs! I’ve been using Hibernate/Spring Data for several years now and never ran into any issues. If I need to write a complex query, I can easily write a @Query annotation in HQL and it neatly fits right in to the repository class. I also develop with query logging enabled so I have better understanding of the queries actually ran on the DB. I think it really boils down to using the right tools, the right way.
Overrated: Ludwig Wittgenstein
If you use Go and PostgreSQL, I’ve been working on a tool to help you “just use SQL” called sqlc[0]. It generates methods and structs for your queries, automatically. It’s made a dramatic difference in my day-to-day workflow.

[0] https://github.com/kyleconroy/sqlc
Makes sense. How about git log for money?
> Now, they've reworked things to improve battery life and the tiles feel worthless.

Yup, I'm in this same boat. Because of this update behavior I will be dropping Tile at the end of their current life cycle on my keyrings.
Some projectors are "smart" too.
Yep. I’m an ORM-hater, too. Feels like “leaky obstruction”, to me.

But there’s got to be some reason people keep embracing it, even if I’m not one of them.

Possible reasons, which you can rephrase as productivity virtues, if you are so inclined:

* I don’t spell well

* I don’t test much

* I don’t care how much time and bandwidth it uses

* I only know Java (or C#, or whatever)

Sounds despicable to me, but could be many small scale Enterprise projects, I guess.
Its really the developers that hurt a bit. Valve already got their 30% cut on the game. They will comply with the laws for existing games. For newer games, expect fewer sales discounts in the EU to make up the loss. Also some bigger game developers will pull out of Steam and run their own subscription services for the EU. Things like Google Stadia start looking perfect for them. And the independent developers will just have to bare the loss in sales.

Its kind of like the SaaS model. Why pay $100 once when you can pay $10/month for years by calling it a service.
Wagner: totalizing master of endless melodies
You don't use ORMs for gnarly queries -- that's not what they are for! They are for making manipulating the entities easier -- reading the data out of the database in a way that makes easy to modify.

You can (and should) use them for simple queries. You have a list of entities you want to query and filter, that's going to be fine. Joins are fine. But if you're doing some complex analysis, an ORM is the wrong tool. That doesn't mean it's a poor abstraction, or difficult to follow, or something to be avoided. It's not the right tool for that job. For the job it's designed for, it's going to save a lot of effort.

SQL is great for analysis -- it's pretty much what it's designed for. But for bringing data into your app and modifying it, SQL is cumbersome and verbose. If you're loading data into objects then you're just creating your own personal ORM anyway.
They never suggested anything of the sort. That being said, for every uBO that doesn't send that data back home, there are 1000s of "ad-blockers" that do exactly that.
NFI what any of it means myself, but it does seem sensible that upcoming Brexit and middle eastern news has a lot of large funds moving around, which might be sufficient reason for extra liquidity to be needed?
This is majestic. Is your current work anywhere near as interesting? :P
I don't think this is true. I trade cross currency basis and if there was excess demand for offshore USD the "basis" (premium over normal rates to borrow USD in return for lending e.g. EUR ) would be moving dramatically. It changed a bit today in response to USD shortage but this seems predominantly a domestic story.
Why did Facebook buy WhatsApp, or Oracle buy Peoplesoft?

Typically: to enhance their offerings, remove a competitor, or shut it down.
The whole point of the redesign is to juice user engagement metrics and get that sweet, sweet ad revenue.

You don't need megabytes upon megabytes of nonsense just to avoid some full page loads. Or take al ook at something like HN where it's light enough that a full page load isn't a problem.
Swift 5.1 Released
Has Banksy Monkeyed Around with His Parliament of Chimps?
I agree.

I think the way most teenagers walk this path is by being on different services than their parents ("facebook is for moms!")

There could also be an element of "this phone is more for you than for me", like if your employer "generously" gives you a cellphone.
Best 30 Books to Understand Modern China
I think he's talking about Hibernate.