Live data from Hacker News

My Favorite Engineering Interview Question

skife.org

101–110 of 131 posts

Re: My Favorite Engineering Interview Question

#101

I'm trying to work out if this is a thinko on my part or a typo on your part: First you write: > a system that lets you look up the value for a given key and then later on you write: > if they think the problem of looking up a key by value has been solved before Did you mean to say "looking up a value by key" or am I misunderstanding it? (Given that no one else has commented on it makes me question my question but I'…

The second one is a typo on my part :-/

Re: My Favorite Engineering Interview Question

#102
post #88
post #76

Earlier quoted context omitted.

> there are many ways in which the question may be unclear and the interviewer is mislead that the applicant can't answer. yeah, when I was interviewed for my university, they asked me to design an algorithm to work out the n'th term of the fibonnacci sequence. They repeatedly said I didn't need to use recursion or loops. When I finally gave up, they said: well here's one way: f(n) = f(n-1)+f(n-2) I just looked at th…

They were likely trying to help you and wanted to say they don't care whether you write an iterative or recursive solution.

I'm pretty sure I asked for clarification several times... It's possible I suppose.

Here's the problem it started from:

Eleven lily pads are numbered from 0 to 10. A frog starts on pad 0 and wants to get to pad 10. At each jump, the frog can move forward by one or two pads, so there are many ways it can get to pad 10. For example, it can make 10 jumps of one pad, 1111111111, or five jumps of two pads, 22222, or go 221212 or 221122, and so on. We'll call each of these ways different, even if the frog takes the same jumps in a different order. How many different ways are there of getting from 0 to 10?

(source: http://www.comlab.ox.ac.uk/admissions/ugrad/Sample_interview...)

Re: My Favorite Engineering Interview Question

#103
post #8

An idea I've tried a bit in the past (and would like to try more, given the chance): ask a question that you don't know the answer to. This shifts the power balance of the interview - you don't automatically have the answer over the candidate. You also don't have your mind closed by your expected answer(s). Both of these make the resulting discussion more comparable to how you will work with a colleague, which is wha…

This was the approach my current employer chose. They basically were like "Here's the challenges we expect you to tackle once you start. Let's discuss how you would approach each."

Essentially a high-level design session where they got to see my thought process and I got to ask lots of questions about the firm. The best part is that when I started they were pretty comfortable with my approach to certain projects as it was previously covered, and I knew what I was getting into. No big surprises for either side.

Re: My Favorite Engineering Interview Question

#104
post #97
post #46

These types of questions are terrible interviewing techniques. An interviewer who, even jokingly, goes into the room with an interrogative mindset is fundamentally failing at the core purpose of interviewing: finding good talent, preferably relatively undervalued talent. An interviewer should not be looking for someone who mirrors their way of thinking or or their approach to solving a problem. They should be looking…

I appreciate the feedback, but don't think I fall into, nor describe in the linked blog post, the interviewer category you describe (though it is certainly possible I do and just don't realize it). Do you consider this question to be unanswerable? As I stated, I'll accept pretty much any viable answer, my goal is to get folk to design something ~realistic (okay, this is a simplistic system, but we have finite time in…

Do you consider this question to be unanswerable?

Yes. Given a little time I could come up with 20 or more so ways of doing this. As to which one I would use that's not really answerable in an interview. The problem with questions like this is two weeks is a fairly long period of time. If it's literally all your working on then researching a few options and then asking some more questions is the best place to start. aka Is the access pattern random or would caching be useful? Is the data private? etc.

Re: My Favorite Engineering Interview Question

#105

Earlier quoted context omitted.

I don't understand your objection here. The question presented is a simple, open-ended question with a number of acceptable solutions. It's not even remotely "unanswerable". It's at least mildly interesting as indicated by the number of responses at a similar question on StackOverflow: http://stackoverflow.com/questions/2573653/given-a-1tb-data-... . It's not far from the problems Ning solves. It's not an "aha" probl…

I would say that having "interrogation techniques" crossed out is a pretty good indication that the author's state of mind in an interview situation is aggressive and domineering.

I would say it's obviously a joke. Do you always assume the worst of people?

Re: My Favorite Engineering Interview Question

#106
post #82

Earlier quoted context omitted.

I don't understand your objection here. The question presented is a simple, open-ended question with a number of acceptable solutions. It's not even remotely "unanswerable". It's at least mildly interesting as indicated by the number of responses at a similar question on StackOverflow: http://stackoverflow.com/questions/2573653/given-a-1tb-data-... . It's not far from the problems Ning solves. It's not an "aha" probl…

Seeing as you worked at Ning and likely participated in these types of interviews it's not surprising you don't get it. Surely Ning was a great place to work and I'm sure you found really top-notch employees through your well known tough hiring process, but I'd be willing to wager they all look very much the same when you blur your eyes a little bit. My diatribe, as you so eloquently put it, is based on the article.…

Wow. You seem angry, or frustrated. Did I say something that offended you?

I only participated in Ning's interviews as an interviewee. I worked for Ning for six weeks before the layoffs.

The only thing I'd notice when I blur my eyes a little bit is that Ning employees were better engineers than most I'd previously worked with. The same applies at my current employer, also known for its rigorous interviews. The similarities ended there.

You complain here about the things the author expects to see in an answer. He's looking to see what they think of that scale of problem and how their thoughts comport with their resume. He's looking to see what questions they ask to get more detail. He's looking to see that the solution is in reasonable bounds for hardware--that the candidate understands the limitations of the silicon we have to work with. He's looking to see whether they would reinvent the wheel or use proven technologies. He's looking to see what languages and technologies a candidate would choose to use. He's looking to see how well the candidate understands those tools. He's looking to see how cognizant candidates are of the failure modes of the system they're designing.

Maybe I'm dense, but I don't see any issue with the list of things the author expects to see expects to see. Can you be more specific, perhaps?

Likewise I don't understand the problem with the way the question is presented. He describes the data you have and the load you need to support. Is there something wrong with that presentation?

The crossed-out "interrogation" is obviously a joke. I'm certainly not known for my intuitive perceptiveness and I still saw that (and no, I never met brianm while working at Ning, to my knowledge).

How is asking about failure modes a "gotcha"? Every good engineer needs to consider how his designs and systems can fail. What in that question do you expect trips up good engineers?

The only "specific type of candidate" this question seems oriented toward finding is "good engineers." He's not asking for particular technologies. He's not even looking for a particular solution. He's just asking people an open-ended question about how they would design a system. All the best engineers I know would be able to answer that question in 30 minutes.

I don't disagree because I was part of the process, I disagree because I can't understand your objections. I hate to sink to personal attacks like you have, but have you considered that your opinion on questions like this may have been formed by your abilities? It seems a more likely possibility than that questions like this are fundamentally flawed in some way that you've as yet been unable to describe. Both companies I've worked with that have had rigorous interview questions of this sort have hired the highest quality talent I've ever had the pleasure of working with.

Re: My Favorite Engineering Interview Question

#107
It seems to me that the problem could actually be solved by using a 64GB SSD. Given that the storage is 1TB and each of the keys and values are 128Bytes (and hence the disk is full to capacity), and assuming the keys are unique, which it would need to be to have all the keys unique, then we can safely say that every possible value in the 2^32 space is used. Therefore, we could read the data from the 1TB disk, and for each key we find, use the value of the key as the address of a memory location on the 64GB SSD. Net effect is we essentially remove all the key info from the hard disk and compress the storage into 16GB. ie, no need for the hard disk, just a 64GB SSD.

Re: My Favorite Engineering Interview Question

#108
post #101

I'm trying to work out if this is a thinko on my part or a typo on your part: First you write: > a system that lets you look up the value for a given key and then later on you write: > if they think the problem of looking up a key by value has been solved before Did you mean to say "looking up a value by key" or am I misunderstanding it? (Given that no one else has commented on it makes me question my question but I'…

The second one is a typo on my part :-/

Thanks for clarifying that.

Re: My Favorite Engineering Interview Question

#109
post #81

I'm confused... why specify a 1 TB disk ? It doesn't seem that the problem's solution has any dependence on the aforementioned disk aside from the data it contains unless I'm misreading how he's explaining the answer?

Because when you specify a disk , you realise he's guiding you in the direction of a specific answer. Use the filesystem. It's what it's there for, particularly if the data never changes. Nice big cache, xfs, nested hierarchical datastore using folders based on keynames, 20 lines of code, job done. 5000 lookups a second is trivial throughput for a decent disk with a decent readahead cache.

I don't know of any hard drives that can do a seek+read in 0.2 milliseconds. Keep in mind that the reads are distributed randomly - you're almost certainly going to need more than one disk if you have less than a terabyte of RAM for your datastore.

Re: My Favorite Engineering Interview Question

#110
Hello, I would probably make a very poor candidate, but I wanted to ask this - the question gives a 1TB hard drive, and fills it literally to the brim with 4 billion sets of 256 bytes. And then you say that 4 or 5 years ago this relied on some sort of distributed system, but now it can be done on one box. What changed? If the drive is one terabyte, and is used to store exactly one terabyte of data, aren't you going to need to put your database overhead somewhere? Am I completely misunderstanding the question? I find it interesting though. It's an easy problem without the storage space limitation. With it, it's fascinating. Are we thinking to compress the values and/or the keys? Or am I off the mark?
Post reply on HN