skysight-inc/HackerNews huggingface dataset:
I used to think ORMs were an anti-pattern too until I started realizing I was essentially implementing them every time I wrote any type of model that wrapped around SQL, as suggested in the "Use SQL in the Model" section. First we need some finders, OK--wrote those, and now we need a way to create some data... and then update it... maybe we'll combine those into a save method. Oops... looks like I just wrote an ORM. Except my ORM took me more time to write and is a lot less tested.

I don't think of the benefits of an ORM being abstraction away from SQL or being more efficient. I think of them as code and tests written that I would of otherwise had to write myself.
>Indian govt is working to get all villages better sanitation facilities.

Exactly. The privileged here don't understand that this is being actively worked on in India. We will be a superpower within the next 10 years and will be defecating in the loo well before then.

Having a working toilet doesn't make you more valuable Americans.
The first Microsoft spreadsheet, which ran on DOS, was called Multiplan.

The graphical versions of Word and Excel were developed for the Mac. Windows versions of Word and Excel superseded the DOS versions of Word and Multiplan.
Bangladeshi air cooler made from plastic bottles uses no electricity
>parties also routinely will make serious efforts to settle any high-stakes litigation at various critical points but here it was all scorched-earth all the way to the bitter end with no prospect of the parties achieving a reasonable settlement along the way.

Here in FL where the case went to trial we have the proposal for settlement rule and an Offer of Judgment Statute.

Obviously Gawker couldn't have forced a settlement but if they really wanted to settle it, Gawker could have potentially recouped their legal fees for the continued litigation. Alternatively, they could have simply accepted liability/default judgment and moved to the damages phase, saving themselves untold legal fees in defending the case. Of course it is easy to Monday morning quarterback these things after you have availed yourself to all potential legal defenses and still not happy with the result.
This is correct, being able to see the actual conditions would embarrass them.
ORM is really nice when you have a very large complex object you want to send out to the browser. Have the browser send it back, have the server validate it and save/update it. For that, it is beautiful.

The N+1 query problem and such have to be avoided, but that's just knowing how to use the tool properly. For querying, it's usually better to use the criteria API or in some cases straight SQL, but for doing simple crud stuff with complex objects it's pretty hard to beat an ORM.

The complex querying stuff is moving to Hadoop and Spark for larger data sets anyway, so if anything, using the same database software for OLAP and OLTP databases is almost an anti-pattern these days, at least for larger data sets.
Assuming it was foul play, it wouldn't qualify as you couldn't accomplish it via purely software hacking.

What brobinson is suggesting is that a hypothetical hacker, thousands of miles away in front of a console, could accomplish a murder with no other physical agents involved. i.e. no drones, hitmen, etc. just remotely commandeering existing systems already in everyday use.
C gets out of the way and lets you do useful things that are "undefined behavior". How convenient is it it Rust, to, say, use the unused bits in a pointer (due to alignment) and put a type tag in them?
If the airport staff there actually knows about the rule. Too often you are just sent to the back of the regular line before being given the chance of using the machine.

(And it does not allow for entering on visa.)
I'm not blaming the author. I'm just saying that picking a random library is a bad idea.
Don't Fear the Reaper: Detecting Failed Delayed Job Workers
> I think the Macintosh doesn't get enough credit for what it inspired at the time.

I think Microsoft doesn't get enough credit for what it did for the Macintosh ;-)
It seems relevant that it was 41 Secret Service employees reprimanded and perhaps should be added to the title.

Reminds me of this recent article on the US Navy corruption scandal, just astonishing-

https://www.washingtonpost.com/graphics/investigations/seduc...
I am over using the newest tech. Just want to work on interesting problems. JS fatigue etc. I'm glad I don't do web dev anymore!
ORMs are just tools. They aren't pro- or anti- anything.

Unquestioned adoption (or its brother, knee-jerk eschewance), argument by sunk cost and/or emotional attachment, analysis by "let me google another blogpost or two", and other forms of herd-following and fanboy-ism? These are anti-patterns.
You mean it's not currently secure? ;)
There is a juvenile murder mystery story involving someone hacking the climate controls in a house to alternately make a room hot and cold, inducing a heart attack in a sleeping elderly resident while making it look like natural causes.
ORM promotes mutable entity types.
You do not think of this way because you do not write modular code. How hard to use a react component in a application?
Is there any difference between a pacemaker being disabled and your car driving into a brick wall? Genuinely curious how these things are different.
I didn't, but it's most likely at McMurdo (the largest U.S. base on the continent).
No, actually. It really doesn't take that many bits of entropy for you to be unable to find any documents in a haystack of entries. My file ID is 45 characters of base-64 encoded string. This is a total entropy of 225 bytes. If there are a quintillion files in google drive (a hundred million files per person who has ever lived), you were loading a million possible files per second, you'd still take several times the expected time to the heat death of the universe to randomly stumble upon one.
We don't have it here in China either, but we have a homegrown domestic equivalent. Let's hope India builds one of their own! The world is better off with heterogeneity.
>Whenever I read these sort of anti-ORM posts I wonder exactly how simple the data model of these people's software is that they would rather write SQL for every trivial operation

It's actually the exact inverse: it's ORMs that are only good for fairly simple data models and become pain points for anything more advanced, after which level you end up with hand-rolled SQL through the ORM or complex reinvention of all SQL concepts at the ORM layer in an ad-hoc way.

SQL is good for both simple and overly complex models. ORM are ok-ish with simple (but still redundant) and a crappy layer of faux-simplicity and pain on more advanced models.

Not to mention that they promote not knowing the details of your data model and letting the ORM create it through another ad-hoc reinvention of the db's DDL.
> HN is in the pockets of Microsoft.

Please don't post drive-by smears to Hacker News, including of HN itself.

If you or anyone has a genuine concern about this, I addressed a similar comment in great detail a few days ago: https://news.ycombinator.com/item?id=11844253.
From my Dota experience, usually the hostility is between teammates. Because League partners 5 people together, mistakes and bad play from your teammates can have negative impact on your hero and this can be quite frustrating. Over-extensions from a team mate can lead to your hero also dying as you try to save your buddy. It is also easy to blame your teammates when you make a mistake.
If you like the kind of journalism you currently get from Engadget, Kotaku, Valleywag, et al., you'll still be able to get it even if they're shut down. It's not as though the terms of the decision include the slaughter en masse of the editorial staff and reporters, after all; they'll find jobs elsewhere and continue to get published. Life goes on.
I agree with a lot of what the author has to say. Is it a coincidence that every project that used an ORM I've worked on in my 10 years experience has ended up a mess?

I end up spending more time troubleshooting and asking the "why is it generating these queries?" and trying to hack ActiveRecord to get it to do what I want.

I'm sure we have all had that moment where we actually have the SQL query already written and now face the task of trying to convince the ORM to just do what you want, while trying to conform to whatever horrible and leaky API they have created. A few hours later, after scouring StackOverflow, Google and wading through abstraction upon abstraction base classes you realize you're so far away from your original problem at this point, and you need to go home, so you just get the damn database driver and execute the query, what you could have done in the first place. You feel defeated and hope the others don't shun you for your "improper" use of the ORM.

Or maybe you do find a clever way of hacking what you need to do in the ORM, but a lot of the time I just don't care anymore to make things fit in someone else's' poor design.
HSI: End the Dog Meat Trade
6 USD/month for full subscription to iPad/web version of the NYTimes.

I'd rather pay 5 and get an additional 10% discount to pay once a year. But hey, we're getting there :-)
Open access: All human knowledge is there, so why can’t everybody access it?
At first I thought the same with the creepy overreach. But I thought for two seconds, and was like if I went around acting on my work campus like I do at 3am drunk with friends I should be fired too. You are engaging in your place of work and should be a positive influence. You don't shit in the middle of the office.
> Libel and slander have no place in a functioning democracy.

You seem to not understand what freedom of speech means. As someone who actually lives in a place where people use libel and slander laws to sue people left and right and get offended, consequence being censorships and a tightening of restrictions on speech, I'd kill to have the kind of freedom Gawker did.
According to the article, you need the resource ID of the link to query it in the API. The resource ID seems difficult to get; you basically need to be viewing the conversation (and thus the link) to get the ID. While I agree it's _possible_ to stumble onto sensitive information by downloading resource IDs, that seems too unwieldy to present a serious risk to any particular user. (It's the same amount of risk as, for example, trying to guess the URL of someone's hypothetical photo on the CDN.) Unless there's a way to get a list of resource IDs given someone's username, I'm inclined to think that this is a pretty minor security risk in the larger scheme of things, though it is scary to type a resource ID into their API tester and see a sensitive link come out.
Smart Contracts for Investors – How to Separate Myth from Reality
Correct. The sufferings of the ones who'd learned IBM Displaywrite were even worse....
I've found that sqlAlchemy core (the layer below the ORM) works exceedingly well for me–it's composable, exposes SQL easily as needed, makes abstraction easy etc. The major benefit is that the objects in the expression builder represent the parse tree, rather than representing SQL strings directly.
Well no need to pay bribes when the police can forcibly take your money, and now even suck it right from your bank account.

https://news.ycombinator.com/item?id=11862582

Of course, you can get it back, but it's up to you to prove that it's your money that they've just confiscated from you. Hope you don't need to hire a lawyer to get your money back since now you have no money.
> I don't nest or chain tasks.

Yeah, I think nested/chained tasks are pointless. The point of celery is to offload the task to an asychronous worker (probably on another machine) so if you're already on the worker there's no point sending another task to the same worker--it doesn't achieve anything above doing the task inline.

> I don't use periodic tasks because they can pile up badly and block everything.

This sounds like you're either running the periodic task too frequently, or you need more workers. I've seen a few cases where people tried running a 20-minute task every second on a single worker--of course this is going to pile up. Periodic tasks are among the most predictable, so they're easiest to prevent from piling up: simply make sure that the following relation holds true:

w > t / p

w = number of workers
t = how long it takes for the task to run
p = the period (a task that runs ever 20 minutes has period 20 minutes)

The > should be greater than by an order of magnitude to be safe in case t increases.
But it is wrong. And Theil got revenge by backing a lawsuit which stood on its own merit - which also isn't illegal.
If it were e.g. a Tesla, no there would be no difference. But a Mercedes C250 Coupé? How would you hack that remotely? How would you program it to accelerate uncontrollably? Does it even have computer controlled acceleration? I would have to assume that physical tampering of some sort was involved, possibly even the introduction of a physical device such as one that remotely physically activates the throttle.
Brock from surge here. I would just like to clarify causes of our downtime because we like DigitalOcean very much and dont want people to have the wrong idea.

In the 1 year we have been available we have had 3 incidences each for different reasons.

The first was DigitalOcean taking us offline for not complying with a DMCA takedown request. This was before Digital Ocean knew who we were and they expected foul play. From this incident DO reviewed their policies on removing network access to customers and show genuine remorse for the downtime. Like I say we have been very happy with DO and would definitely recommend them.

The second downtime was due to user error on a bad deploy and the system unraveled in a sense. This was a result of several poor things that made the system more brittle than it should be. Somewhat significant architecture changes have happened as a result and more are underway.

Last, and most recently was two DDoS attacks on our floating IPs within days apart. Learning lots still about how to best protect our customers from this. System changes and mitigation plans are being put in place to protect our customers from these sorts of attacks in the future.
Advanced Page Object Pattern in Automated Testing
Ask HN: Can first to market do more harm than good?
Hello,

Here's a story: I came out publicly with a project I had been working on for a long time. I figured, if I don't release it now it will never see the light of day. Sad to say I feel like what I ended up releasing was an unfinished, unpolished product.

Fast forward three years later: The project has seen considerable progress in a lot of areas. Despite this people show hardly any interest at all and probably associate the name with bugs and/or failure.

Should first impression weigh more heavily over first to market?
> Spending a lot more money than that isn't going to get you a much better result.

And that's precisely the point, if you don't have that money (and this can be quite a lot) then you're out of luck. The linked case is about a celebrity worth quite a bit of money and still it wasn't enough to get the case decided in his favor, it needed yet another - bigger - millionaire / billionaire to step in to sway the case. I don't see what could prove this more conclusively, a 'certain amount of money' can be more than what most mortals have access to.

It it wasn't for Thiel to have an axe to grind with Gawker this would have not happened.

And that's just civil proceedings, in criminal proceedings the odds are stacked even worse against a defendant without funds.
One ORM I've used recently which does some cool stuff is Diesel, for Rust.

On a few of these counts, I think it does quite well:

> Efficiency is "good enough": none of the ORM layers I've seen claim efficiency gains. They are all fairly explicit that you are making a sacrifice of efficiency for code agility. If things get slow, you can always override your ORM methods with more efficient hand-coded SQL. Right?

Relevant GitHub PR: https://github.com/diesel-rs/diesel/pull/283 -- Diesel's query builder is often faster than a raw SQL string, and the queries are typechecked against a provided database schema at compile time.

> When you fetch an object, which of its properties (columns in the table) do you need? ORM can't know, so it gets all of them (or it requires you to say, breaking the abstraction). Initially this is not a problem, but when you are fetching a thousand records at a time, fetching 30 columns when you only need 3 becomes a pernicious source of inefficiency.

This is trivially easy to avoid in Diesel (and, I suspect, in other ORMs I haven't yet used. Just add a .select((tuple, of columns)) function call to the start of any query you're building.

> Entirely anecdotally, I claim that the abstraction of ORM breaks down not for 20% of projects, but close to 100% of them.

IMO a good ORM allows seamless integration of "raw" SQL through the use of type-checked function calls which integrate into the rest of the ORM. Diesel does this, and IIRC so does SQLAlchemy.

> Objects are not an adequate way of expressing the results of relational queries.

Right. But an ORM need not always force returning objects. Diesel (and again, IIRC SQLAlchemy) are examples.
DEA Wants Inside Medical Records to Fight the War on Drugs
Don't forget stealing all of the Dota hero/item concepts from said forum. For example, Warwick and Teemo were fan made concepts from the dota-allstars forums, iirc.
Living 800 feet above the city
Rather, separate children based on what you perceive their needs to be.
I have yet to see a data model so complicated that it cannot be modeled in the more frequently used ORMs. I have tables with two dozen FKs that participate in 7 or 8 joins and it's still not a problem.

You mention all these things and yet in 10 years of experience they have not been a problem for anyone I know.

Have you even used a good ORM?
I hope CCP doesn't do anything like that with their employees. Otherwise, they would all be fired. Or all promoted.

In some games(taking Eve Online as an example), being a dick is just part of the game. As long as you are not doing it in any professional capacity, or insulting people (as opposed to their in-game persona).
> Making the claim that C is twice as fast as Rust because of 5/10 benchmarks in the "benchmark game" shows an incredible lack of common sense to me.

Actually, 2x is likely the lower bound of how much faster well-written C is over Rust. Rust developers have an interest in promoting their language so they will make sure their test programs runs as fast as possible. C doesn't need that kind of marketing.

For example, the Rust solutions were all updated in 2015 while the C solutions hasn't been touched since 2013.

> In 5/10 benchmarks, the benchmark games claims Go has equal if not better performance than Rust. Am I supposed to believe now, that a managed, garbage collected, 6-year-old compiler, language is as fast as as language without a runtime running on LLVM?

It doesn't run on LLVM. It takes advantage of LLVM to compile ELF executables. I said that common sense should be used.
Dota 2 addresses this specifically with a time-sink. A minimum number of games is required to play competitively, which increases the cost related to "new accounts at will".

In addition, even for non-competitive games, players who obviously troll and are flagged by the community are pushed to a separate pool with other trolls.

The system isn't perfect but appears to work fairly well for new players.
LAMP? that must've been the tail-end phase then. When I was around these tools (as a kid, but a working kid heh) everything visual was all the rage. We will click solutions away, they've said. Solaris and other cumbersome CLI only crap would go away, they've said. Linux, what is that? - they've said. Fun times, indeed!
I don't know, your group of people seems very specifically selected by comparison, which would imply it's at most a subgroup.
In the novel Accelerando by Charles Stross one of the main characters creates hundreds of patents and sends them to an organisation which had as it's mandate, a responsibility to grant licences to any patents in its portfolio for free. A similar org would be awesome.
Every approach has ups and downs, but my fundamental gripe with ORM as it exists is that it does not match business data model very well.

Here is a shameless link to something I wrote on that topic; it complements the above article: http://unframework.com/orm-vs-key-value/
I know someone (US citizen) who did this exact thing for a work trip to Vancouver and was denied because he got himself into a trap trying to explain what he would be doing.

Honesty might get you in trouble, but thats still probably a better place to be than trying to lie your way out
I imagine the vast majority of employers would be pretty pissed if the vast majority of programmers shared their private code, and some might even wish to take legal action. As an employer interviewing and hiring candidates, one should respect and expect this confidentiality to be exhibited and adhered to.

For example, I build things for clients that are proprietary to their businesses. Some things are publicly accessible, like marketing pages, but the real stuff is locked behind employee-only auth. Other things run entirely on internal networks, and can't be accessed from the web. They would be rightly upset if they discovered I shared their code with a third party, or placed it on Github.

Moreover, just because Github exists, doesn't mean programmers should feel obligated to "participate". Outside of developers who maintain or participate in truly used projects, it's mostly noise. The only exception I can agree on is looking at issues a candidate has reported to gauge their depth of understanding, clarity of communication, offering of solutions, and other such valuable insights.
There are some good observations here. I believe a large part of the interface problem is that people try to design interfaces that make tools easy to use, but it's usually better to design interfaces that make tools easy to understand. There's a difference.
I suppose I'm in their target audience, then. I've not done any systems programming, but do have a curiosity about it, and Rust has caught my eye.

But my main problem is a lack of a project -- a ThingIWantToDo that would be well suited to a systems programming language like Rust. And I don't even know what kinds of problems or projects are well suited to systems programming -- so far, when I've had an itch to scratch and gone to scratch it, I've found Python able to do what I want.

Now I realize that Python is in no way appropriate for all classes of problems, and that there problems for which it is not fast enough. But thus far, the only project I'd like to tackle that I know Python will be too slow for is doing real-time audio processing on Linux with lv2 plugins and JACK. But lv2 and JACK are C APIs, so that's incentive for me to learn C, not Rust.

Understand, this isn't a knock against Rust. As I said, it's caught my eye. I just haven't found a compelling reason to actually get involved yet. I am hoping I eventually will.
Just curious: aside from historical precedent, what objective "connection with the merits of the dispute" makes the ACLU more appropriate than Thiel to fund a privacy suit? Is it just that the ACLU has trained lawyers who can weigh in on the law? Would the attitude toward Thiel change if Thiel happened to have a law degree? Would it change for the ACLU if they were purely funding it and not actually providing lawyers?
It's been ephemeral for some 60 years now.

Some ephemeralities are more durable than others. Not that they cannot change.