albertni
Even better - some hybrid algorithm that goes through the most common letters then goes into binary search for the remaining letters (many of which appear at approximately equal frequency)
I've Googled in the past but haven't found too many great reviews comparing some of these choices side-by-side - most seem to regurgitate the feature sets as opposed to going into the level of detail that would be most helpful for a developer.
But, we've also got the huge difference that China, and Chinese people, are simply different. I don't even know where to begin in describing how different Chinese people in China fundamentally are from Americans in America. It's like when I see comments made by people such as "I wonder how the Chinese people can stand <insert thing here>", I immediately think to myself that it's a complete non-issue, just an accepted fact of life, for all of my Chinese relatives living in China. Also, things such as the one child act don't help - you've literally got an entire generation of spoiled only childs, and let me tell you, many of them are remarkably spoiled in the cities. You've got this feeling of collectivism which still very much exists, the "we" taking precedence over the "I", not in the oversimplified hive-mind way that most Westerners perceive it as, but rather something more inbetween. It always amazes me that people in China can feel such a sense of duty to their country (such as a student feeling it's his/her duty to the country to do well in school, something that pretty much never happens in the USA), but yet also feel such apathy for other people around them (to a degree that also doesn't happen in the USA ... not saying we're saints here who never pass by homeless people on the streets without even looking at them by any means, but the degree is still different).
And the list goes on and on, I still don't know where to begin or where to end. I know I'm not comparing China to Yugoslavia or Hungary here, but the perception gap even to this day between China and the USA is so great (and more importantly, so much greater than what most people think it is) that I can't imagine it being much less for China and other situations. Point being, a revolution might be peaceful, or it might be violent, or it might be somewhere inbetween, but none of these outcomes would have anything to do with the situations that led to Hungary's outcome being the way it was, or Yugoslavia's being the way it was.
There are a variety of things that can be used to define "active user". Logically, the point of defining "active user" is to differentiate between users who have a good chance of using a product/service again or on a regular basis or something like that (depends on the nature of your service), and users who almost certainly won't and are just taking up space in your user registry (or in our case, space on our servers as well). I won't go into any further details, but the number of people who do a file sync at least once a week is much higher than the number of people who do a file sync every day, and the number of people who do a file sync at least once a month is much higher than that. In addition, there are people who don't add or edit new files very often, but do frequently access their existing files, who aren't being counted in the approximate numbers I gave above. Anyway, going off of this qualitative "definition" of activity, I consider much, much more than 10% of our users to be active users.
Also, well over 100K users actively sync a file each and every day.
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.
Personally (and without knowing more about what you guys are doing), I'd spend the $2k exploring different avenues to get a better idea of what kinds of things do and do not work. It's hard to know what may or may not work sometimes without trying it, at least a little bit. Seemingly similar startups may have very different levels of success with things like untargeted Google Adwords, targeted Google adwords, other methods of product placement, etc., and while you can't always get conclusive evidence from $2k, it's a start.
But running inward is not a better choice from a baseball standpoint. For one thing, if you take your first step back and then recalculate and realize that the fly ball was shallow, it's easier to make up more ground and run forward. If you were to take your first step inward only to realize that the ball is going over your head, it's much harder to turn around and pursue it (yes, that fraction of a second adds up to a lot in baseball).
Also, if you mistakenly take a step back and it turns out the ball is going to fall in front of you, that means it was hit less hard than expected, which means it's more likely that the ball will be taking a friendlier trajectory (in other words, less of a line drive), and so you'll have more time to make up for your misread. In the opposite case, that means the ball was hit harder than expected, making it even less likely for you to recover. Additionally, if you make a mistake and let a ball drop in front of you, that's a single, and a relatively contained one at that as you'll be charging the ball when it lands and have the momentum to make a good throw (to nail a runner at the plate, for instance). However, if you make a mistake and a let a ball get over your head, that's a double minimum, and you'll be running away from the bases to pursue the ball, making a throw that much harder (and of course you'll be farther from the infield as well, but that was by definition).
A simplification of the problem would be to assume that you have a 50/50 chance of guessing right on whether to move in or out on a fly. If that were the case, the potential loss in mistakenly taking the first step inward is much greater than the potential loss in mistakenly taking the first step outward. In practice, there are many other factors that shape this "decision" (or developed instinct). One such thing is the sound made when the bat hits the ball (hard to explain this one if you haven't played baseball, though suffice it to say it has something to do with how loud the sound is). Another is the depth you're playing at originally. On many high school fields, which are smaller than major league parks, it's quite plausible to play at a depth where if you take your first step back, you'll catch all but the hardest hit drives, some of which are home runs anyway, and still be able to recover on misreads and catch all but the luckiest of bloopers.
Why am I not surprised. Translating the original article through the Techcrunch filter in my brain had already produced the mapping "late stage" -> "early stage or not at all".
Hopefully progress continues to be made in the area of things like better parsing for more helpful coding environments, because while it feels incredibly "impure", there are times when I almost feel like having language rules (such as "End If", though not as ugly hopefully) solely for the purpose of making my editor more helpful would be a worthwhile tradeoff. Emphasis on "almost", but still.
Just as intelligent programming language design saves time, intelligent syntax highlighting and other editor provided assistance does too (and a non-negligible amount at that).
Gotta admit, I appreciate it when attention-grabbing headlines are followed up by the first line or two actually describing what the post is about. It's a good one-two combo.
Lesson here is, if you use GMail, don't e-mail yourself to check if sending works at the moment.