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

> Yes, sugar can be harmful, but it's hardly in the same class.

It is certainly more addictive: http://www.ncbi.nlm.nih.gov/pubmed/23719144


European society thought of sugar as a drug for hundreds of years and it was traded in the British empire mostly by opium traders.


If you enjoyed the article you might also enjoy the follow-up by the same author, 20 years later: http://arxiv.org/pdf/hep-ph/0602037v1.pdf


Thank you, a similar subject, much updated. This discussion of relativistic mass reminds me in some ways of the debate about whether the concept of force is overused as well.


It says that it would be nice for the applicant to have at least a few, not necessarily all of them.


You can also use binary search to approximate the square root of a number.


You can also use a lookup table, an AJAX call to a square root web service, using the canvas and drawing appropriate geometric shapes then measuring, or, if you have a bit of free time, implementing code which has commercial value, accepting money for it, and then going to Radio Shack and buying yourself a calculator with a square root key.

But personally, yeah, I'd use Math.sqrt.


well the point is, and i think this is the original poster's point...questions like this are not relevant to what facebook is doing, and even if it is, its the kind of thing you look up.


In Facebook's defense (I have no affiliation with FB, and in general am not a big fan of them), they probably weren't looking for somebody to whip out Newton's method, but rather just binary search.

Everyone who says "this question is completely irrelevant" isn't completely right. This question would be completely irrelevant if they were exclusively looking for a "fancy" square root finding technique. However, binary search is a pretty basic algorithm - the trick here is to recognize that such a basic algorithm can be applied to a seemingly unrelated problem. If Facebook is testing to see if people can connect different parts of their knowledge (square root function is strictly increasing, something that everyone knows to be true at least intuitively, combined with the fact that binary search can then be used in such a situation), then it's a reasonable question to ask. Maybe not for a front-end developer though.


The old 17-inch Macbook Pro is still available.


Did not know that. See? It is more complicated than Matt Maroon said.


You got me.

Lack of choices is simultaneously their biggest weakness and strength.


Suppose x = 0 and your list is [1,2,3,2,1]. If you xor 'x' with every number in your list then x = 1^2^3^2^1, which is the same as x = (1^1)^(2^2)^3 = 0^0^3 = 3. So, x=3 is the number that wasn't repeated. This works because a^b = b^a and a^a = 0.


I have the same GPU and it works fine.


Also, living a little longer may give you a chance to enjoy what these guys are working on (a cure for aging):

http://www.mfoundation.org/


predicating my life on these hucksterish immortality wishes would rob it of all meaning while I'm alive, and then I'd still be dead.


skateboarding :)


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

Search: