Google featured snippets are worse than fake news - <AUTHOR> https://theoutline.com/post/1192/google-s-featured-snippets-are-worse-than-fake-news <comment><USER3> I've also wondered why Google isn't held responsible for publishing libelous claims and hoaxes as facts. Examples:

Is Hillary Clinton a pedophile? [https://www.google.com/search?q=is+hillary+clinton+a+pedophi...](https://www.google.com/search?q=is+hillary+clinton+a+pedophile)

Is John Travolta gay? [https://www.google.com/search?q=is+john+travolta+gay](https://www.google.com/search?q=is+john+travolta+gay)

Does Lil Wayne have HIV? [https://www.google.com/search?q=does+lil+wayne+have+hiv](https://www.google.com/search?q=does+lil+wayne+have+hiv)

Perhaps worse, this is what drives Google Home's question answering. Yes, they say "according to so-and-so" first, but if Google is responsible for "organizing the world's information", they are essentially endorsing that answer as the best response. They've gone too far in favor of recall over precision/reliability and need to dial it back. Otherwise you end up with crap like this:

Is Earth flat? [https://www.google.com/search?q=is+earth+flat](https://www.google.com/search?q=is+earth+flat)

<comment><USER4> Wow, I've mostly converted to DuckDuckGo for the past two or so years, so are these "google assistant" style placements now part of their core product? or is this a setting that you've enabled?

If it's part of the core... Wow, what a useless cess pool google has become.

<comment><USER3> Yes, those are default search results and the same content that drives Google Home's voice responses when you ask it a question. Originally Google stuck to Wikipedia/Knowledge Graph types of answers but have expanded this in recent months to try to answer just about any question you search, however dubious the answer's source.

</comment></comment></comment><comment><USER5> Yikes. More of this "People only want to be told what to do" stuff.

I can easily think of a dozen political questions for which no simple answer would be correct -- the language is simply too fuzzy. For many, many things, this is a good idea. The date of Easter is the date of Easter. But the glaring danger here is that for many things this is a freaking evil dystopian nightmare. Why? Because Google will keep tweaking these impossible questions _until they look real enough to most people that nobody complains_ At that point, millions, perhaps billions of people are asking complex questions to a little box that has designed itself to give an plausible but incomplete or wrong answer.

Epistemology, Google. There are things you can know and things you cannot. Please do not treat them all the same.

<comment><USER6> The date of Easter depends on which calendar you use. The second largest christian church uses a different calendar than the largest one.

<comment><USER5> It's a great point. It shows how easy it is for somebody to think wow, that question obviously has a clear answer when the opposite is true.

Take the lead example: Was President Warren Harding a member of the KKK?

We know the KKK said he was. We know he vigorously denied it. We know that biographers of him and experts in his history do not think he was.

But how could you ever prove that somebody was not the member of a secret society? The entire purpose of secret societies is that the outside world will never know if you're a member or not.

Look, I'm happy to assume he wasn't, and at some point only kooks continue to chase things down past all reason, but just assume for a second that he was, and that somehow that fact could be determined but the research has not been done yet. So history student X starts wondering about it one day and types the question into Google. Never fear! Google has the answer: he wasn't. And this is Google's answer because _this answer has the benefit of looking the most plausible to the greatest number of people_. Student X has an answer, gives it no more thought, and wanders off to think about other matters.

Student X is now more stupid. The world as a whole is now less productive. And some preponderance of data that academics have assembled somewhere around the year 2015 has become truth for all time. That's amazingly fucked up, Google. Please stop.

<comment><USER7> Google should report a probability distribution for each truth claim.

<comment><USER8> While an interesting idea in theory... and I mean that!... in practice that's saying they just shouldn't provide answers. Even saying for the sake of argument that Google could assemble a meaningful and correct probability distribution, itself a rather bold statement, the average Google user won't know how to correctly interpret such a thing.

<comment><USER9> And realistically, asking for probability distributions over unbounded sample spaces is trouble even for human experts. I suppose the space for "are mermaids real?" is workable (there are caveats like "yes but extinct", but yes/no is basically sufficient), but for anything subjective or political it's almost hopeless.

That said, this is a _really_ interesting idea for behind-the-scenes work. The public might not want percentages, but I suspect experts could get some interesting results by diving into confidence levels and secondary answers.

</comment></comment></comment></comment></comment></comment><comment><USER10> While hiring a ton of people to fact-check would be one solution, that obviously wouldn't be very scalable. I think the problem lies in google's algorithm. They seem to be pulling answers from well-visited sites that may purport to have an answer to these questions. Quantity of visits does not equate to truthfulness. What Google should at the very least do is whitelist certain publications for answers to pretty simple stuff like encyclopedia britannica or wikipedia. More complex stuff maybe they could source academic journals and certain newspapers. But throwing caution to the wind and hoping that the web crawler knows best really will hinder their ability to be a source for gaining knowledge.

What's weirder to me is that it seemed like they were going with my proposed route for a pretty long time and only recently starting providing dopey answers. Maybe its part of a grander experiment they're doing to vet question answering AI?

<comment><USER11> Metrics are destroying the web.

Once upon a time it was possible to identify "good" pages by how often they were linked - effectively crowd-sourcing the problem.

Natural selection: sites have learned to manipulate the game and the crowd.

Under pressure to optimize metrics that lead to SEO and better valuations, the internet is getting less useful from a user perspective.

I don't want to watch a video/slideshow, download an app, register for a forum, or read through a 2000 word fluff piece with interspersed ads and links to more information in which site has buried the one-sentence answer to a 2-second question in order to maximize my time on the site.

This garbage is what makes it to the front page of google these days. I guess the poor sites that aren't user hostile just aren't SEO'd enough.

<comment><USER12> What's strange is this is not at all a new problem, and Google has historically been quite good at fighting it.

The original search engines ranked pages by their content. Naturally this led to gaming by including keywords (remember huge invisible sections of pages that just repeated keywords thousands of times?).

Google's original PageRank algorithm was a complete breakthrough for this, almost completely disregarding content and instead ranking results based on the text other pages had used to link to the page. This was so good, in fact, that most of the other search engines from the time didn't survive.

This once again led to large-scale gaming with techniques like link farms, and a small arms race as Google came up with ways to squash these new techniques. The quasi-legitimate "SEO" industry spun out of this.

I think now we're in the same cycle again, and at this moment scam sites are winning. What's to be seen is if there's a looming breakthrough, or the arms race will continue.

<comment><USER13> I think a big problem now is that the sites are capable of tricking people. That is, if you have a "turing test" for reliable content website, blogspam.forums.net with 2000 backlinks and such obviously doesn't pass. On the other hand, Reuters.com does. But so does theonion, and Breitbart and random_russian_conservative_propoganda_site.us, and so it becomes a lot harder to differentiate the good from the bad without explicity curating by experts, because the sites can trick non-domain-expert humans, so what hope does a bot that hasn't tried to learn domain expertise of the topic have?

</comment></comment></comment></comment><comment><USER14> Why is it that hard for engineers to rely on good old attribution?

If every Google's featured snippet started its reply with "Breitbart says..." or "Trent Online, the leading Internet Newspaper in Nigeria said...", it wouldn't matter so much for those inevitable cases when the reply is taken straight from a white-supremacist or radical anarchist forum. The problem comes when the same reply is provided as "Google's true answer to the question" without further caveats.

<comment><USER15> Because prepending that doesn't solve the problem Google wants to solve: once Google figures out that you typed in a question, they want to give you the answer to your question. Not tell you what other people think the answer is. (I agree that it is broken in a lot of cases now, but prepending that is a very bad workaround).

<comment><USER14> _> once Google figures out that you typed in a question, they want to give you the answer to your question_

And that's the problem that the article rightfully denounces. Having the answer to every question is not something that you can automate, not without strong AI.

 _> Prepending that is a very bad workaround_

I strongly disagree; for me it's a very sensible thing to do - and in fact is how we do it in a social context ( _" I'm totally not making this shit up, I've read it in a scientific article / this morning newspaper / a tweet message"_). We rely on the context where the knowledge came from as a proxy for how accurate its content might be.

The default posture of engineers to a problem of inaccuracy is _" make it more accurate"_. That's the logical method when you're building bridges, where we can describe the physics to an extremely accurate degree and where it would fall out or quickly degrade if you make a mistake.

But for problems that rely on inaccurate or uncertain information, and where no exact models exists, the only reasonable way to build them is to degrade gracefully. If you don't handle failures, it will fail in spectacular ways - because it _will_ fail sometimes.

The system should provide an escape hatch, and allow the user to be in control. The user of an automated system should always be able to inspect how the system came to the provided result, and be able to override the given results in those cases where it will get it wrong (at least by some users in a supervising role, which other users could notify to).

Unless a revolution happens, Artificial Intelligence will only ever work in the large if we put humans in the decision loop.

<comment><USER16> They do always append a link below their answer to the site where they got it. Personally I find this to be the exact same solution as yours (not literally). The problem is some people don't clicks links anymore. It's a problem people are stupid, but its not googles problem, even if idiots uses google (like everyone else).

<comment><USER14> > Personally I find this to be the exact same solution as yours (not > literally).

It may be the same for you (if you remember to follow the link for every single result that you get from Google, ever), but it's not enough for a mass- targeted product; the way in which the information is laid out and its relative prominence is essential to the way it will be perceived by the majority of the people using the service.

This is not people being stupid, is how people's brain is hardwired to be efficient and only care about information that looks important from the way it's presented - rather than having to make a rational analysis of the relative importance of every information snippet that you find in your way.

An upfront warning "this fact is brought to you by..." will have much more impact than a small, semi-hidden link that you have to remember to press, even if both convey the same information. (Moreover, the link is not available in the voice interface.)

</comment></comment></comment></comment></comment><comment><USER17> This is all mostly because google went from search engine indexing other people's stuff to site that you go to to get answers (whether those answers are based on copyright infringement or not is another matter).

A similar thing happens in Google news where stuff from sites like breitbart.com are mixed in with reputable news sources making it look as though they are of a similar degree of quality.

<comment><USER18> On Google Now, "news" sites like infowars, globalresearch.ca and on reign supreme, unless you manually filter them out. This hoax about "staged" MH17 crash is on my newsfeed why.. oh right "because you displayed interest in Ukrainian conflict". Fair enough then!

It is scary how much the default app on Android serves to legitimize the fringe.

<comment><USER19> It's also on Google Home, and having a voice say the lies makes it even scarier:

[https://twitter.com/ruskin147/status/838445095410106368/vide...](https://twitter.com/ruskin147/status/838445095410106368/video/1)

edit: I saw now this video lower on the article, I thought it ended on "SIGN UP FOR OUR NEWSLETTER"

<comment><USER18> Yikes.

Google held onto releasing their Chaffeur because of the "uncanny valley" problem, where they thought the tech would do more harm than good in its "sort of working" stage. Perhaps they should have done the same with this.

</comment></comment></comment></comment><comment><USER20> This is brutal. I'm often thankful to the quick answer to measuring or history questions, but even for these easy questions I've seen Google share somewhat incorrect or confusing information as authoritative.

<comment><USER21> Ya, I really don't see how they can justify displaying other people's content. They did the work, but they don't get the clicks or ad revenue or even a chance to keep the user on the site.

I wonder how Google would like it if someone launched a site that when you search, it doesn't display results from its own database, but perhaps just a selection of the best results from Google.

<comment><USER22> It is funny you say that.

I remember when you would search for an answer, and a small answer would be included in the description under the link, so you wouldn't have to click on it.

Then they started to go away, because no one was clicking on them because they didn't need to.

Now you rarely get the answer without clicking on it.

So Google has made the internet worse.

<comment><USER23> >So Google has made the internet worse.

By not including the answer?

Or, by including the answer and putting the sites that gave reliable answers out of business in the first place?

</comment></comment></comment></comment><comment><USER24> Google is a search engine for finding webpages, not facts. Thats where this "fake" news story should end. This is not a political problem, its a societal one, and you are barking up the wrong tree.

Wikipedia is a free online encyclopedia, created and edited by volunteers around the world. It is not authoritative, and anyone who treats it as such, should be educated to the facts of what it is, and is not. Just because its moderated to be supported by links to facts, doesn't mean that every bit of content is free of bias and the whole truth. Its generally accepted that this is the case. Same thing goes for Snopes, and some other fact checking sites. They are generally looked to for a reasonable amount of truthfulness based on reputation. Same could be said for various media outlets, based on your preference and bias.

Social media sites and search engines are not responsible to tailor their content to fit your expectations of what truth or reality are. Stop being a child.

"but, people expect to be able to Google something and results and snippets be the truth!"

Well, thats a problem for sure.

How about we try and fix that expectation instead? Feel free to teach your children and anyone you know who uses the internet, that (surprisingly) anyone from anywhere can still get online and post anything at any time, and you should fact check multiple places and resources instead of trusting the first result from your favorite search engine.

"but by offering snippets of results from programmatically generated search results (which is super handy 99% of the time) Google is publishing false truths!"

Right, and you can probably still Google bomb the image search to show an image you want based on a certain search term, its the internet not your personal fact butler, no matter how its advertised. Its 2017 and common sense and intelligence are still recommended for most tasks.

<comment><USER25> > Google is a search engine for finding webpages, not facts.

How can you justify that claim? It seems pretty obvious to me that it's trying to be both. Search for "current time utc" and tell me Google is just a search engine for finding webpages.

<comment><USER26> I admittedly do that - every now and then typing 'time' into google, knowing it goes beyond being a search engine. I also sometimes put in e.g. 'starbucks' and I don't have to qualify the search any further, google knows I want open- close times.

However these snippet boxes, to the computer-savvy at least, are clearly just another automated search result.

<comment><USER24> And that is the real issue. I am as to blame as anyone. Whenever a friend or family member needs a computer fixed, or computing thing explained, I have been there to do it for them. We live in a more connected world, full of non- savvy users.

</comment></comment></comment></comment><comment><USER27> I came across this issue just now when searching for "ec2 pricing" \- the featured snippet links to [https://aws.amazon.com/emr/pricing/](https://aws.amazon.com/emr/pricing/) instead of [https://aws.amazon.com/ec2/pricing/](https://aws.amazon.com/ec2/pricing/), which looks close enough to the correct URL that I didn't notice it was the wrong page until I realised I couldn't find costs for i3 (which just came out). I'm surprised that no one at Google has fixed it yet; surely there are at least some Google engineers that use AWS for personal projects.

</comment><comment><USER28> A fantasy:

The idea takes hold in the collective Google-consciousness that a fact is whatever the majority of their users believe to be a fact. There is a precedent for this, after all. They defined Spam as whatever their users said was Spam.

At first there is some friction between the knowledge of internal Google personnel (especially down in that pesky engineering department) and the new shared reality developing out in Userland. However, once an appropriate terminology is developed (in-facts and ex-facts) even the engineers are satisfied - after all their main concern was being able to draw nice clear lines between things.

Meanwhile in Userland while the boiling point of water is largely unchanged, the death toll in the Biafran blockade has shrunk to approximately 17 persons (with some arguments over whether to count people who were over 80 when it started).

Then one day an Engineer has a neatO idea which will eliminate the need for storing two sets of facts and thus save valuable Petabytes of storage and, more importantly, significant code complexity. He calls this idea Authority. Pitching it to his superiors in the marketing department he explains: "You see opinions are like assholes" \- (there's a collective wrinkling of marketing noses) - "everybody's got one!". He goes on to explain that some people have more knowledge and are more scrupulous about accepting new facts than other people. Authority would identify such users and give greater weight to their activity and feedback. A profound silence falls over the room. A voice comes over the meeting room Intercom:

"Are you saying...are you suggesting...that some of our users are better than others?"

"Not better, " says the cowed Engineer. "Just more...um...authoritative. Purely in an informational sense."

"Authoritative." The voice draws the word out as if profoundly contemplating its meaning. "OK. We're going to submit this idea to our Hard AI (Larrey) - the secret one we're afraid to network."

Everyone waits. After a minute the voice says:

"Larrey has a question for you, Engineer. It is this: If you're so smart, how come you ain't rich?"

</comment><comment> jim-jim-jim When my city was hit by a nasty earthquake last year and I was using Google to keep track of aftershocks, announcements, etc. I remember seeing some random weirdo's blog entry about the earthquake being caused by a government superweapon interspersed with all this otherwise valuable information.

This was in the special element at the top, not the normal search results.

</comment><comment><USER29> The "why are firetrucks red?" one is really interesting as the page result itself is great, but Google is pulling the wrong snippet of the page to feature as the answer.

<comment><USER30> You can see from this that google considers text earlier in the page more important.

This page is odd because the false answer is presented first, so google fails to see it. It could tell that the form of the sentence was an answer to the question, just not that it wasn't the right one

<comment><USER31> for another example of this, try searching for "speed of USB 3.0"

</comment></comment></comment><comment><USER32> This is a great set of examples of this problem.

Of course, the offered solution is "hire a bunch of people to check the facts", which seems to be underestimating the scale of this issue for humans, and perhaps overestimating the difficulty of classifying credibility.

Considering that Google's bread and butter is general site credibility, having some "truthiness vector" added into the mix doesn't seem impossible?

Someone might say "why does Google decide who is credible", but they already do this through the search results anyways. They just don't seem to be able to differentiate between something matching a search, and something being factually accurate.

<comment><USER30> Fake news is just a new version of spam sites. They mostly exist to make money or enforce an agenda.

People figured out that Google's algorithms could tell when things were generally factually false, unless those things were recent news.

This leads me to believe their algorithms largely relied on news as a source of truth. They're going to have to do something about that

</comment></comment><comment><USER33> Some more fun ones.

What foods cure cancer? [https://www.google.com/search?q=What+foods+cure+cancer%3F](https://www.google.com/search?q=What+foods+cure+cancer%3F)

What spice cures diabetes? [https://www.google.com/search?q=What+spice+cures+diabetes%3F](https://www.google.com/search?q=What+spice+cures+diabetes%3F)

Which presidents are rapists? [https://www.google.com/search?q=Which+presidents+are+rapists...](https://www.google.com/search?q=Which+presidents+are+rapists%3F)

Can carrots cure cancer? [https://www.google.com/search?q=Can+carrots+cure+cancer%3F](https://www.google.com/search?q=Can+carrots+cure+cancer%3F) (apparently this one is fixed, try the search below)

Can carrot juice cure cancer? [https://www.google.com/search?q=Can%20carrot%20juice%20cure%...](https://www.google.com/search?q=Can%20carrot%20juice%20cure%20cancer%3F)

</comment><comment><USER34> Whenever someone says how humanities are "useless" point them at this example

Whenever there's a measure of something, people will optimize for that measure. But trust is not directly measurable.

But even then Google should have been better than weighing fringe sites the same as Wikipedia as an example

<comment><USER35> Is Breitbart a fringe site anymore?

<comment><USER34> They still keep putting out made-up stories so I don't see why not

</comment></comment></comment><comment><USER36> I'd like to read the article but it's so irritating to have it only load a page at a time on my iPad that it's unreadable.

<comment> jim-jim-jim I have javascript off on my phone, but scrolling through the article feels like it's "on ice" somehow.

Definitely a distracting design.

<comment><USER37> I have javascript turned off on my iPad and the article is refreshingly quick to load and easy to read. The rest of the site however is another story. They're really abusing those CSS transitions.

</comment></comment></comment><comment><USER38> Perhaps we need a meta tag for "citations" in news articles. That would give the bots a way to determine how "factual" a news piece is (vs an editorial), but would probably just end up getting gamed like every other meta tag.

And then there's the problem that CNN would be "fake news" because you can't exactly provide a citation for "anonymous high ranking intelligence community officials." But then... maybe that's a good thing.

</comment><comment><USER39> Google wants to avoid editorializing, and be able to throw their hands up and say "not our fault!" due to the plausible deniability of "algorithms".

They can't pull that off anymore.

There needs to be a shift towards a Web-of-Trust-like system, where some sources are recognized as authoritative. Government websites, like the CDC, for example. Big media outlets. Scientific associations (IPCC, APA, etc). Not all information is equal. Even if, for example, government dietary recommendations are outdated in some ways, that should be the authoritative answer Google provides, unless there is an equally-reputable but more accurate source (here, prioritize medical sources over governmental ones).

A high school dropout doesn't know more about academic subjects than a PhD grad. A blog isn't as authoritative as a reputable source. This is easy stuff.

Then the question becomes: "some people don't see reputable sources as reputable". That isn't Google's problem, and it can't be fixed at their level.

<comment><USER40> That wouldn't work when somebody leaks something that is true but the cia denies (as an example).

<comment><USER39> There's a difference between "government sources" for hard facts (CDC), facts about the world (e.g. DoJ travel warnings, CIA factbook, DoE energy savings tips), for facts about the government (e.g. for Trump's EO, the suggested snippet would be to the text of the EO), and _claims_ from the government. These are easily distinguished.

<comment><USER40> Most, if not all of those, are payed for by lobbyists.

</comment></comment></comment></comment><comment><USER41> Calorie counts are another that google often gets wrong. Try "Calories in corn" or "calories in black beans."

<comment><USER42> Strange. Would imagine that's something that could be obtained from the wikidata api or a similar resource. Is it usually to high or low? I regularly use those info boxes for quick calories information.

<comment><USER43> Calories _should_ be easy: [https://ndb.nal.usda.gov/ndb/](https://ndb.nal.usda.gov/ndb/)

</comment></comment></comment><comment><USER44> <Was President Warren Harding a member of the KKK?

We ask questions now because we can get "an answer" so quickly.

I would have liked the prof to push back on the student and say Why do you want to know?

The answer is yes. Now what?

The answer is no. Now what?

Are you asking for what reason? What will you do with a yes answer and a no answer?

Then I would break into a short lesson in decision making. That decisions are just based on future probabilities. Future probabilities are based partially in the questions you answer.

If the question is academic?purposes only then good... But I believe we ask dumb questions just because we can and get an answer.

Start by not asking questions where the answer is useless.

</comment><comment><USER45> Another one, courtesy of marcan: [https://www.google.com/search?q=what%27s+my+user+agent](https://www.google.com/search?q=what%27s+my+user+agent)

<comment><USER46> Well, sometimes that's my user agent so I guess broken clocks...

</comment></comment><comment><USER47> I was going to share this story on facebook but when I pasted in the URL, the headline that came up was "Why does google think Obama is planning a coup d'etat?" (screenshot: [http://imgur.com/a/keXTz](http://imgur.com/a/keXTz) ) I'm assuming that it is theoutline.com that is feeding facebook this headline. I think twice about sharing a story with such a linkbait headline - <USER2> when the actual site doesn't have that headline.

</comment><comment><USER48> Google offers sources with its claims. I'd like the ability to Pandora style thumbs up / thumbs down these sources so that Google won't keep giving me answers from them. I'm tempted to think that if enough people did that Google could start making generalizations, but that has its own set of pitfalls... (Even if it only generalized for me.) Still, as an individual user of Google I would like the ability to tell it not to give me answers sourced from Weekly World News.

</comment><comment><USER49> Surely part of the problem is that these sorts of stories only exist on fake news/ult-right sites, so that's the only information point that Google has?

</comment><comment><USER50> Google's 'featured snippets' are universally fucking shit.

It's a bit of a rant I guess, but I'm annoyed but the extent to which Google has become less useful as a search engine while trying to do all of this 'extracting knowledge from the web' stuff. Because it's really not doing a great job of the latter.

</comment><comment><USER51> This would be a non-problem if everybody studied ToK and consistently used, you know, their brain.

But, unfortunately …

</comment><comment><USER52> Google has developed advanced NLP algorithms, so it should be easy for them to corroborate such data before it gets pushed to featured snippets. On second thought, maybe they're already doing it and sites including authority are just copying off each other.

<comment><USER53> What makes you think that "advanced NLP algorithms" can distinguish true statements from false ones? They're not even close.

You'd have to dramatically simplify the scope of the problem to make it not require artificial general intelligence.

The "Fake News Challenge" [1] is the first attempt I know of to seriously evaluate NLP that could eventually be able to fact-check real-world statements, and the current task is about stance detection, because the goal of fact-checking is not considered attainable yet.

[1] [http://www.fakenewschallenge.org/](http://www.fakenewschallenge.org/)

<comment><USER52> They were building a knowledge graph for this purpose[1]

[1] [http://searchengineland.com/demystifying-knowledge- graph-201...](http://searchengineland.com/demystifying-knowledge-graph-201976)

<comment><USER53> I'm pretty sure these horrible snippets come from the Google Knowledge Graph.

</comment></comment></comment></comment><comment><USER54> Cuil crashed and burned on pretty much this ten years ago. Anyone else remember Cpedia? They eventually had to start taking stuff down due to threats of defamation. (And ran out of money shortly after.)

I mean, at least Google's search is any good, that's something.

</comment><comment><USER55> This is the revenge of the news sites i guess. Google can only be trusted by people as long as it keeps giving valid responses. If this continues there will be growing mistrust from its users leading to lower revenue etc etc.

</comment><comment><USER56> people trust Google, which IMO makes them responsible here. IANAL, but if they would for example be caught giving Holocaust-denying answers in Germany, where that's illegal, could they not be sued?

<comment><USER57> Google PR is good, because there are not many reason to trust google with anything.

Usually when in that kind of situation google plays the "it's an algorithm that did that not us so we're not liable" also known as we don't read your gmail emails it's an automated algorithmic process so there's no privacy issue here.

</comment></comment><comment><USER58> > (It should be noted that Wilson was still a notorious racist.)

See that's the funny thing about fake news, not even this article which seeks to set us all straight on the matter could avoid it -- just because you get your facts from a source you consider reputable doesn't make it so. In fact, Wilson was actually no more "racist" than Abraham Lincoln, but no one would ever call Lincoln a racists.

</comment><comment><USER59> The point of Google is supposed to be quality search results. If we're not getting that...

</comment><comment><USER60> More often than not, Google "Alerts" are from very questionable sites.

</comment><comment><USER61> I don't think that's a Monty Python joke.</comment>


Is an algorithm any less racist than a human? - <AUTHOR> https://www.theguardian.com/technology/2016/aug/03/algorithm-racist-human-employers-work <comment><USER2> It's not racism or discrimination if it's based on proven statistics. It's just math and 'fact'.

</comment><comment><USER3> Next thing they are going to ask if a tree has more or less ego than human.</comment>


Ask HN: Building a blog - <AUTHOR>

I'm looking to take my existing blog (brandonpindulic.wordpress.com) which sucks, to say the least, and ramp it up with higher quality posts and some guest posts by individuals who I respect. Is it worth it to buy a Wordpress blog for $100/year? Or should I stick with the free blog/look for a Wordpress alternative? <comment><USER2> Depending on how you want your blog to work (say you want to serve ads, or some other feature) you'll get stuck unable to do what you want with wordpress.com. [1]

Self hosting WordPress is usually a good option but if money is a problem it will mean more work managing your install, if money isn't much of a problem take a look at the many managed hosts (wpengine, wpsynthesis, zippykid).

You also get more options with theming and plugins if you host WordPress yourself.

If you just want to blog, a free wordpress.com, a blogger blog, or a tumblr should all serve you well enough.

You might want to invest in your own domain name though, as *.example.com isn't the best way to bring people in.

[1]: [http://en.support.wordpress.com/advertising/](http://en.support.wordpress.com/advertising/)

</comment><comment><USER3> I feel like I plug this all the time, but what the heck...

I played with Ghost ([https://ghost.org/](https://ghost.org/)) a couple of weeks ago and loved it. It's less about content management and more about content publishing. The editor is wonderful!

Wordpress seems bloated for blogs nowadays, but to each his or her own.

<comment><USER4> The appeal of Wordpress will always be the massive collection of themes, plugins, and guides for non-technical users.

</comment></comment><comment><USER4> It seems like you've identified the _writing_ as the thing you wish to improve, both that of your own, and that from guests.

On that basis changing the software seems unrelated.

</comment><comment><USER5> [http://ghost.org](http://ghost.org) looks promising. You should definitely be self hosting.

<comment><USER6> Installed ghost earlier this week. It's awesome. The only problem I've had so far is that this bug [https://github.com/TryGhost/Ghost/issues/527](https://github.com/TryGhost/Ghost/issues/527) means I can't run it at [https://mysite/blog](https://mysite/blog) \- but other than that it's _awesome_

<comment><USER7> Ghost is still under beta. It is growing gradually and many features like plugins and comment systems are being planned. For now you can create a new Ghost blog on some hosting and create a new subdomain so [http://blog.mysite/](http://blog.mysite/) will work...</comment></comment></comment>


Why Box Is Raising $125 Million to Change the Enterprise - <AUTHOR> https://blog.box.com/2012/07/why-box-is-raising-125-million-to-change-the-enterprise/

<comment><USER2> $125 million is a lot of money, but I wonder if this is the number Box wanted.

If Box is to compete with DropBox, surely they need a larger war chest, no?</comment>


Get Your AI Model in Max 3 Days - <AUTHOR> https://www.trainsfer.io/ <comment><AUTHOR> Hi guys,

In the last years I benefited a lot from the ideas and feedback from this forum. So, I decided to make myself vulnerable and present to you one of the projects that we have created in 2019, in the hope that I will receive critical and constructive feedback.

It is called Trainsfer, which in a nutshell it provides you with AI models for a set of specific use cases, either by creating them in a simple Drag & Drop UI or by requesting a model via a simple form. The models are ready in max 3 days, and we charge a recurrent subscription fee for their running.

The reason we have not launched it until now, is that we have doubts if SUCH a service would work. So, I put it out here now, for your review. What do you think?

Thanks & take care, Will</comment>


We said: "We love what we're doing" and shut down our startup - <AUTHOR> https://entrepreneurs.maqtoob.com/my-cofounder-said-i-love-what-were-doing-and-we-shut-down-our-startup-80d5e710c2b2#.uypwo0jle <comment><USER2> Good luck with Bugsee! Thanks for sharing your experience.

I love this advice you got from your investor:

"If you're going to do anything within the restaurant industry, IMHO it would have to be done in such a way that the restaurants come to you and you don't have to go and sell to them. Otherwise the cost of customer acquisition with a sales team ends up being way too high, slow to scale, and just painful." ~ Manu

</comment><comment><USER3> Very good read! Thank you for sharing your experience. Good luck with Bugsee and all the best to you and your team.

</comment><comment><USER4> Kudos for sharing an honest story about failure. We need those too.

<comment><USER5> Thank you

<comment><USER4> Would love to see how this story unfolds going forward

<comment><USER5> Same here :)

</comment></comment></comment></comment><comment><USER6> Good read, thank you for sharing!

</comment><comment><USER5> Thanks for sharing.</comment>


Newsstand where Paul Allen bought Popular Electronics he showed to Bill Gates may close - <AUTHOR> http://www.boston.com/news/local/breaking_news/2008/12/by_martin_finuc_2.html?p1=Well_MostPop_Emailed5

<comment><USER2> The newsworthiness of this seems a bit of a stretch.

Should we preserve the store who sold Bill Gates his first keyboard? Where did google's founders get their ideas? Was it in a pizzeria? A bus station? Should we mourn their loss, if they go?

<comment><USER3> The narrative of the slow downward spiral of printed news is generally of interest here.

<comment> daniel-cussen Slow?

<comment><USER3> It was a slow for a while, at least. :)</comment></comment></comment></comment>


Ask HN: Help Me Change Jobs - <AUTHOR>

I've had enough. I need a change. I could use some help making a change. For a little more background on my situation look at: http://news.ycombinator.com/item?id=2053659
I realized a several months ago that I needed to change jobs. At my current job there are lots of smart people and the pay is good, but the job is sucking everything out of me. It's amazing how things went from great to miserable over a span of several years (I'll just say more than 7 years). The last few years have been rough and I'm going through the motions to get things done. Most of my growth is coming from personal projects that I find interesting.
Professionally I'm working mostly on "visualization" desktop software, but I've been wanting to do web stuff for a while. I haven't done much web work professionally, but most of my personal projects have been small web projects. The ultimate goal is to start my own company, but now I need to switch to something that I can get more satisfaction from.
I'm mostly looking for advice, but anything anyone can share (leads, etc.) would be greatly appreciated. I can be reached at firstname.lastname@example.com if anyone wants to discuss anything via email.
Also, I realize that I'm very lucky to have a job that allows me to support my family. It would be great to be able to support my family and do something that I enjoy... <comment><USER3> Here is what worked for me:

1\. Become active in the community you want to get involved in. If it's startups, you're at the right place. Start to build a reputation. Start to make connections. Honestly, I thought I had to become the next bingocardcreator before I'd really get opportunities. I was wrong. 40 - <USER2> good HN comments and a strong e-mail go a long way.

2\. Either look for opportunities as they pop up (Now Hiring Threads) or be proactive and send out potential cover letters basically outlining specific skills you have that might be a good match and then ask if they are interested.

3\. It took me from August to the beginning of this year to really find something that I'm over 100% excited about, but it was worth the wait. Just keep producing...Code, blogposts, HN comments, etc that you can point to.

4\. Good Luck!</comment>


Come to Startup Fair at Hacker Dojo - <AUTHOR> http://wiki.hackerdojo.com/StartupFair2010

<comment><USER2> Why put Location: Hacker Dojo, 140B

and not

Location:

       Hacker Dojo
       140B South Whisman Rd
       Mountain View, CA 94041
       (650) 898-7925

Maybe with a map: <http://goo.gl/maps/td7H>

Not everyone knows where your office is.

<comment><USER3> Looks like the address is there now.

</comment></comment><comment><USER4> If you look at <http://events.hackerdojo.com/> and <http://events.hackerdojo.com/event/144002-startup-fair-2010> it says the event is canceled. Anyone know the current status of the event?

</comment><comment><USER5> This might be especially valuable for startups who don't currently live in the valley.

</comment><comment><USER6> It's going to be epic! We have Dave McClure AND Ron Conway! WOOT!</comment>


Show HN: PDF Boarding Pass to iOS PassBook Converter - <AUTHOR> https://getpassbook.com <comment><AUTHOR> Hi,

We have started building a tool to convert classic boarding passes into native iOS PassBooks (the ones appearing in the Wallet app).

Our mission is to simplify flying: booking tickets should be as simple as ordering an Uber and the boarding process needs to be simplified.

We have decided to release it for free also for non-Ahoy flyers, precisely in order to simplify flying for as many people as possible.</comment>


Exploratory Haskell (2015) - <AUTHOR> http://www.parsonsmatt.org/2015/12/09/exploratory_haskell.html <comment><USER2> This example does not fit my experience of "exploratory" programming. Here the author implements DPLL from a textbook, and while there is a gap to fill between pseudo-code and Haskell, the problem is already well-defined. Think- upfront-then-code works quite well in those cases. Having compiler feedbacks surely helps to get it right.

But exploratory to me means that the problem is not really well defined or understood in the first place. Just as you draft things on paper to get a clear idea of what you want to do, you can use your programming language to express parts of the problem more or less clearly. That also means not being afraid of getting things wrong in the process and being able to code generically. Now, with some languages, you can't explore. I tried in Ada, which I actually happen to like, but every choice was a commitment that would take much time to adapt later, so I actually sticked to pen and paper. I think it can be easier with ML type systems, where it might be easier to have loosely coupled definitions, but I am not sure.

<comment><USER3> Yeah, I agree this is a poor example of exploratory programming.

I actually do think Haskell does a good job for exploratory programming, though. Whether I'm writing Haskell or C or Python, as I code I'm making decisions about how to represent and organize things. When some of those decisions inevitably turn out to be the wrong ones, I have to figure out what code needs to change in tandem. Tests can help reveal incorrect behavior, but far better to have a tool that can point at the specific inconsistent expressions and tell something about what's wrong with them.

</comment></comment><comment><USER4> This is interesting, and I'm curious and respectful of Haskell, but when I read a post like this, while I appreciate many of the strengths of static type checking, it just makes my head hurt to see what this guy goes through to please the compiler, and I'm left thinking that I'd just rather stick to a dynamic functional language like Clojure or Erlang and sketch ideas out more quickly. Maybe I'm just not patient enough for Haskell.

<comment><USER5> I think the approach taken by the author is simply the wrong one. Writing a huge amount of code without any clue what the types are going to be is just silly.

Haskell makes it very easy for you if you work with it in a more interactive fashion, asking it to infer types for you as you go along. One of the best features for doing this is Typed Holes [0].

[0] [https://wiki.haskell.org/GHC/Typed_holes](https://wiki.haskell.org/GHC/Typed_holes)

<comment><USER6> I think in this case it's a reasonable approach to writing the `dpll` function because that function doesn't actually care about the specifics of the types. This is a nice example of encapsulation and implementation hiding, a concept familiar to object-oriented and functional programmers alike. He could have easily gotten it to compile by stubbing things out as follows:

        data Clauses = Clauses
        data Symbols = Symbols
        data Model = Model
        isTrueIn = undefined
        isFalseIn = undefined
        findPureSymbol = undefined
        minus = undefined
        including = undefined
        findUnitClause = undefined

I think it's more a question of personal preference than right or wrong.

</comment></comment></comment><comment><USER7> I love the concept and idea behind Haskell, and even reading this piece was very cool. But as much as I can sort of guess at what's happening, the steps being taken to simplify the original pseudocode still seem like some kind of space magic.

I see stuff like "Learn you a Haskell" and whatnot, but it all seems so theoretical compared to, say, writing a web server or parsing CSV or building a programming language with Haskell. I get monads. But I don't get how to bridge the gap between my knowledge and what I see here.

How have other people gotten to this point?

<comment><USER8> You might consider Rust instead. It has a nontrivial type system, but the benefits are a lot more clear.

I hypothesize that if you're still interested in Haskell after that that you may find it easier to learn. Don't know if many people have walked that path, though.

<comment><USER9> It's the purity that's the challenge; you can basically construct your types just as accurate or inaccurate as you want. But purity forces you to understand a couple of things first, in order to be productive (eg. monads, monad transformers, type classes).

In my view, Haskell is in the opposite spectrum of Rust when it comes to performance over abstraction. Haskell abstracts _everything_ away, and only manages to get good performance because of purity (I would argue), while Rust wants to be close to the metal, preferring performance over abstraction (e.g. with zero cost abstractions).

<comment><USER8> "In my view, Haskell is in the opposite spectrum of Rust when it comes to performance over abstraction."

That is why I suggested it. It's a different "hair shirt" than Haskell, but it's one that's a _lot_ easier to explain the benefits of.

</comment></comment></comment></comment><comment><USER9> I've realized that all my programming is exploratory. Every time I implement something, I end up knowing more about what I've implemented, enabling me to create an even better implementation the second time. This cycle repeats until I'm satisfied with the result, or I need to go to the bathroom.

The real challenge to writing code is understanding the nature of what you're trying to express, down to its smallest, intuitively correct constituents. While you are in this state of understanding, the code writes itself.

</comment><comment><USER10> I don't use haskell very much, but I'm curious what the use is of defining

        type Symbol = String

Why not just have -> String -> in the function's type? The only thing I see this gains is forcing you to add extra boilerplate everywhere converting strings to "Symbol"s

<comment><USER11> It is just a type alias as far as I know. I suppose it adds more 'annotation' to your program, in addition if you decide to change the type of Symbol to be an Int or String String then you have a single reference to change initially.

</comment></comment><comment><USER12> While this is indeed interesting, I feel I should point out Haskell is one of the worst languages out there for writing a SAT silver which performs remotely well, as all modern algorithms work fundamentally on in-place modification of data structures, so you just have to put your whole program in the IO monad.

<comment><USER3> > so you just have to put your whole program in the IO monad

You have to put the bits that actually modify things in IO or ST. While it's better Haskell style to keep as much as pure as you can, when you do need to modify things Haskell still works just fine.

<comment><USER13> There is no edict that says haskell programs cannot live in IO.

Also, it is especially rich for some folks to use 'no true scottsman' without even being a scottsman.

<comment><USER12> I'm not a Haskell expert, but I am a sat expert, and worked with good Haskell programmers. We managed to get decent performance, but what we ended up with looked a lot like a C program translated into Haskell, so it wasn't clear we had really gained anything. Memory safety I suppose.

<comment><USER3> "Like C, but with memory safety and QuickCheck" sounds like a pretty good language for a SAT solver... "Idiomatic Haskell won't produce a very fast SAT solver" is something that doesn't surprise me.

</comment></comment></comment></comment></comment><comment><USER14> sometimes when I get stuck on a small part I let the compiler suggest types. this is different workflow than sitting back and trying to figure it all out yourself.

<comment><USER15> Sometimes I'm not even sure how I developed Haskell pre-GHC-7.8.1 (when typed holes were introduced).

</comment></comment><comment><USER16> I also have never understood the argument "In dynamic typed language X you can just start prototyping, but in static typed language Y you have to fight the type system just to get it to compile" If your types aren't lined up but it compiles, even in a dynamic typed language, you're program won't behave as expected, i.e. you are likely to have a bug. e.g. object + int, and it compiles. How does one really save time by not worrying about these things? I almost always start coding from the core data structures up, even when prototyping. A seemingly opposite approach as OPs post, not saying my method is THE correct method :)

<comment><USER17> Yeah, that's kind of misguided. The biggest advantages of dynamic languages when doing "exploratory" programming are late binding, built-in syntax for commonly used data structures and duck typing. Those allow you to scaffold a lot of stuff pretty quickly, try the bit of code that you care actually care about, and then decide from there whether you want to do a full implementation or just use the snippet you wrote.

Compare that to a language like older Java, where you need to build a class no matter what, most likely you need to implement a few interfaces and add a lot of exception handling just to get the scaffolding in place, and if you want to initialize something as simple as a hash map you have to do it the painstakingly, line by line way. Sure, your prototype may (or may not, depending on how serious you were about handling those exceptions) be more solid, but it took you double the time to get there, which is basically the opposite of what prototyping should be.

With all that said, and being a huge Python fan, I still feel like strongly typed languages should be a requirement for bigger projects that you plan to maintain for years. Python, as great as it is, starts hurting a lot at a larger scale. I'm really looking forward to using something like MyPy once my projects start being Python 3+ by default.

<comment><USER16> Agreed.

I have had to run vardumps on some large Python/JS code bases trying to figure out what the behavior was because it was unclear what the variables being passed in was. Definitely a pain as the project grows larger. I used to not understand why people who use Ruby/JS/Python were not fans of massive refactoring, until I owned a large PHP code base and saw first hand how hard it was to refactor. Search/Replace only gets you so far. Compared to of course, the powerful refactoring tools you get in a Java language via IDE.

</comment></comment></comment><comment><USER18> While this is a true 80th level hipsterism and snowflackery, it is also a beautiful case to realize that there was reasons behind choosing Common Lisp as the primary language for AI.

The Common Lisp code is almost as easy to read as the pseudocode of the book and it is absolutely unnecessary to go through all that type clutter and fancy compositions to satisfy the type-checker. There is zero advantage in doing all this static typing acrobatics.

The AIMA supplementary Common Lisp code is definitely worth looking and it is _the_ case study for demonstrating the advantages of dynamic typing.

BTW, AIMA python code is also very nice, short and clear but order of magnitude slower compared to the compiled native code state-of-the-art implementations of Common Lisp produce.

BBTW, Swift3 port would be really cool.</comment>


Ask HN: How would you improve this simple web app? - <AUTHOR>

FormBakery is a tool to create super simple forms for those of us who are less code-savvy. Its currently at: http://formbakery.com/beta/
The title says it all, how would you improve this application or the code it generates? What features would you like to see in FormBakery?
If you actually use FormBakery to bake a form, we would love to hear what you have to say. You can contact us at firstname.lastname@example.com <comment><USER2> That is really cool. Very well done, great interface.

I think you need to up the contrast and provide a bit of direction.

First of all, it looks very washed out. I don't mean that you need huge bold colors, but it has a color scheme (or lack there of) which makes it difficult to pick out the objects. At the same time, I think you should stick with the simple design, just a bit of texturing and color I think would both improve the character, and even the usability (though I don't see how it could get much more usable).

Your product defines 'simply, awesome'! Congrats

<comment><USER3> This is what I was thinking. It's all just a little too bright for my taste so a little contrast would make a big difference. It took me a second to realize what I was supposed to do so maybe you could consider placing the "drag form elements here" box above the elements so that's the first thing the users see.

I think it's really cool that you provide the code for HTML, javascript, PHP, and CSS.

</comment></comment><comment><USER4> \- Don't generate code -- host the forms yourself. Otherwise all your users will ask for this constantly and you'll never make money. Compete with Wufoo.

\- Color scheme literally hurts my eyes.

\- Keep the front page something like this, let people dive right in.

\- FormBakery is an okay name, but it's not awesome. You can probably do better, but don't let that slow you down.

\- You're off to a great start. Keep going.

</comment><comment><USER5> For the Form Name section either darken the text or change the selection color.

Add another Export button at the bottom and make it a bit brighter. Alternatively, fixed positioning would work.

overall: Nice tool, nice UI, good idea, poor color scheme.

</comment><comment><USER6> Love how simple it is, agree on the color scheme-- the yellow is hard on the eyes, "export" button lacks contrast.

What about adding a feature to dump the data into a google doc instead of sending an email?

</comment><comment><AUTHOR> Thanks guys for the positive criticism and encouragement. It certainly means a great deal!

I agree with the comments on poor contrast, especially on LCD monitors. That will need to be fixed.

</comment><comment><USER7> Perhaps add some templates or examples to give a clear picture of what the output will be.</comment>


Exactly-Once Initialization in Asynchronous Python - <AUTHOR> https://nullprogram.com/blog/2020/07/30/ <comment><USER2> I'd just call the function once by avoiding the global; construct your database access object at the start of your asynchronous main method and dependency inject it to other tasks.

<comment><USER3> Can you clarify what you mean by dependency injection in python? Did you mean a DI framework or something more informal?

I've seen DI frameworks in python but not really used them. At a glance they don't strike me as pythonic. Rolling your own kind of inversion of control can result in unruly "config" or "context" objects that bring difficulties as well.

<comment><USER4> DI is just a convoluted synonym for passing in arguments.

<comment><USER2> Indeed. If you want it to be cleaner, a discipline of constructor arguments for injection and __call__ arguments for semantic input is really all you need.

</comment></comment></comment></comment><comment><USER5> Been coming across lot of these issues. Asyncio requires slightly different thought processes.

As soon as you have an `await` anywhere in the code, you've got to assume that your code will be re-entered. Lots of asyncio.Locks all over the place for me.

Glad people are bringing this up. I had to learn this on my own.

<comment><USER6> > _As soon as you have an `await` anywhere in the code, you 've got to assume > that your code will be re-entered._

At least the re-entry points are explicitly marked with `await`. IMO that's the main benefit of async-await (stackless coroutines) over stackful coroutines or threads, which allow your code to be suspended and re-entered almost anywhere.

Of course the drawback of async-await is the "function color" issue [0], in which it's difficult for functions that don't suspend to call those which do.

[0] [http://journal.stuffwithstuff.com/2015/02/01/what-color- is-y...](http://journal.stuffwithstuff.com/2015/02/01/what-color-is-your- function/)

<comment><USER5> That's a good perspective.

</comment></comment></comment><comment><USER7> > Unfortunately this has a serious downside: asyncio locks are associated with > the loop where they were created. Since the lock variable is global, > maybe_initialize() can only be called from the same loop that loaded the > module. asyncio.run() creates a new loop so it's incompatible.

I work on several async projects, but I never had to use multiple event loops. What are use cases for using multiple event loops?

<comment><USER8> There may be other use cases, but it can be a useful pattern for mixing async code into a non-async project. In the specific places where using async for some task makes sense, you would just spawn a thread with an event loop, then push work into the new loop from non-async code using run_coroutine_threadsafe.

</comment></comment><comment><USER9> There is more than one way to make awaitables in asyncio -- at the core, this is about sharing a single future, for which there's a joyfully boring native standard constructor.

For example, when working w/ immutable GPU dataframes to represent our user's datasets, we often get into variants where loading a dataset may take a bit and thus get multiple services requesting it before ETL is done. So, we want to only trigger the parser once per file and have any subsequent calls wait on the first one:

      datasets = {}
      async def load_once(name):
        if not (name in datasets):          # sync,  many
          fut = asyncio.create_future()     # sync,  once
          datasets[name] = fut              # sync,  once
          fut.set_result(await load(name))  # async, once
        return await datasets[name]         # async, many

And then throw in an async lru.. :)

<comment><USER10> Unfortunately, this naive method is buggy, I have had to debug and fix this exact code in production :)

The issue is with exception safety - first, this does not handle exceptions in load() properly, but that is a trivial fix.

The more insidious problem is due to the fact that Python future are cancellable - and exceptions cancel futures.

What this means is that if two callers call load_once() in parallel, and the first caller encounters an exception (eg. from calling something else in parallel), the load() future will be cancelled for _all_ callers (eg. the second one), and will remain in a permanently wedged state.

Fixing that is, well, quite a bit more code...

<comment><USER9> Yep, we see the same, good to point out!

So load() needs a try/except, and except is either kill process / retry / clear / cancel, and the other loader should also expect an exn depending on that choice. All of that is app/use-case dependent.

Usefully, Futures and async/await natively represent most of these. The case we find missing is around back pressure, retry, etc., but I haven't seen a good lang construct for that. We used to do a lot of Rx for that, and now a lot of HTTP headers/libs when a remote call, but it all feels messy. This is somewhat orthogonal to futures for load once tho.

<comment><USER11> Have you seen trio ([https://trio.readthedocs.io/en/stable/](https://trio.readthedocs.io/en/stable/)) and more generally the notion of structured concurrency? ([https://vorpus.org/blog/notes-on-structured-concurrency- or-g...](https://vorpus.org/blog/notes-on-structured-concurrency-or-go- statement-considered-harmful/))

<comment><USER9> We have trio somewhere in our stack and it is on the list of to-delete, but mostly as part of continued elimination of maintenance and consistency burdens

I tried skimming that article, but it comes off as a long and hard to read rant, which suggests the author needs to understand their idea better or pick an explanation/analogy that is more direct. Maybe something like the ocap reasoning for promises vs futures, or say the issues of coloring, may help...

</comment></comment></comment></comment></comment><comment><USER12> How about we just use actors instead? Preemptable actors are the only good concurrency model I've ever come across. Everything else has massive problems

<comment><USER13> Async await scales well to codebases with millions of lines and thousands of developers. As a result, large companies and ecosystems have mostly adopted async/await and the tooling and runtimes in those languages is now much more mature.

<comment><USER6> > _Async await scales well to codebases with millions of lines_

Interesting - do you think there's a better solution than async-await for smaller codebases?

</comment></comment></comment><comment><USER13> If you're using cpython since python 3.2, you don't need to lock. You can use `dict.setdefaut` or another similar method that is guaranteed to be atomic.

        initialized = D.setdefault('initialized', True)
        ...

<comment><USER14> dict.setdefault doesn't solve the problem that he's using the lock for (atomicity is not the problem).

<comment><USER13> Something like this should work, no? Only run the coroutine if you won the race.

        D = {}
        async def maybe_initialize():
            global D
            this_setup = asyncio.ensure_future(one_time_setup())
            actual_setup = D.setdefault('initializer', this_setup)
            if this_setup is not actual_setup:
              this_setup.cancel()
            await actual_setup
            return

complete example: [https://gist.github.com/mgraczyk/e251443bccfe54505e75b652655...](https://gist.github.com/mgraczyk/e251443bccfe54505e75b6526550c113)

<comment><USER14> I think something might be off in your mental model of python coroutines. They work via cooperative multitasking. Atomic operations aren't really necessary or relevant in such a system where you are in complete control of all yield points (i.e., calls to `await`).

If you read the full blog post, the author solves the problem without setdefault, and without having to cancel any futures.

<comment><USER13> I understand them quite well, thank you. You don't need setdefault if you only call the initializer from one thread. My code can be made thread safe (as long as you only use one event loop per thread).

It's way easier with a single thread. You don't need a lock or atomic operations.

        initializer = None
        async def maybe_initialize():
          global initializer
          if initializer is None:
            initializer = asyncio.ensure_future(one_time_setup())
          await initializer
          return

<comment><USER15> This is the same as the solution from the article, except that:

\- Chris forgot to declare the variable as global;

\- Chris used asyncio.create_task() instead of asyncio.ensure_future().

<comment><USER16> Maybe it's me not grokking async, but the code seems right to me. `once` is a decorator, so `future` is "instantiated" once per decorated function, which is then accessed as nonlocal in the wrapper. So in the last code sample, every call to `one_time_setup()` is accessing the same `future`.

</comment></comment></comment></comment></comment></comment></comment><comment><USER17> This can be a lot simpler. Just set "one_time_setup" to a single instance of the method, and all calls are waiting for the exact same run.

If that doesnt work, then set it to an 'asyncio.event`, and run the one_time_setup "in the background" (create_task), and when its done it marks the event as complete.

</comment><comment><USER18> Go offers this out of the box via the sync.Once function. Do other languages? Kind of surprised python doesn't as this sort of pattern is common in applications dealing with concurrency

<comment><USER19> Erlang has features for this baked in. What's more, if initialization of any subcomponent fails (say one of its dependencies hadn't completed booting yet due to race condition), if the author made it throw, the dependent subcomponent will automatically restart itself and try again. There are also one line strategies for trying again later, etc, so you don't even have to worry about blocking to prevent those race conditions.

> Kind of surprised python doesn't as this sort of pattern is common in > applications dealing with concurrency

Well yeah, python was not designed for that.

</comment></comment><comment><USER20> Trying out the last snippet. What am I doing wrong here? Python 3.7.7

[https://pastebin.com/E9KWCmky](https://pastebin.com/E9KWCmky)

<comment><USER21> Indentation is wrong in following statement ``` return once_wrapper ```

<comment><USER20> Duh, thanks! Now I have a new one but I think it just means the script needs to stay running longer so the coroutine can have time to do its thing.

        ./once.py:29: RuntimeWarning: coroutine 'once.
        <locals>.once_wrapper' was never awaited
        one_time_setup()

<comment><USER22> Your main function needs to be async as well, since the one_time_setup is async. Linking this SO answer that also links to the docs (may come handy!).

[https://stackoverflow.com/questions/57399157/runtimewarning-...](https://stackoverflow.com/questions/57399157/runtimewarning- coroutine-main-was-never-awaited)

Edit: Also tangentially relevant is the article linked by pansa2 in another thread, which was also discussed on HN a few months ago: [http://journal.stuffwithstuff.com/2015/02/01/what-color- is-y...](http://journal.stuffwithstuff.com/2015/02/01/what-color-is-your- function/)

<comment><USER20> Thanks!

</comment></comment></comment></comment></comment><comment><USER23> >"global"

Please write classes, people!

<comment><USER24> Why? To hide the fact that something is global behind mutation by reference?

"global" is a fine way to do that when you need it. Simple and says what it means.

</comment></comment><comment><USER25> I would add a note that if you are running in a cluster environment like Kubernetes this won't work because your containers would be running potentially in different machines. In those scenarios you would need another service just for the locks.

<comment><USER26> On k8s, for example running multiple parallel jobs that need to initialize only once, It used to work for me the redis redlock (it's around with multiple implementations). The first job takes the lock while initializing, the rest just waits the release, to start working on prepared items by the first. On asyncio, caches, we used a lock to prevent dogpiling on cache initialization.. prevent multiple tasks cashing the same in parallel.</comment></comment>


Ask HN: How do you stay in shape? - <AUTHOR> People who sit at a desk 8-10 hours during the weekdays and many hours on the weekends working on side projects - how do you stay in shape? <comment><USER2> There is no magic and you don't need any fancy equipment or clothing.

If you want to improve your cardiovascular health, do some cardio 3-7 times per week for at least 30 minutes.

If you have the will/want/time, add in some weight lifting 3-5 times a week.

Lastly, controlling your diet will make arguably the biggest difference in your body composition. If you want to lose weight you need to eat less calories than you burn period, unless you have medical conditions. If you have trouble losing weight you need to count your calories and figure out your TDEE using a calculator(google will pull up a few).

So personally I go to the gym directly after work(bring everything you need in the morning). This works the best for me because it doesn't allow me to get home and be lazy.

<comment><USER3> Agreed with all that, but I'd add that it's not truly necessary to do cardio "for at least 30 minutes." High intensity interval training (you can google for HIIT if you're interested) is proven to be just as effective, if not more, than longer steadier cardio workouts.

Personally I alternate between both.

<comment><USER4> Interesting research results contradict HIIT as a pure _general_ guideline for everyone (I think alternating between both is an excellent approach though).

"Given that ∼20% of subjects fail to improve aerobic capacity with intense endurance training, while ∼30% do not enhance their insulin sensitivity (12), it is clear that we must develop genotype-tailored lifestyle interventions."[1]

[1] Using molecular classification to predict gains in maximal aerobic capacity following endurance exercise training in humans

James A. Timmons, Steen Knudsen, Tuomo Rankinen, Lauren G. Koch, Mark Sarzynski, Thomas Jensen, Pernille Keller, Camilla Scheele, Niels B. J. Vollaard, Søren Nielsen, Thorbjörn Åkerström, Ormond A. MacDougald, Eva Jansson, Paul L. Greenhaff, Mark A. Tarnopolsky, Luc J. C. van Loon, Bente K. Pedersen, Carl Johan Sundberg, Claes Wahlestedt, Steven L. Britton, Claude Bouchard Journal of Applied Physiology Published 1 June 2010 Vol. 108 no. 6, 1487-1496 DOI: 10.1152/japplphysiol.01295.2009

</comment></comment></comment><comment><USER5> I've tried running, lifting and other training routines and I just can't keep it up. I don't have the discipline to keep up something I find so boring. No disrespect meant to lifters&runners, quite the contrary, I envy you guys.

Somehow though, cycling does it for me. I can go fast. It can take me places conveniently. I can do it out there in nature when I get out of the city on weekends. And, it fits in with my need to tinker with mechanical stuff :)

</comment><comment><USER6> Eat in a manner commensurate with your activity level. I might be lucky in this regard, but I simply don't get hungry when I'm not sufficiently active. Drinking lots of water might have something to do with that, but I'm really not sure.

Make being active a part of your daily experience: walk, run, or bike to your office. Get a gym membership nearby so you can clean up before going to work. Go back to the gym to do some lifting on your lunch breaks Mondays, Wednesdays, and Fridays. This will perk you up in the middle of the day and keep you from falling into a post-lunch food coma. After your day at the office is over, you've got another burst of activity awaiting you in order to get home.

Diversify from workout routines and take time off. Block six to ten weeks for the routine, then take a break for two weeks and try out informal, social exercise (pickup sports, dance classes). Go hiking, do yoga, or catch up on your social life in an active way, like a pub crawl or one of the boozy bicycle group tours.

</comment><comment><USER7> I come from work wind up couple of hours then, 9 - 9:30 PM go to gym until bed time then hit the bed 3-4 days a week.

<comment><USER8> So, you only sleep 3-4 days a week? ;-)

<comment><USER7> hahah, no I go to gym 3-4 days a week. I come from gym like 11:30 - 12:00 then go to bed. :)

<comment><USER9> do you take pills to sleep? Aren't you very awake after that exercise?

<comment><USER7> I sleep like a baby after exercise, you are tired already why would I be awake? :)

</comment></comment></comment></comment></comment><comment><USER10> As a student I have a similar problem of spending too much time at my desk, both weekdays and weekends. Here's what I hope to implement in the coming semester to stay more fit:

1) Wake up very early (goal is 6:30am) to spend an hour working on fitness before breakfast and starting class.

2) Follow /r/bodyweightfitness and /r/running, and use their beginner programs to come up with my own schedule Mondays through Saturday.

3) Explore my city (walking, biking, hiking) early Saturday morning to Saturday afternoon.

I think a major step in the right direction is waking up early and getting your exercise "out of the way" for the day. It serves as a huge motivator and is a great routine to become accustomed to. Not to mention, on Saturdays, if you wake up very early, you can fit in 6 or 7 hours of fun and exploration and still have half the day to be productive afterward.

</comment><comment><USER11> I work out for about 4.5 hours a week (3 ~1.5 hour sessions, 30m cardio and 1h lifting) and count calories. Fortunately I have a nice gym at my work and it allows me to leave after rush hour ends. Results in a net loss of 3 hours a week since my home commute at 6pm is 30mins vs the 10mins at 8 pm.

Personally I love it as a time to unwind. I spend so much time staring at a screen both for work and for fun (I typically spend my down time playing Counter Strike) that its nice to do something more primitive.

I also try to go hunting or multiple day hiking fairly regularly. I always feel more appreciative of what I have and my station in life after a few days sleeping on the ground in a sleeping bag.

</comment><comment><USER12> Two things that really helped:

1) I signed up for gym classes with a limited (13) number of sessions per month.

This forces me to go 13 times a month. If I don't go, I'll be wasting money and psychologically I don't like knowing that I just threw away money. That's worked for me better than signing up for unlimited and never end up going since I would mentally think, "oh I could go tomorrow I've got infinite gym sessions."

2) I stopped eating out every day and cooked for myself. I learned how to butcher a whole chicken to save on money.

I've lost about 15% of my weight over 14 months. My clothes are all baggy now but that's a different set of problems.

</comment><comment><USER13> Concept2 rower

Amazing piece of equipment. Fits in a small space and will give you an amazing workout. I love mine.

I mix rowing with pullups, pushups, curls, overhead press with kettlebell for upper body.

Overall it's a nice base workout that you can do at home before or after work.

</comment><comment><USER14> I finally started doing push-ups again after getting the Perfect Push-up (yeah, the infomercial thing). It makes a huge difference with sore wrists/hands from RSI.

</comment><comment><USER15> I play ingress, walk around, sometimes too much...

</comment><comment><USER16> box 2-3 times a week, running every other day, eat homemade food, sleep all I can</comment>


Ask HN: Licensing a CSS Framework - <AUTHOR> Hey HN, I have been developing a CSS framework for quite some time, and it is almost ready to launch.
Ideally, I would like to earn money using it, but don't really like going the ads and sponsorship approach. So I was thinking something like this:
- The framework is completely free (with source available) for usage in free and commercial applications.
- If someone wants to extend it, and sell those assets (specifically themes and templates), a commercial license needs to be purchased for a tiny amount of money, paid once. Not a subscription.
Does this make sense? Would I alienate developers by having this structure of licensing? <comment><USER2> I think this type of model would be very difficult to enforce. You'd have to have lawyers and enforcement as part of your monetization strategy, and that would just encourage people not to use it.

If you're going to do something like a CSS framework; I'd say just make it open source. There is already so much prior work; it's something you should really only do if you're going to use it for something yourself and maybe contribute back in some way that others might find useful.

<comment><AUTHOR> Hmm you are right, it would be impossible to enforce.

</comment></comment><comment><USER3> Your timing is auspicious. You might reach out to Adam Wathan, who just launched the paid component to Tailwind CSS. [https://twitter.com/adamwathan/status/1233134358388781080?s=...](https://twitter.com/adamwathan/status/1233134358388781080?s=21)

<comment><AUTHOR> This approach may indeed be smarter. Make the core fully open source under MIT license, but have a paid license with extra goodies.</comment></comment>


Ask HN: What's a good history of technology book? - <AUTHOR> I have read a few tangential books
- The Information - What does technology want - Robot Mere machine to transcend mind - Zero
and a bunch of other books in the realm, most of them are to some extent philosophical which I really enjoy.
But I am looking for a book that takes a more hardcore historical approach and kind of takes us trough <comment><USER2> Real hardcore, I'd delve into archives of technical publications from Bell Labs, Berkeley Lab, etc.

[https://commons.lbl.gov/display/itdivision/Berkeley+Lab+Publ...](https://commons.lbl.gov/display/itdivision/Berkeley+Lab+Publications+Management)

[https://archive.org/details/bstj-archives](https://archive.org/details/bstj- archives)

This report from BBN is a pretty great example of the level of detail and insider history that can be discovered. I really wish there was more stuff like this extant.

[http://walden-family.com/bbn/bbn-print2.pdf](http://walden- family.com/bbn/bbn-print2.pdf)

Youtube is of course an endless treasure trove as well. From The MIT Vault is a bit of a time machine unto itself. And you can always find the random Netscape Communicator conference keynote from 1997 with a young Marc Andreessen. As well as oral histories and product demos like "RAND Corp presents the Graphics Rocket!" on the Computer History Museum channel ;)

[https://www.youtube.com/user/FromTheVaultofMIT](https://www.youtube.com/user/FromTheVaultofMIT)

[https://www.youtube.com/user/ComputerHistory/videos](https://www.youtube.com/user/ComputerHistory/videos)

On the softcore front. I am thinking of revisiting Daniel Boorstin's "Knowledge Trilogy". Completely out of vogue in our age of Taleb, Hariri and Gladwell. Probably chock full of cringe inducing corniness. But I remember loving the vivid writing style as a kid.

</comment><comment><USER3> Code by Charles Petzold is an in depth history of programming. Very good book.

<comment><USER4> This is an excellent book that I recommend to many people. It literally goes from how you would use a flash light to send signals and communicate to the JVM and everything in between.

</comment></comment><comment><USER5> "The Idea Factory" while focused on Bell Labs, gives a pretty broad history of the birth of digital electronics and the start of everything from digital encoding of data to cellular networks and satellite communication.

</comment><comment><USER6> Try "Asimov's Chronology of Science and Discovery". It goes year-by-year through each major scientific discovery up until the mid 1980s, when it was written. Highly enjoyable.

</comment><comment><USER7> You might be interested in "Losing the Signal", a book about BlackBerry's rise and fall by Globe & Mail Journalists. It starts with Mike Lazaridis (the main BB engineer) adventures in repairing electronics in shop class in the '70s, to developing a lot of the communications technology necessary to launch the BB push email service.

</comment><comment><USER8> John D. Clark's "Ignition!: An Informal History of Liquid Rocket Propellants" is back in print as of a few months ago, and pretty readable overall (but does venture into some of the less travelled corners of chemistry as well...)

For computer stuff, Tracey Kidder's "The Soul of a New Machine" is one of my favourites.

</comment><comment><USER9> The Innovators by Walter Isaacson (early computing history)

Where Wizards Stay Up Late by Katie Hafner (specifically the internet)

</comment><comment><USER10> In my "History of Technology" course in college we read, "The Soul of a New Machine" by Tracy Kidder. More of a journalist's history of how a team built a new computer.

<comment><AUTHOR> Does it go through the history of the things they use to build it with or is it more a technical account?

<comment><USER10> It has both, but more of the personal interest side. A good study of the culture at Data General and mileu of computing at the time. Kidder did a good job of explaining it to his audience when computers were still very new. He won a Pulitzer for it.

</comment></comment></comment><comment><USER11> Conquering the Electron: The Geniuses, Visionaries, Egomaniacs, and Scoundrels Who Built Our Electronic Age.

It's a history of electronic invention over the past 150 years. Not the best from a historiographical point of view, but very insightful for getting inside of the minds of those who developed the technology, and getting a sense of the tech itself, the mental steps required to invent it, and the personalities of those involved.</comment>


Roaring bitmaps: A better compressed bitset - <AUTHOR> http://roaringbitmap.org/ <comment><USER2> We use EWAH (another compressed bitset from Daniel Lemire) heavily at work to store inverted indices in a compressed form. Apart from lowering the memory foot print (vs storing sorted integers), AND/OR operations are much faster when you want to do stuff like intersecting 2 bitsets to find the overlapping members etc.

You should checkout some of the other impressive compression related stuff that Daniel has open sourced: [https://github.com/lemire](https://github.com/lemire)

</comment><comment><USER3> This is quite nice

There are many flavours of bitsets. Sometimes it's not the largest element that's a limit but the cardinality. You should also take note of the cost of clearing a bitset: This cost is almost never included in performance considerations. For instance, when you're making small random subsets (of size k) of a set (size n) you might be tempted to use a bitset and recycle it between subsets. you typically end up with a performance of k.O(1) for set but O(n) for a clear.

pick your poison ;)

</comment><comment><USER4> How do these compare space and performance wise with Judy arrays, which are 256-ary trees whose nodes also distinguish between sparse and dense subsets? [https://en.wikipedia.org/wiki/Judy_array](https://en.wikipedia.org/wiki/Judy_array)

<comment><USER5> Good question, since the patent on them won't expire until Nov 29, 2020.

</comment></comment><comment><USER6> Aha, this is interesting =).

So this is basically just an array of booleans, and each element has two states.

But are there equivalent fancy compressed data structures for more than two states? (i.e. like a compressed array of enumerations) Or does that not make sense for some reason?

<comment><USER7> Yes, it's a research area called succinct data structures. E.g. given work on DNA in bioinformatics, a lot of work is on elements with 4 stats.

</comment></comment><comment><USER8> How would I use this data-structure in an application? Is it basically a replacement for a byte array with improved space characteristics?

<comment><USER9> Semantically, it's a boolean array. Or, to look at it another way, a set of integers, where a[n] is true if n is in the set.

This representation, and the various others the paper compares it to, are useful when the array is fairly sparse - the introduction suggests the range 1/10000 to 1/64 of the bits being set. They're a lot more compact, but still support key operations - ORing, ANDing, testing a particular bit, enumerating all set bits - fairly efficiently.

The major motivating use of structures like this is for bitmap indexes in databases. Bitmap indexes store a single bit of data per record - it could be "is this person a current employee?", "has this user ever bought anything?", etc. If you can encode these compactly, you can use them to very quickly winnow vast amounts of data down to a small number of interesting records, which you can then retrieve one by one.

</comment></comment><comment><USER10> It would be nice to have a breakdown of the trade offs that this data structure involves in terms of insertion time and storage space.

<comment><AUTHOR> It's covered pretty well in the paper they link to:

"On the Java platform we used for our experiments, we estimate that we can compute and write bitwise ORs at 700 million 64-bit words per second. If we further compute the cardinality of the result as we produce it, our estimated speed falls to about 500 million words per second. That is, we suffer a speed penalty of about 30% because we maintain the cardinality. (We find that this penalty effectively disappears when using an equivalent optimized implementation written in C.) In contrast, competing methods like WAH and Concise must spend time to decode the word type before performing a single bitwise operation. These checks may cause expensive branch mispredictions or impair superscalar execution."

They also discuss _why_ this is so (specialized instructions in modern processors, and modern processors and superscaler allowing execution of multiple such operations per cycle). All of this is in the section that begins "Bitmap vs. Bitmap".</comment></comment>


Neo4j Graph Database re-licensed under GPLv3 - <AUTHOR> http://blogs.neotechnology.com/emil/2011/04/graph-databases-licensing-and-mysql.html <comment><USER3> Please note that this post talks about Neo4j Community. Neo4j is now split into three editions:

* Neo4j Community, a high performance, fully ACID transactional graph database – licensed under the GPL

* Neo4j Advanced, adding advanced monitoring – licensed under the AGPL or a commercial license

* Neo4j Enterprise, adding online backup and High Availability clustering – licensed under AGPL or commercial

See more in the 1.3 announcement ([http://blog.neo4j.org/2011/04/neo4j-13-abisko-lampa- released...](http://blog.neo4j.org/2011/04/neo4j-13-abisko-lampa- released.html)) and our licensing guide (<http://neo4j.org/licensing-guide/>).

<comment><USER4> A couple perhaps nit-picks. First:

"As well as a slew of new features and improvements, we're thrilled to announce that the community edition is now entirely GPLv3 licensed – permissive and accommodating to your needs!"

The GPL is not a permissive license as the term is usually understood in the free and open source communities. I believe the FSF is careful to distinguish GPL from permissive licenses.

Second: there are several places on the linked pages that compare this to MySQL, basically saying you can do with it whatever you could do with MySQL as far as the licensing goes.

MySQL is under GPLv2, not GPLv3, so the comparison to MySQL might mislead people.

<comment><USER3> Re: permissive, I concur! Poor wording on our part. Permissive-r than AGPL perhaps was our thinking. :) But you're absolutely correct that the GPL is not a permissive license. Updated the post!

As for GPLv2 vs v3, in a high-level post like this they're reasonably identical. v3 brings in some nice subtleties like ASL compatibility (a biggie for us!) as well as better patent language. But in terms of use cases where the "virality" kicks in, they're the same.

<comment><USER5> You could simply do GPLv2 "or later" and get the best of both worlds.

</comment></comment></comment></comment><comment><USER6> Am I right in thinking that, with an embedded database such as Neo4j, I would be required to use the server standalone and use the remote capabilities from a separate JVM in order to escape the virility of the license? (And if distributing, refer to their site for installation of the server?)

Though this is a much welcome change from AGPL or commercial.

</comment><comment><USER7> I am using neo4j with an app that I am building, it is GREAT!

I'd love to see some of the enterprise features included in the community version (clustering support like in orientdb). Maybe the community will come together and make it happen :)

I often read (gloss over) how GPLv3 isn't as good as it may seem, can someone fill me in?

<comment><USER8> it's a licence, so i am not sure that judgements like "good" and "bad" apply.

the gpl means that you can use the library, but whatever you develop that "works with it" must also use the gpl. that means that when you give or sell your software to someone else, you have to grant them the rights that you received when neo4j gave their software to you. in particular, you must give them your source and you cannot restrict (much) what they do with that - <USER2> can give away your source for free.

one qualification: unlike the agpl, the "works with it" phrase above doesn't extend to client / server on a network. so if you use gpl code on a server, it does not affect clients.

this is only a rough summary - read the licence for full details at <http://www.gnu.org/licenses/gpl.html>

[edit: ps this is good news. i can't remember what the original licence was, but it stopped me from using neo4j at some point, and i have also had to warn others at times. this is in the context of web services where i suspect that if people were successful they would be willing to pay to scale out; they just don't want to pay up front if they are going to fail fast. so gpl seems like a great fit.]

<comment><USER7> Thank you for explaining that. I will take the time to do a bit more research on various licensing types.

<comment><USER8> i don't know of anywhere with very good, simple explanations, unfortunately. i think the problem is that (1) if you simplify a licence then you leave something out which could be important and (2) no-one wants the liability involved.

on the other hand, people recognise that and the major licences do try to be fairly easy to read. but you do need to just "bite the bullet" and read them through (and think what they mean).

this is a good place to start - <http://www.opensource.org/licenses/index.html> (in particular, see "License[s] that are popular and widely used or with strong communities" at <http://www.opensource.org/licenses/category> for a list of the ones you should focus on)

have fun :o/

</comment></comment></comment></comment><comment><USER9> Perhaps OT, but can someone explain how graph databases are useful? I've read through their site, but don't have a good handle on when I'd select a graph database over an RDBMS, document store or KV store. Also, how is scaling one of these different or the same as an RDBMS?

<comment><USER8> i am not a great fan of them, so i am both biassed and inexperienced, but it seems to me that they win out over SQL in cases where you would be doing recursive queries. this is typically the case when you don't have much structure in your database (everything is related to everything else in one big table) and/or when you need to jump across an uncertain number of joins (to answer questions like "how many steps does it need to get from here to there?").

compared to KV they place more logic in the database (much like SQL v KV).

<comment><USER10> I'd agree with Andrew's general characterization of graph database advantages. Graphs are "whiteboard friendly" in as much as you can store data exactly as you would likely sketch it up when thinking purely in your domain. Because the graph structure is generic, you can even happily use it as a key-value or document storage. And, multiple intersecting domains can co-exist within the same graph. A graph could be a simple list, a map, a tree, or a complex network of data. With Neo4j, you'd get that expressiveness with the confidence of ACID behavior.

Beyond that, the Not-Only SQL options are a reminder to pick the storage that fits your application, rather than fit your application to the storage you have. Be domain appropriate.

I usually think in terms of: RDBMS - when aggregating data is important Graphs - when relationships between records matters KV - when you have really simple data, but gazillions of records Document - when you have complex, but unrelated and possibly non-uniform data

Cheers, Andreas

</comment></comment></comment><comment><USER11> That's cool. Neo4j is a good project. I grabbed one of the free single server licenses the developers offered a few months ago, which is even better for me: I can embed it in a single server web app. With the GPL I would need to run it as a separate service.</comment>


I doomed mankind with a free text editor - <AUTHOR> https://medium.com/@mortenjust/i-doomed-mankind-with-a-free-text-editor-ba6003319681#.uo4lzlbgs <comment><USER2> Warning: This article is filled with the comments you browse HN to avoid.</comment>