I may be in the minority here but I think that it is asking a lot of someone to build out a UI just for the prospect of getting hired. I think it borders on exploitation there are a lot of young individuals with wonder-lust that see a name like Reddit and will put in significant hours just for the possibility of maybe getting hired. In their mind that possibility is greatly inflated (after all who would not want to hire them).
Now as a person that hires and specifically hires technical personally and is technical himself, I am sensitive to the fact that it takes a trained eye to spot talent and that their are a lot of posers out there. But in my personal opinion you guys are offloading the task of being good at spotting talent onto the prospective employee which I am not totally in agreement with.
Personally, I would not ask an up front prospect to code anything other than a 10-15 minute exercise (in interview) and if I where to have someone build something, it would be the final 3 prospects, it would be a real business problem, and I would compensate them for their time. I think the practice of competitions for a job borders to close to exploitation for my comfort, further I have seen better talent selection from a skilled interviewer than I ever have from an arbitrary competition.
I understand your concerns, and we thought about it a lot ourselves. "Are we asking too much?"
We came to the conclusion that what we are asking should be fun for you to do. Something you might even do without us asking.
Also, it shouldn't take you more than a few joyful hours. If it does, you probably aren't the person we're looking for.
We gave the task to a couple of trusted folks beforehand, people who we would love to hire if they weren't already doing something they loved, and they said that the tasks were pretty straightforward and quick to do.
We already tried doing it the other way around, and we realized that it just didn't work. The guy that turned out to be the best was the one we almost rejected because he had a bad resume and cover letter.
We don't want to make that mistake again.
If you think it is too much to ask, well, I guess you just don't apply. <shrug>
>If you think it is too much to ask, well, I guess you just don't apply. <shrug>
This response seems to me thoughtless, cliche-ridden, and inordinately smug--rockstaresque even.
That "I guess you just don't apply" really doesn't seem to be the product of the thinking you claim to have put into this. Obviously there are people who might apply even if they think it's too much to ask on spec. Obviously there are people who might apply even if they are motivated by something other than mere fun. Obviously there are people who might apply even if it takes them a lot more than "a few joyful hours." Saying such people probably aren't the ones you're looking for is beside the point--beside the ethical point--except insofar as it's a pretty clearcut instance of your shirking all responsibility (it's all their fault if they underestimate their chances, or ignore the injunction to do it for fun) with the kind of callous indifference to the work and time of others captured neatly in your closing shrug.
> Obviously there are people who might apply even if they think it's too much to ask on spec.
First off, I don't think you know what spec work means. It means asking someone to do work and then paying them for that work if you like it. That is not what we are doing. We are asking applicants to implement things that will be of no use to us, because we already have them, as a demonstration of both skill and determination.
> except insofar as it's a pretty clearcut instance of your shirking all responsibility
What responsibility am I shirking? If you want the job, then you do the thing. If you aren't confident enough in yourself, then so be it. It isn't my job or responsibility to be your mom and encourage you to apply and tell you that you are good enough and you should go for it! You should know that already.
> with the kind of callous indifference to the work and time of others captured neatly in your closing shrug.
As I said, if you are doing the task, you are doing it because you enjoy it and maybe you can use it as a learning experience or on your portfolio. It isn't a callous indifference to work -- we're asking you to do different work. Instead of a resume and cover letter, we're asking you to program.
It may be too late in the game to reply to this nonplussing nonresponsive response, but what the hell...
>What responsibility am I shirking? If you want the job, then you do the thing.
Was "shirking" too severe? You disclaim, patently and unapologetically, responsibility for the effort that will be put into applying for the position by applicants who will not get the job.
You disclaim that responsibility by saying in effect "it will be fun, and if it ain't fun, don't do it, and if you do it and don't get the job it might be good for your portfolio, or good experience."
Your choice here was between devising an application procedure that actively and consciously tries to minimize the futile endeavors of most applicants or devising one that does not but instead leaves the responsibility for that minimization entirely up to applicants themselves.
You seem to like the second choice, suggesting it really is not at all your responsibility; it's all on the shoulders of the applicant. You're not (the applicant will be distressed to hear) his mom.
Yet elsewhere you seem to want at least a little to acknowledge that there is something to be said, at least publicly, for taking the first choice: You wondered whether you were asking too much. You advised applicants only to do it if it's fun and so on. It seems to me that that's an example of trying not to be callously indifferent to the work of others.
I was merely trying to point out that that's not good enough. It should be obvious, I think, that this, your, strategy for minimizing wasted effort on the part of applicants is not going to work.
The alternative strategy of many employers is to impose the more effortful parts of the application procedure only late in the process and only on applicants they are already interested in. They do this even though it's more time-consuming for them. They take that responsibility. You don't, and shrug.
But let me do you the honor of citing you again: "so be it." I'm certain you have no reason to worry about this. I'm sure Reddit will get its rockstars and continue to rock.
And if you ever want a lesson in supercilious condescension (the "I'm not your mom" stuff is embarrassingly amateurish), look me up. I take payment in advance.
P.s. I didn't use the phrase "spec work" and if I had I wouldn't have used it to mean, in accordance with your bizarre and presumptuously corrective definition, "asking someone to do work and then paying them etc..." Clearly that's nonsense. Spec work is the work, not the asking. I did use "on spec", and used it as a standard modifier to qualify the meaning of "work" as work which is done speculatively in hope or expectation of gain. In this (hardly broad) sense you are asking applicants to do work on spec. Joyfully.
you system is perfect to filter in people who don't value their time and ok to work in the company that doesn't respect their applicants (but supposedly starts to respect applicants the second they turn employees - some may believe that too). There is definitely a business sense in hiring such naive gullible people, no questions here.
Judging from jedburg's post, I'd argue that it allows them to hire people who would rather spend 3 hours up-front writing some code than spend 3 hours up-front writing a cover letter.
Which is preferable for the programmer, too, since the up-front, likely 'wasted' time is spent doing something enjoyable. The investment in writing a cover letter only comes after.
For the record, I was not casting stones just stating that I was not personally comfortable with the idea of asking people that have had little touch point with the company to write something as the opening touch point for an interview (i.e. I personally would not do it).
For me personally, portfolio would be the first filter. I would only engage people that I felt's portfolio reflected the qualities that I was looking for. If they don't have a portfolio then sure, they have to build something anyway just to prove that they can build something but that is a limited subset most that would be applying will have previous work that can be submitted.
As well I don't see how a few hours could provide anything beyond a very amateur quality mock-up. Sure a few hours and some jQuery UI elements could make something pretty, but I am assuming that you are looking for a little more depth than someone that can just throw some jQuery UI widgets on a page.
For me, I would be looking for someone that has deep dynamic language understanding, a deep understanding of event based programming and how events can be used to decouple UI elements and how that can create elements that can be dropped into a UI framework and auto wire itself up to data events. Someone that understands promises and it's relationship to asynchronous callback based programming constructs. I personally would be embarrassed to submit something that only had a few hours effort in it, because it most assuredly not going to cover all of those core aspects and the ones that are covered are not going to be fleshed out in a detailed level that one should be using to exemplify the state of their skill.
I wish you luck (i mean that with all sincerity), and I do hope the people that chose to engage in your interview do truly enjoy it. For me, it crosses to many personal boundaries to be comfortable with employing such recruiting tactics.
I would like to ask that you come back and give us a postmortem on how the exercise went and ask that any HN'rs that participate contribute to that conversation. I am generally interested in the outcome and the perception of the participants.
Actually, we won't really benefit at all. We already have tgrep, and a single user local storage frontend won't really be useful to us (and already exists).
Agreed. Tgrep is a nice take home challenge, but a client-side Reddit clone is far too much to ask for. The only applicants they're going to get for the front-end position are Reddit mega-fans with too much spare time - though I suppose that may be what they're looking for.
Regardless, most real "rock star programmers" (as much as I hate the term) aren't going to be blowing a day or two on spec work.
Funny, to me writing a quick and dirty frontend for a reddit clone seems like a fun mindless 3 hours. Building a replacement for grep and profiling it until it's fast sounds like the kind of pain I pay other people good money to avoid.
> I think it borders on exploitation there are a lot of young individuals with wonder-lust that see a name like Reddit and will put in significant hours just for the possibility of maybe getting hired.
First, it's not exploitation. It can't be. It could only be exploitation if reddit were somehow planning to benefit from their implementations--e.g., if it would actually deploy one in production.
Second, I think you're making a false assumption that "young individual with wonder-lust" putting in "significant hours" on a task like this is time wasted. I've spent far more time writing IRC bots just for the fun of it, but was that time wasted? Of course not. I learned new skills, gained new knowledge, and was able to approach the real world of software development with the confidence of having actually implemented my own project end-to-end.
Though I think the two projects differ substantially in their difficulty, either project would benefit implementor in itself even apart from any prospects of getting hired.
> Well, first off, it's supposed to be fun. If you don't see the joy in either of these puzzles, please don't apply.
If you don't consider implementing something like tgrep fun, you're in the wrong line of work. I've actually thought of something like that before, for my own logs, but never gotten around to trying it out. They want people who consider what we do fun -- if you don't, they don't want you.
It is fun, but if you're the type of person who does this sort of thing for fun you should already have a nice portfolio to show them rather than needing to submit spec work.
>If you don't consider implementing something like tgrep fun, you're in the wrong line of work.
This is a silly statement to make, and honestly I'm tired of seeing this sentiment repeated.
Different people find different things fun. A big part of the fun in implementing some random project is yourself identifying the problem and coming up with a possible solution. Just trudging through someone else's spec is missing the fun aspect of problem solving.
Furthermore, for me at least, there is a tradeoff to when a project loses it's "fun" and just becomes grunt work. When there's a large creative aspect to it, that makes it fun. When the problem is fairly well-defined with an obvious solution but just needs to be fleshed out, that leans towards tedium.
For someone to assume that anyone that doesn't find their exact types of problems fun is in the "wrong line of work" is being a presumptuous prick.
I think the point is that if you don't already do this stuff for the fun of it, you're not who they're looking for. I just spent a few minutes writing out some pseudocode, and I have a slight adrenaline rush. Even if I don't submit anything, I've got to play with a neat problem.
There are sooo many interesting problems in the world, I never run out of stuff to do for fun.
If you want me to implement your spec that takes more than 15 minutes or so, then
a) you are a great non-profit for a cause I care about, or
b) you have to pay up.
But it's true, I'm not who they're looking for, and I don't want to work for reddit. I'm sure plenty of 21-year-old reddit fan(boy|girl)s will leap at the chance, and good for them.
Exactly. If I'm looking for stuff to do for the sheer hell of it, I've got loads of ideas of my own. I don't need to jump into an "oohhh please pick me, pick me!" arena to find interesting things to do.
Exactly. If you go into the business for the "fun of it", you are going to get exploited and you are going to get burned by your enthusiasm. Program to make money, make a difference to do something great, but don't do it because it's fun.
I think it's fine to ask someone to code something as a pre-interview so long as it's short (can be done in 48 hours by just about anyone) and it's something you're actually going to use on your system.
I was recently asked to write a simple CRUD page for contacts (name, address, etc) as a pre-interview test and that's well within the above.
You have to keep in mind that people can't apply for many jobs if they are all doing that, though. You're going to severely limit the number of applicants you get. It'll limit it to only people who really want to work there, but also to people who have enough free time to throw away to do the interview.
As a hiring manager, I think it's inappropriate to ask a candidate to spend significantly more time in the iapplication process than you're willing to spend evaluating them. High end talent search where you or your board will spend days agonizing over every candidate? Totally OK to ask for a significant amount of their time. Asking for some time consuming unique delivery from people that you won't necessarily even interview? You're just being abusive.
When you're in a position of power, either because jobs are rare or yours are uniquely appealing it's very easy to fall in to this mode, but that doesn't make it right. Especially in a case like this where you'd expect a high number of applications you're likely to dismiss out of hand (ie, sorry, no high school students) - at the very minimum you should be willing to do that first screening before you request anything needing a time investment.
48 hours meaning 5 days work; 48 hours meaning two full time days; or 48 hours meaning two evenings after a full time + usual overtime day, so about 4.5 hours with a beer?
If I had a dollar for every-time a potential client thought their app was so cool that I should be begging to work on it just to get a portfolio piece, well, I would have quite a few dollars.
To be quite honest I would look at some half implemented Reddit mock-up as a half implemented amateur example of someones work. I want to see fully working apps that a developer can explain to me what portions they built and why features where built.
To be honest I would be embarrassed to use a few hour throw together as an example of my work. When I have far better examples of applications that are professional and complete.
My intent is not to be arrogant about the matter but the reality is there are very few professions where asking someone to work for free to get a portfolio piece would be met with a straight face.
Lawyers do pro-bono to help the downtrodden doctors do research work to advance the state of the art but nether do routine work to get a portfolio piece. So unless you are asking someone to do state of the art groundbreaking research work or it is charity (open source) to ask someone to do it for portfolio work is akin to asking a lawyer to take your DUI case or a doctor to fix your problem to get some portfolio work.
It's their right to cultivate a company culture like that, should they wish so. Apparently a lot of young 'rockstar' programmers are attracted to that, being able to work and hang out with all the cool guys from a Web 3.0 company. Pay is probably less important than status (and a good looking entry on your résumè). I wonder whether the rockstar programmers are allowed to bring in their groupies to admire them during work? Like this guy observes: http://www.xtranormal.com/watch/7023615/
reddit is built around exploitation. they are owned by conde nast yet they have to beg their users for some "premium subscription" to upgrade their servers/hire new people.
I think that was just a bit of link bait for HN: notice that they didn't use that term in the actual post. Though maybe I'm attributing to malice... ;)
Are you going to release tgrep after the contest is over?
That'd be a very useful tool for lots of jumbo-logs, assuming the timestamp handling is anywhere near generic or customizable.
If not.. Hell, it'd still be useful for Apache logs. Please put it on Github? ;)
The hardest part of this is not posting the version I made in 5 minutes ;) I have no interest in working for Reddit, but as a SysAdmin, I can't resist a challenge.
Hey, this was actually easier and more fun than expected! I tried it out at the Python REPL and now I have a mostly-working implementation using os.path.getsize(), file.tell(), file.seek(), and file.readline(). The fun part is that I hadn't used the first three of those functions in Python before today. Layering a binary search on top of this looks as easy as
*REDACTED*
with some edge case checking and start-of-next-line seeking.
I'd have thought there was more to this, but it seems pretty straightforward.
Lessons learned for me: Python standard library docs are great, repl development is great, and text files are fun.
Oh nice! I had thought about using a script to isolate a rough-but-inclusive range of bytes from inside the file and then piping that into grep, but your way is certainly purer and more fun.
edit And now I have a good reason to learn more about dd, du, and bc!
Yeah, I had this working pretty well in about 20 minutes with python. Binary search is really pretty quick. I didn't have a 75 gigabyte log handy, so I had to test it on a measly 10 GB log. :(
I had a secondary problem where our logs occasionally put a new line in, so I had to burn a couple fseeks checking for that. I'm not sure how I'd go about truly profiling it, but it returns pretty much instantly.
Though it's not really useful for our logs to look for a per-minute line, because our logs are crap. What useful information do you find looking for that type of specific data?
Note they also had a time range option. I imagine they start out finding the specific event line ("you broke reddit" at 4:07 am!") and then slowly widen the time range around it to see if anything interesting happened in the minutes leading up to it.
"Frontend challenge
We want you to build a reddit clone entirely in HTML, Javascript, and CSS. It will maintain its state entirely client-side (HTML5 localstorage, cookies, whatever), and it's fine for it to be single-user. In fact, we want to leave as much of this challenge open to interpretation as possible."
What he wrote is clearly in black and white. They asked for a clone. I said if I wrote a clone, I'd launch it. He can argue with what he wrote all he wants, but it still remains.
Actually I wouldn't mind if Reddit were start to cache some things client-side. For example their voting is eventually-consistent, which means that my votes will be eventually saved by not always immediately. Because of this property (consistency) it would be save to remember cast votes on client (local storage or cookies, though the latter might not be such a good idea with all this 408s I'm seeing right now) and so it could spare me getting angry when after refreshing page or navigating to another view all my votes seem to be lost.
EDIT: Though on your point I don't see how doing anything else client-side can help Reddit with scaling.
"Well, first off, it's supposed to be fun. If you don't see the joy in either of these puzzles, please don't apply."
Sorry, but there are plenty of 'fun' things and problems I can work on without essentially doing spec work for someone who will then feel perfectly free to ignore it. That is to say, problems where I can be sure I'll see a reward for my work that is meaningful to me, instead of potentially wasting my time.
Is it really that hard to figure out? Imagine an implementation that does a binary search through the characters of a file; when it lands in the middle of the line, it seeks back by one character until it finds the beginning of the line, and then compares that line to the timestamp given.
70GB will require approximately 36 binary searches to find the line you want. Assuming the lines are around 200 characters long, each binary search will require on average 100 seeks backward to find the beginning of the line. From there you can read the characters you need for the timestamp.
So your total cost is going to be 36 * (1 seek to the character, 100 seeks to the beginning of the line, a read from that offset), disregarding the almost certainly irrelevant cost of comparison to the timestamp. Note that these seeks, while still calls to seek(2), are not actual random disk seeks, because disks return blocks to the OS in 16KB chunks or so. Most of those seeks will just be a quick roundtrip through the kernel.
So you'll do, on average, 36 reads and 3636 seeks. On most modern computers, that will take maybe 100ms, which agrees with my experience in writing a similar program for some of the logfiles I work with.
You're ignoring real-world aspects of the problem. For example, you're assuming that the data points are evenly distributed across time.
Reddit will most likely have regular busy and quiet periods, which will impact the density of the log at certain times.
Thus, one can tune the algorithm to work better on Reddit's specific visitor pattern, if you can learn it. As an example, you need to jump back further in the file to get from 8pm to 6pm than you do to jump back from 4am to 2am. <- assuming US time, which they don't.
> You're ignoring real-world aspects of the problem.
No, I'm not. The most important real world aspect of this problem is that I can pull the complex part, the binary search, off the standard library shelf. All I need to implement is a random access iterator over the lines of an open file and I'm set.
> For example, you're assuming that the data points are evenly distributed across time
No, I'm not. I just don't care how they're distributed across times. 70GB is between 2^36 and 2^37 bytes. It's probably around 2^28 or 2^29 lines. Binary search over the characters would take at most 37 probes; over the lines it would take at most 29 probes. Since each probe is so cheap (one disk seek and one disk read, essentially) there's absolutely no reason to optimize any further, especially when I can use an off-the-shelf component like C++'s std::lower_bound to do my binary search for me.
> Reddit will most likely have regular busy and quiet periods, which will impact the density of the log at certain time
If you think that impacts the runtime of binary search at all, you've got a serious misconception about how binary search works.
> Thus, one can tune the algorithm to work better on Reddit's specific visitor pattern, if you can learn it.
Why bother? We're talking about a savings of milliseconds on an interactive process. An ordinary human like myself would never even notice the difference. The network lag from SSH alone would be greater than the difference in runtime.
This is absolutely correct. The worst case in any binary search is exactly floor(lg n + 1) where the element doesn't exist. There is no reason to optimize any further than this.
To be clear, interpolation search can cut down the runtime by another log factor (`O(log log n)` instead of `O(log n)`) but it's just not worth the effort, especially in this case, precisely because the lines aren't uniformly distributed.
Well clearly they're more likely to hire someone who does go to the effort!
> To be clear, interpolation search can cut down the runtime by another log factor (`O(log log n)` instead of `O(log n)`) but it's just not worth the effort, especially in this case, precisely because the lines aren't uniformly distributed.
It doesn't matter what the distribution is as long as you can learn it. Uniform helps when you are cutting down the search space in regular chunks, sure. The Reddit data wont be uniform - so don't cut the search space uniformly.
As I said, something faster could be conceived if one studies the average number of visitors over a 24 hour period (I don't know where this data could be gathered from).
If you can make your first seek very accurate, then it may be the case that simple linear search from there will get you there faster than Binary Search.
You can still report average and worst-case complexities under the assumption you have taken about how the log data is distributed.
Sorry to keep going on about this, but I just wanted to make my point clear! Good discussion.
OK, you are simply proposing the most obvious solution to the problem, which is entirely correct - I must have misunderstood your reasoning.
I assumed Reddit would want something a bit more special that the hundreds of Binary Search implementations they are going to receive. There are always faster algorithms that can be designed for specific problems, even if realistically they only save (in this case) 100ms.
It's a competition - you're supposed to stand out.
>We want you to build a reddit clone entirely in HTML, Javascript, and CSS. It will maintain its state entirely client-side (HTML5 localstorage, cookies, whatever), and it's fine for it to be single-user. In fact, we want to leave as much of this challenge open to interpretation as possible.
...
>For this challenge, reimplement tgrep.
...
>Some of you might be thinking, "I can't believe reddit is going to make all these poor applicants slave over a hot emacs for two weeks just for the privilege of being allowed to apply for a dumb old job." Well, first off, it's supposed to be fun. If you don't see the joy in either of these puzzles, please don't apply.
Rockstar programmers, eh? What about ninja programmers... they are pretty cool too. Oh well, either way I'm not a rockstar... more of a guitar tech, so... best of luck to them.
You don't want "rockstar" anybodys. They are hard to deal with and think they are special. You want stable people who are good at what they do but don't think they are god.
Rest assured, chums. Reddit doesn't mention "rockstar" anywhere in the job listing; it's just their Ops Manager and Senior Product Developer using the term.
Now as a person that hires and specifically hires technical personally and is technical himself, I am sensitive to the fact that it takes a trained eye to spot talent and that their are a lot of posers out there. But in my personal opinion you guys are offloading the task of being good at spotting talent onto the prospective employee which I am not totally in agreement with.
Personally, I would not ask an up front prospect to code anything other than a 10-15 minute exercise (in interview) and if I where to have someone build something, it would be the final 3 prospects, it would be a real business problem, and I would compensate them for their time. I think the practice of competitions for a job borders to close to exploitation for my comfort, further I have seen better talent selection from a skilled interviewer than I ever have from an arbitrary competition.