HN user

nroman

102 karma
Posts0
Comments30
View on HN
No posts found.

In practice it wouldn't make much sense to cache whole query responses to GraphQL queries because your hit rates would be too low due to the variability of the queries. You end up pushing a lot of the caching to the client. That's not really a big issue because if you're writing something like a Android or iOS app because you already need to be caching lots of data on the client-side to make the app responsive.

On the server you end up caching at lower levels in the stack. For example a query for user(id: 123456) {id, name} is going to need data from a key-value store containing user info. That access can easily be cached with something like memcache, saving load on the database. Cache-invalidation problems are also much easier to solve at these layers.

As an ex-Facebook employee, I can't wait for this to be released to the public. It is hard for me to overstate how much this infrastructure makes building products a joy, not to mention the tremendous developer and server efficiency that can be attained. I miss having the GraphQL stack so much when working on my own stuff.

The client application should drive the decisions about what data to fetch. After all it's the client that knows what it is actually going to be doing with the data, not the server. Current approaches like having a "fields" option on a REST endpoint are at best a hacky approximation to this.

If you do in SASS

  .Foo {
    a {
      /* stuff */
    }
  }
It translates into:
  .Foo a { /* stuff */ }
CSS is evaluated right to left, so this means every time an <a> is encountered in the page it has to at its parent chain to see if any has class Foo. This can cause performance issues especially for really large pages.

That said, for most pages it won't make a noticeable difference so it's kind of up to you to decide if you care.

When I was studying this in college I always found the "Eigenfaces" example very enlightening (http://en.wikipedia.org/wiki/Eigenface).

In case you're not familiar with them, the basic idea is treating a image of a face as a very high dimensional vector, and then doing what amounts to PCA on a collection of them. I'm leaving off a few steps, but the resulting eigenvectors converted back into images helped me grasp what was going on in a much more intuitive fashion.

Why three prongs? 14 years ago

In college I lived in an old apartment building that had been updated to have 3-prong outlets. One day I was wiring up some audio equipment for a party. As I hooked my computer to a a receiver in another room the audio cable immediately started sparking and the rubber insulation melted off. I yanked it out of my computer. Luckily the only real damage done was the sound card for my computer and the destroyed cable.

Later I did some investigation. First I bought one of those standard outlet testers. It seemed to suggest that everything was fine with the outlet. Then I did some more investigation. I got a volt-meter and started measuring the voltage from the different prongs. Finally I measured the voltage compared to a copper pipe in the house.

Turns out that both the neutral and ground wires were actually hot (as measured against the grounded pipe), and the "hot" wire was the ground. The outlet in the other room had been wired correctly. The shielding on the cable was grounded so suddenly it sent 120 volts down the audio cable when I plugged it in—destroying it in seconds.

The electrician didn't believe me when he came in to fix it, but was finally convinced when he checked against a pipe.

Just goes to prove that you can't make any system fully fool-proof.

I don't think you looked very hard. This is quite plainly stated in the developers policy. You don't have to be a lawyer to understand this:

From https://developers.facebook.com/policy/

6. You will not directly or indirectly transfer any data you receive from us, including user data or Facebook User IDs, to (or use such data in connection with) any ad network, ad exchange, data broker, or other advertising or monetization related toolset, even if a user consents to such transfer or use. By indirectly we mean you cannot, for example, transfer data to a third party who then transfers the data to an ad network. By any data we mean all data obtained through use of the Facebook Platform (API, Social Plugins, etc.), including aggregate, anonymous or derivative data.

One of the main points in this article is that any social graph found in a service such as Facebook, Twitter, or G+ can't possible model all of the nuance of real life relationships. That's obvious. However, the author takes it a step further. Suggesting that because of this these services have no value.

That's pretty big logical leap.

An imperfect approximation of the social graph still has a lot of value.

Almost all of the photos that people are filtering are uploaded straight off a phone. Generally the cameras on these devices suck. You get tons of pixel noise, weak colors, and relatively low resolution. You also don't get much in the way of creative control, such as the ability to play with depth of field and exposure.

Filters cover up these flaws. You no longer see all the noise and general crappiness after taking a photo blurring it, overlaying textures, and then blowing out the color. Plus they give you a bit of creative control. I think that's the reason that these apps are so popular.

Companies that actually build things have two enemies when it comes to patent warfare. The first is competing companies that also build stuff. The best defense against them is obtaining a large patent trove. This creates a mutually assured patent destruction situation, shielding the company from competitors' patents.

The second enemy is patent trolls. They don't actually build anything, so defensive patents are useless.

Because of this, the most prudent thing for a company to do is aggressively acquire patents with one hand, and lobby for the abolishment of these patents with the other hand.

This is true. However, the services that startups use to host their servers (Amazon Web Services, Rackspace, etc.) could adopt these practices in new datacenters because the specs are open. This could lower costs for the startups that use these services, and be good for the environment.

Seems like everyone wins.

The top tech companies (Google, Facebook, MS, etc.) see internships as the best way to recruit the top talent as they graduate from college. For this reason they will often pay engineering interns anywhere from $5000-$7000 a month.

Internships are also a much better way to screen a potential full-time employee. The company gets 3 months to interview the candidate in a real work environment, instead of a few hours in front of a white board.

Instagram is a really great app for filtering your photos before you upload them to Facebook. "Vintage" filters work well for covering up many of the flaws in photos taken with cell phones.

Personally, I find actually sharing photos on instagram to be much less compelling. My whole social graph is already on Facebook.

Full disclosure: I have a ridiculous personal bias on this topic, since I work on Facebook photos.

Almost all of Facebook's internationalization is crowd-sourced. What you're seeing probably isn't a bug, the string just hasn't been translated by a user yet.

They didn't redact informants and collaborators names from many of the documents they leaked. I would hardly call that exercising caution.

I understand that in some cases redacting names weakens the impact of the leak and its political statement. However, releasing the name of some random informant working on the ground in Iraq has no substantial effect on the impact of the whole leak, but can have an enormous effect on that person's life, especially if he's killed.

[dead] 16 years ago

Wait a sec, on the site it says 46 sold.

46 * $15 = $690

Where'd the other $250 come from?

I'm not a Rails developer...but it doesn't seem like rails should have a "new blog" command at all. Rails is a web framework. Frameworks are supposed to take care of all those annoying intricacies involved in building a web site. That would be things like URL mapping, routing web requests, handling gets and posts, talking with the database, session persistance...

A blog, on the other hand, is an application that should be written on top of all this. It would make more sense to me include this as an example application.

It seems pretty obvious to me that the intent of creating the "ruby new blog" command was to make it extremely easy to install the example blog app. However, by doing this, they are marketing rails as a magical framework. The framework auto-generating you a whole blog isn't really a good hello world program; it didn't teach me anything about how rails works.

I remember back when ruby first came out (I'm sure a lot has changed since) I was watching videos that introduced it, and every time the presenter would say something like "Hey you want a blog? Just type magic make me a blog command, and now you have a fully functioning blog with a built in CMS." I remember thinking to myself, "but I'm not building a blog" and then I went back to my PHP. I'm not saying this was the correct reaction, perhaps I should have instead gone and investigated it further, but that's how it was marketed, and I found it off-putting.